From 7cf9c7451808421300a00279abb4d48c42e5050a Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Tue, 8 Aug 2023 11:37:03 -0500 Subject: soc/amd/*: Fix UART ACPI device status Prior to commit d1c0f958d198 ("acpi: Call acpi_fill_ssdt() only for enabled devices"), uart_inject_ssdt() was used to set the ACPI status (_STA) for both enabled and disabled devices. The aforementioned commit limited it to being called only on enabled devices, which left disabled devices without any _STA method at all -- which the OS assumes means that the device is present and enabled. To fix this, create the _STA method in the UART asl code for each port, and set the return value to a name variable (STAT) which defaults to 0 (not present/disabled). Then, have uart_inject_ssdt() set STAT to present and enabled (0xF) for UARTs actually present on the board. TEST=build/boot google/skyrim (frostflow), dump ACPI tables, and verify that _STA returns 0xF only for UARTs enabled in devicetree. Change-Id: Id89e74c3ea7f53280935898ee35311b7cf3b152a Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/77092 Reviewed-by: Felix Held Tested-by: build bot (Jenkins) --- src/soc/amd/mendocino/acpi/mmio.asl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/soc/amd/mendocino') diff --git a/src/soc/amd/mendocino/acpi/mmio.asl b/src/soc/amd/mendocino/acpi/mmio.asl index 983ad59d67..5c364d8800 100644 --- a/src/soc/amd/mendocino/acpi/mmio.asl +++ b/src/soc/amd/mendocino/acpi/mmio.asl @@ -89,6 +89,12 @@ Device (FUR0) } } + Name (STAT, 0x0) + Method (_STA, 0x0, NotSerialized) + { + Return (STAT) + } + AOAC_DEVICE(FCH_AOAC_DEV_UART0, 0) } @@ -120,6 +126,12 @@ Device (FUR1) { } } + Name (STAT, 0x0) + Method (_STA, 0x0, NotSerialized) + { + Return (STAT) + } + AOAC_DEVICE(FCH_AOAC_DEV_UART1, 0) } @@ -151,6 +163,12 @@ Device (FUR2) { } } + Name (STAT, 0x0) + Method (_STA, 0x0, NotSerialized) + { + Return (STAT) + } + AOAC_DEVICE(FCH_AOAC_DEV_UART2, 0) } @@ -182,6 +200,12 @@ Device (FUR3) { } } + Name (STAT, 0x0) + Method (_STA, 0x0, NotSerialized) + { + Return (STAT) + } + AOAC_DEVICE(FCH_AOAC_DEV_UART3, 0) } @@ -213,6 +237,12 @@ Device (FUR4) { } } + Name (STAT, 0x0) + Method (_STA, 0x0, NotSerialized) + { + Return (STAT) + } + AOAC_DEVICE(FCH_AOAC_DEV_UART4, 0) } -- cgit v1.2.3