From c615de7248f9e22ff565517125f6e5d88706bd89 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 22 May 2025 15:36:43 +0200 Subject: [PATCH] soc/amd/glinda: Don't let OS put debug UART into D3 When using CONFIG_CONSOLE_SERIAL prevent the OS from putting the debug uart into D3 state. In the D3 state it's not operating any more, and the user cannot read debug messages on early kernel boot or on shutdown any more. For release builds CONFIG_CONSOLE_SERIAL should not be set and the device can be put into powersave mode. Change-Id: Id6b6a4d0a053a5e14e54cf623974376992f0abd8 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/87803 Reviewed-by: Angel Pons Reviewed-by: Alicja Michalska Tested-by: build bot (Jenkins) --- src/soc/amd/glinda/acpi/mmio.asl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/soc/amd/glinda/acpi/mmio.asl b/src/soc/amd/glinda/acpi/mmio.asl index 3d7b882efd..7323427b08 100644 --- a/src/soc/amd/glinda/acpi/mmio.asl +++ b/src/soc/amd/glinda/acpi/mmio.asl @@ -94,8 +94,9 @@ Device (FUR0) { Return (STAT) } - +#if (!CONFIG(CONSOLE_SERIAL) || !CONFIG(AMD_SOC_CONSOLE_UART) || CONFIG_UART_FOR_CONSOLE != 0) AOAC_DEVICE(FCH_AOAC_DEV_UART0, 0) +#endif } Device (FUR1) { @@ -131,8 +132,9 @@ Device (FUR1) { { Return (STAT) } - +#if (!CONFIG(CONSOLE_SERIAL) || !CONFIG(AMD_SOC_CONSOLE_UART) || CONFIG_UART_FOR_CONSOLE != 1) AOAC_DEVICE(FCH_AOAC_DEV_UART1, 0) +#endif } Device (FUR2) { @@ -168,8 +170,9 @@ Device (FUR2) { { Return (STAT) } - +#if (!CONFIG(CONSOLE_SERIAL) || !CONFIG(AMD_SOC_CONSOLE_UART) || CONFIG_UART_FOR_CONSOLE != 2) AOAC_DEVICE(FCH_AOAC_DEV_UART2, 0) +#endif } Device (FUR3) { @@ -205,8 +208,9 @@ Device (FUR3) { { Return (STAT) } - +#if (!CONFIG(CONSOLE_SERIAL) || !CONFIG(AMD_SOC_CONSOLE_UART) || CONFIG_UART_FOR_CONSOLE != 3) AOAC_DEVICE(FCH_AOAC_DEV_UART3, 0) +#endif } Device (FUR4) {