diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2021-06-07 16:46:40 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-06-14 08:37:06 +0000 |
commit | e42ce6bb499031cbe4cdbad19314d2c9971b2186 (patch) | |
tree | dee0430d4bd36d9de2e09f3c83c951bc45e1e955 | |
parent | 193203f90b49de06e4997aad53fb6d556c34798f (diff) |
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>
-rw-r--r-- | src/soc/intel/common/block/uart/uart.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/uart/uart.c b/src/soc/intel/common/block/uart/uart.c index c3691ff04e..8d96e44bfc 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; + } } /* |