summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/acpi/acpi.c8
-rw-r--r--src/include/acpi/acpi.h2
-rw-r--r--src/soc/amd/common/block/acpi/tables.c9
3 files changed, 18 insertions, 1 deletions
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index 17cd24c023..942d464ad6 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -896,6 +896,14 @@ unsigned long acpi_pl011_write_dbg2_uart(acpi_rsdp_t *rsdp, unsigned long curren
name);
}
+unsigned long acpi_16550_mmio32_write_dbg2_uart(acpi_rsdp_t *rsdp, unsigned long current,
+ uint64_t base, const char *name)
+{
+ return acpi_write_dbg2_uart(rsdp, current, ACPI_ADDRESS_SPACE_MEMORY, base,
+ 0x100, ACPI_ACCESS_SIZE_DWORD_ACCESS,
+ name);
+}
+
static void acpi_create_facs(void *header)
{
acpi_facs_t *facs = header;
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h
index a26d735865..0941deedfd 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -1659,6 +1659,8 @@ unsigned long acpi_write_dbg2_pci_uart(acpi_rsdp_t *rsdp, unsigned long current,
const struct device *dev, uint8_t access_size);
unsigned long acpi_pl011_write_dbg2_uart(acpi_rsdp_t *rsdp, unsigned long current,
uint64_t base, const char *name);
+unsigned long acpi_16550_mmio32_write_dbg2_uart(acpi_rsdp_t *rsdp, unsigned long current,
+ uint64_t base, const char *name);
void acpi_create_dmar(acpi_dmar_t *dmar, enum dmar_flags flags,
unsigned long (*acpi_fill_dmar)(unsigned long));
diff --git a/src/soc/amd/common/block/acpi/tables.c b/src/soc/amd/common/block/acpi/tables.c
index bda283a3cb..d49d307812 100644
--- a/src/soc/amd/common/block/acpi/tables.c
+++ b/src/soc/amd/common/block/acpi/tables.c
@@ -4,11 +4,18 @@
#include <acpi/acpigen.h>
#include <amdblocks/acpi.h>
#include <device/device.h>
+#include <console/uart.h>
#include <types.h>
unsigned long southbridge_write_acpi_tables(const struct device *device,
unsigned long current,
struct acpi_rsdp *rsdp)
{
- return acpi_write_hpet(device, current, rsdp);
+ current = acpi_write_hpet(device, current, rsdp);
+
+ if (CONFIG(AMD_SOC_CONSOLE_UART))
+ current = acpi_16550_mmio32_write_dbg2_uart(rsdp, current,
+ uart_platform_base(get_uart_for_console()), NULL);
+
+ return current;
}