mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
devices: acpi: Trigger the power button upon GED event
If a GED event of type 0x8 (for power button) is received notify the guest OS that this button device has been activated. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
ff4d378f1b
commit
c381b36b87
@ -142,6 +142,14 @@ impl Aml for AcpiGEDDevice {
|
||||
&aml::Equal::new(&aml::Local(1), &4usize),
|
||||
vec![&aml::MethodCall::new("\\_SB_.PCI0.PCNT".into(), vec![])],
|
||||
),
|
||||
&aml::And::new(&aml::Local(1), &aml::Local(0), &8usize),
|
||||
&aml::If::new(
|
||||
&aml::Equal::new(&aml::Local(1), &8usize),
|
||||
vec![&aml::Notify::new(
|
||||
&aml::Path::new("\\_SB_.PWRB"),
|
||||
&0x80usize,
|
||||
)],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user