mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 23:28:29 +00:00
hw/x86: add suspend kernel syscall
using the ACPI mechanism. The syscall can be triggered solely via core's RPC managing_system call. Issue #4669
This commit is contained in:
committed by
Christian Helmuth
parent
30c6feb86e
commit
df27cc87b5
@ -46,6 +46,7 @@ namespace Kernel {
|
||||
constexpr Call_arg call_id_time() { return 21; }
|
||||
constexpr Call_arg call_id_run_vm() { return 22; }
|
||||
constexpr Call_arg call_id_pause_vm() { return 23; }
|
||||
constexpr Call_arg call_id_suspend() { return 24; }
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
@ -431,6 +432,21 @@ namespace Kernel {
|
||||
{
|
||||
call(call_id_pause_vm(), cap);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Suspend hardware
|
||||
*
|
||||
* \param sleep_type The intended sleep state S0 ... S5. The values are
|
||||
* read out by an ACPI AML component and are of type
|
||||
* TYP_SLPx as described in the ACPI specification,
|
||||
* e.g. TYP_SLPa and TYP_SLPb. The values differ
|
||||
* between different PC systems/boards.
|
||||
*/
|
||||
inline bool suspend(unsigned const sleep_type)
|
||||
{
|
||||
return bool(call(call_id_suspend(), sleep_type));
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__KERNEL__INTERFACE_H_ */
|
||||
|
Reference in New Issue
Block a user