From eba42c392f591e0e1290a25b3009987e5b0b07a1 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 13 Aug 2020 23:18:17 +0200 Subject: [PATCH] devices: acpi: Add UID to devices with common HID Some OS might check for duplicates and bail out, if it can't create a distinct mapping. According to ACPI 5.0 section 6.1.12, while _UID is optional, it becomes required when there are multiple devices with the same _HID. Signed-off-by: Anatol Belski --- vmm/src/cpu.rs | 1 + vmm/src/device_manager.rs | 1 + vmm/src/memory_manager.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/vmm/src/cpu.rs b/vmm/src/cpu.rs index a5eff7920..fe4c52723 100644 --- a/vmm/src/cpu.rs +++ b/vmm/src/cpu.rs @@ -1254,6 +1254,7 @@ impl Aml for CpuManager { "_SB_.PRES".into(), vec![ &aml::Name::new("_HID".into(), &aml::EISAName::new("PNP0A06")), + &aml::Name::new("_UID".into(), &"CPU Hotplug Controller"), // Mutex to protect concurrent access as we write to choose CPU and then read back status &aml::Mutex::new("CPLK".into(), 0), // I/O port for CPU controller diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index c2cf8bcd0..54c3543d1 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -3438,6 +3438,7 @@ impl Aml for DeviceManager { vec![ &aml::Name::new("_HID".into(), &aml::EISAName::new("PNP0A06")), &aml::Name::new("_STA".into(), &0x0bu8), + &aml::Name::new("_UID".into(), &"PCI Hotplug Controller"), &aml::Mutex::new("BLCK".into(), 0), // I/O port for PCI hotplug controller &aml::Name::new( diff --git a/vmm/src/memory_manager.rs b/vmm/src/memory_manager.rs index cebedbcec..c1e547bd2 100644 --- a/vmm/src/memory_manager.rs +++ b/vmm/src/memory_manager.rs @@ -1225,6 +1225,7 @@ impl Aml for MemoryManager { "_SB_.MHPC".into(), vec![ &aml::Name::new("_HID".into(), &aml::EISAName::new("PNP0A06")), + &aml::Name::new("_UID".into(), &"Memory Hotplug Controller"), // Mutex to protect concurrent access as we write to choose slot and then read back status &aml::Mutex::new("MLCK".into(), 0), // I/O port for memory controller