Lucas Chen has uploaded this change for review. ( https://review.coreboot.org/28333
Change subject: acpi: Hide Chrome and Coreboot specific devices ......................................................................
acpi: Hide Chrome and Coreboot specific devices
Some ACPI interfaces introduced by Chrome or Coreboot do not need drivers outside ChromeOS, for example Chrome EC or Coreboot table.
These interfaces should be set to hidden so non-ChromeOS systems, for example Windows, won't have problem finding driver.
Interfaces changed: - Coreboot (BOOT0000), only used by Chrome OS / Linux kernel. - Chrome OS EC - Chrome OS EC PD - Chrome OS TBMC - Chrome OS RAMoops
BUG=b:72200466 BRANCH=eve TEST=Boot into legacy mode and checked ACPI devices on UI.
Change-Id: I9786cf9ee07b2c3f11509850604f2bfb3f3e710a Signed-off-by: David Wu David_Wu@quanta.corp-partner.google.com Reviewed-on: https://chromium-review.googlesource.com/1078211 Reviewed-by: Hung-Te Lin hungte@chromium.org Commit-Queue: Hung-Te Lin hungte@chromium.org Tested-by: Hung-Te Lin hungte@chromium.org Trybot-Ready: Hung-Te Lin hungte@chromium.org --- M src/arch/x86/acpi.c M src/arch/x86/include/arch/acpigen.h M src/ec/google/chromeec/acpi/cros_ec.asl M src/ec/google/chromeec/acpi/pd.asl M src/ec/google/chromeec/acpi/tbmc.asl M src/vendorcode/google/chromeos/acpi/ramoops.asl 6 files changed, 20 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/28333/1
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index 78eeaa7..8e16f94 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -324,7 +324,7 @@ acpigen_write_device("CTBL"); acpigen_write_coreboot_hid(COREBOOT_ACPI_ID_CBTABLE); acpigen_write_name_integer("_UID", 0); - acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON); + acpigen_write_STA(ACPI_STATUS_DEVICE_HIDDEN_ON); acpigen_write_name("_CRS"); acpigen_write_resourcetemplate_header(); acpigen_write_mem32fixed(0, base, size); diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h index 775339a..a27bd6f 100644 --- a/src/arch/x86/include/arch/acpigen.h +++ b/src/arch/x86/include/arch/acpigen.h @@ -36,6 +36,9 @@ ACPI_STATUS_DEVICE_ENABLED |\ ACPI_STATUS_DEVICE_SHOW_IN_UI |\ ACPI_STATUS_DEVICE_STATE_OK) +#define ACPI_STATUS_DEVICE_HIDDEN_ON (ACPI_STATUS_DEVICE_PRESENT |\ + ACPI_STATUS_DEVICE_ENABLED |\ + ACPI_STATUS_DEVICE_STATE_OK)
/* ACPI Op/Prefix Codes */ enum { diff --git a/src/ec/google/chromeec/acpi/cros_ec.asl b/src/ec/google/chromeec/acpi/cros_ec.asl index 1d7fb52..d0a5b68 100644 --- a/src/ec/google/chromeec/acpi/cros_ec.asl +++ b/src/ec/google/chromeec/acpi/cros_ec.asl @@ -39,4 +39,8 @@ Name (_DDN, "EC Base Switch Device") } #endif + Method(_STA, 0) + { + Return (0xB) + } } diff --git a/src/ec/google/chromeec/acpi/pd.asl b/src/ec/google/chromeec/acpi/pd.asl index a5a58f5..7b799e8 100644 --- a/src/ec/google/chromeec/acpi/pd.asl +++ b/src/ec/google/chromeec/acpi/pd.asl @@ -18,4 +18,8 @@ Name (_HID, "GOOG0003") Name (_UID, 1) Name (_DDN, "EC PD Device") + Method(_STA, 0) + { + Return (0xB) + } } diff --git a/src/ec/google/chromeec/acpi/tbmc.asl b/src/ec/google/chromeec/acpi/tbmc.asl index 25a27ef1b..86a6de8 100644 --- a/src/ec/google/chromeec/acpi/tbmc.asl +++ b/src/ec/google/chromeec/acpi/tbmc.asl @@ -26,4 +26,8 @@ Return (0x0) } } + Method(_STA, 0) + { + Return (0xB) + } } diff --git a/src/vendorcode/google/chromeos/acpi/ramoops.asl b/src/vendorcode/google/chromeos/acpi/ramoops.asl index 5a8ed86..810ff91 100644 --- a/src/vendorcode/google/chromeos/acpi/ramoops.asl +++ b/src/vendorcode/google/chromeos/acpi/ramoops.asl @@ -35,5 +35,9 @@ Store (\RMOL, RLEN) Return (^RBUF) } + Method(_STA, 0) + { + Return (0xB) + } } }