summaryrefslogtreecommitdiff
path: root/src/superio/common
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-12-13 11:12:33 +0100
committerFelix Held <felix-coreboot@felixheld.de>2020-01-09 14:22:29 +0000
commit5c8ff794a8dcb0760c137d3b2dff1879a4a8dad6 (patch)
tree7d889ae1343b1d2a475438ddf8365c8aad8bb621 /src/superio/common
parent1aba2a32e890228a817dbc32a92607b336e7ea32 (diff)
downloadcoreboot-5c8ff794a8dcb0760c137d3b2dff1879a4a8dad6.tar.xz
superio/common/ssdt: Make disabled PNP devices ACPI compliant
Always write a _HID, even for disabled PNP devices. Fixes a BSOD on Windows 10. Change-Id: I419a08bd6a3570fb4e1ae31bef4f9ccd6836fe1b Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37692 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src/superio/common')
-rw-r--r--src/superio/common/ssdt.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/superio/common/ssdt.c b/src/superio/common/ssdt.c
index bc5d39460a..41cafdfb0e 100644
--- a/src/superio/common/ssdt.c
+++ b/src/superio/common/ssdt.c
@@ -219,28 +219,11 @@ void superio_common_fill_ssdt_generator(struct device *dev)
}
acpigen_pop_len(); /* Method */
- if (!dev->enabled) {
- acpigen_pop_len(); /* Device */
- acpigen_pop_len(); /* Scope */
- return;
- }
-
- if (has_resources(dev)) {
- /* Resources - _CRS */
- acpigen_write_name("_CRS");
- acpigen_write_resourcetemplate_header();
- ldn_gen_resources(dev);
- acpigen_write_resourcetemplate_footer();
-
- /* Resources - _PRS */
- acpigen_write_name("_PRS");
- acpigen_write_resourcetemplate_header();
- ldn_gen_resources(dev);
- acpigen_write_resourcetemplate_footer();
-
- /* Resources base and size for 3rd party ACPI code */
- ldn_gen_resources_use(dev);
- }
+ /*
+ * The ACPI6.2 spec Chapter 6.1.5 requires to set a _HID if no _ADR
+ * is present. Tests on Windows 10 showed that this is also true for
+ * disabled (_STA = 0) devices, otherwise it BSODs.
+ */
hid = acpi_device_hid(dev);
if (!hid) {
@@ -266,6 +249,23 @@ void superio_common_fill_ssdt_generator(struct device *dev)
}
acpigen_pop_len(); /* Method */
+ if (dev->enabled && has_resources(dev)) {
+ /* Resources - _CRS */
+ acpigen_write_name("_CRS");
+ acpigen_write_resourcetemplate_header();
+ ldn_gen_resources(dev);
+ acpigen_write_resourcetemplate_footer();
+
+ /* Resources - _PRS */
+ acpigen_write_name("_PRS");
+ acpigen_write_resourcetemplate_header();
+ ldn_gen_resources(dev);
+ acpigen_write_resourcetemplate_footer();
+
+ /* Resources base and size for 3rd party ACPI code */
+ ldn_gen_resources_use(dev);
+ }
+
acpigen_pop_len(); /* Device */
acpigen_pop_len(); /* Scope */
}