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>
This commit is contained in:
Patrick Rudolph 2021-06-07 16:46:40 +02:00 committed by Nico Huber
parent 193203f90b
commit e42ce6bb49
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}
}
/*