From c83bab62b3657d97299c8368b6c610e4cbf994b6 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Fri, 13 Dec 2019 12:16:06 +0100 Subject: acpi: Be more ACPI compliant when generating _UID * Add function to generate unique _UID using CRC32 * Add function to write the _UID based on a device's ACPI path ACPI devices that have the same _HID must use different _UID. Linux doesn't care about _UID if it's not used. Windows 10 verifies the ACPI code on boot and BSODs if two devices with the same _HID share the same _UID. Fixes BSOD seen on Windows 10. Change-Id: I47cd5396060d325f9ce338afced6af021e7ff2b4 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/37695 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese --- src/arch/x86/include/arch/acpi_device.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index 382ef1546b..0a702c9329 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -62,10 +62,12 @@ struct acpi_dp { struct device; const char *acpi_device_name(const struct device *dev); const char *acpi_device_hid(const struct device *dev); +uint32_t acpi_device_uid(struct device *dev); const char *acpi_device_path(const struct device *dev); const char *acpi_device_scope(const struct device *dev); const char *acpi_device_path_join(const struct device *dev, const char *name); int acpi_device_status(const struct device *dev); +void acpi_device_write_uid(struct device *dev); /* * ACPI Descriptor for extended Interrupt() -- cgit v1.2.3