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 --- Documentation/acpi/index.md | 2 ++ Documentation/acpi/uid.md | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 Documentation/acpi/uid.md (limited to 'Documentation/acpi') diff --git a/Documentation/acpi/index.md b/Documentation/acpi/index.md index 8add8db387..c378722018 100644 --- a/Documentation/acpi/index.md +++ b/Documentation/acpi/index.md @@ -2,6 +2,8 @@ This section contains documentation about coreboot on ACPI. +- [SSDT UID generation](uid.md) + ## GPIO - [GPIO toggling in ACPI AML](gpio.md) diff --git a/Documentation/acpi/uid.md b/Documentation/acpi/uid.md new file mode 100644 index 0000000000..0354bc52f0 --- /dev/null +++ b/Documentation/acpi/uid.md @@ -0,0 +1,14 @@ +# ACPI SSDT \_UID generation + +According to the ACPI spec: + +> The _UID must be unique across all devices with either a common _HID or _CID. + + +When generating SSDTs in coreboot the independent drivers don't know +which \_UID is already in use for a specific \_HID or \_CID. To generate +unique \_UIDs the ACPI device's path is hashed and used as ID. As every ACPI +device has a different path, the hash will be also different for every device. + +Windows 10 verifies all devices with the same \_HID or \_CID and makes +sure that no \_UID is duplicated. If it is it'll BSOD. -- cgit v1.2.3