vmm: device_manager: Store the type of notification in a local value

When the value is read from the I/O port via the ACPI AML functions to
determine what has been triggered the notifiction value is reset
preventing a second read from exposing the value. If we need support
multiple types of GED notification (such as memory hotplug) then we
should avoid reading the value multiple times.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-01-09 15:15:18 +00:00 committed by Samuel Ortiz
parent 5da7c63127
commit 78dcb1862c

View File

@ -1656,10 +1656,13 @@ fn create_ged_device(ged_irq: u32) -> Vec<u8> {
"_EVT".into(),
1,
true,
vec![&aml::If::new(
&aml::Equal::new(&aml::Path::new("GDAT"), &aml::ONE),
vec![&aml::MethodCall::new("\\_SB_.CPUS.CSCN".into(), vec![])],
)],
vec![
&aml::Store::new(&aml::Local(0), &aml::Path::new("GDAT")),
&aml::If::new(
&aml::Equal::new(&aml::Local(0), &aml::ONE),
vec![&aml::MethodCall::new("\\_SB_.CPUS.CSCN".into(), vec![])],
),
],
),
],
)