From e42ce6bb499031cbe4cdbad19314d2c9971b2186 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Mon, 7 Jun 2021 16:46:40 +0200 Subject: soc/intel/common/block/uart: Fix resources in ACPI mode In ACPI mode the device cannot be enumerated and thus the payload and bootloader doesn't know about the active resources. An ACPI aware OS can use the _CRS to determine the active MMIO window. Mark the BAR0 as reserved if the device is in ACPI mode to make sure the BAR is reserved in e820 tables. Change-Id: I6079b1eb7b0c87c752515340aac8776244b30ca0 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/55271 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/soc/intel/common/block/uart/uart.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/block/uart/uart.c b/src/soc/intel/common/block/uart/uart.c index c3691ff04e27..8d96e44bfc37 100644 --- a/src/soc/intel/common/block/uart/uart.c +++ b/src/soc/intel/common/block/uart/uart.c @@ -127,6 +127,11 @@ static void uart_read_resources(struct device *dev) res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; } + /* In ACPI mode mark the decoded region as reserved */ + if (dev->hidden) { + struct resource *res = find_resource(dev, PCI_BASE_ADDRESS_0); + res->flags |= IORESOURCE_RESERVE; + } } /* -- cgit v1.2.3