Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/55271 )
Change subject: soc/intel/common/block/uart: Fix resources in ACPI mode ......................................................................
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 patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/55271 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/soc/intel/common/block/uart/uart.c 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/soc/intel/common/block/uart/uart.c b/src/soc/intel/common/block/uart/uart.c index c3691ff..8d96e44 100644 --- a/src/soc/intel/common/block/uart/uart.c +++ b/src/soc/intel/common/block/uart/uart.c @@ -127,6 +127,11 @@ 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; + } }
/*