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; or will be probed by direct ACPI calls (instead
of trying to find drivers by device IDs).

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 non-ChromeOS systems (for example Windows)
     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>
Reviewed-on: https://review.coreboot.org/28333
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
David Wu 2018-03-21 16:48:53 +08:00 committed by Martin Roth
parent 216345dd24
commit 5dff396bef
6 changed files with 20 additions and 1 deletions

View File

@ -324,7 +324,7 @@ static void acpi_ssdt_write_cbtable(void)
acpigen_write_device("CTBL"); acpigen_write_device("CTBL");
acpigen_write_coreboot_hid(COREBOOT_ACPI_ID_CBTABLE); acpigen_write_coreboot_hid(COREBOOT_ACPI_ID_CBTABLE);
acpigen_write_name_integer("_UID", 0); 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_name("_CRS");
acpigen_write_resourcetemplate_header(); acpigen_write_resourcetemplate_header();
acpigen_write_mem32fixed(0, base, size); acpigen_write_mem32fixed(0, base, size);

View File

@ -36,6 +36,9 @@
ACPI_STATUS_DEVICE_ENABLED |\ ACPI_STATUS_DEVICE_ENABLED |\
ACPI_STATUS_DEVICE_SHOW_IN_UI |\ ACPI_STATUS_DEVICE_SHOW_IN_UI |\
ACPI_STATUS_DEVICE_STATE_OK) 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 */ /* ACPI Op/Prefix Codes */
enum { enum {

View File

@ -39,4 +39,8 @@ Device (CREC)
Name (_DDN, "EC Base Switch Device") Name (_DDN, "EC Base Switch Device")
} }
#endif #endif
Method(_STA, 0)
{
Return (0xB)
}
} }

View File

@ -18,4 +18,8 @@ Device (ECPD)
Name (_HID, "GOOG0003") Name (_HID, "GOOG0003")
Name (_UID, 1) Name (_UID, 1)
Name (_DDN, "EC PD Device") Name (_DDN, "EC PD Device")
Method(_STA, 0)
{
Return (0xB)
}
} }

View File

@ -26,4 +26,8 @@ Device (TBMC)
Return (0x0) Return (0x0)
} }
} }
Method(_STA, 0)
{
Return (0xB)
}
} }

View File

@ -35,5 +35,9 @@ Scope (\_SB)
Store (\RMOL, RLEN) Store (\RMOL, RLEN)
Return (^RBUF) Return (^RBUF)
} }
Method(_STA, 0)
{
Return (0xB)
}
} }
} }