diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-06-05 19:59:25 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-06-07 00:09:37 +0000 |
commit | e3c9a04f8b398696394fe98b054f0f5bf5523425 (patch) | |
tree | 7db5f9791a6b550fec85a6220aa32b688852178f /src | |
parent | 407bd58da12b28a7a5092c388e1e94a9d6fb1128 (diff) |
acpi/acpigen: generate DWord IO resource in acpigen_resource_producer_io
When an IO resource producer is generated that covers the whole IO space
from 0 to 0xffff, the length field in the word resource ACPI type would
overflow and be truncated which results in Linux not finding any usable
IO space to use for the PCI IO BARs. Instead generate a double word IO
resource producer to have all cases supported. Beware that covering all
IO ports with the IO resource producer while covering the PCI config IO
ports with a resource consumer in the same PCI root device will make
Linux a bit unhappy and it will complain due to the overlap, but still
end up doing the right thing:
acpi PNP0A08:00: host bridge window expanded to [io 0x0000-0xffff]; [io 0x0000-0xffff window] ignored
The SoC code should make sure to carve out the PCI config IO ports from
the IO resource producer.
TEST=Both Ubuntu 2022.04.1 LTS and Windows 10 are ok with the IO DWord
resource producer.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8a59cdfcfa30a8fdd13f8db3dc1447994c266c8b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75613
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/acpi/acpigen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index 21b8ac1504..fb92b89f03 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -2243,7 +2243,7 @@ void acpigen_resource_producer_bus_number(u16 bus_base, u16 bus_limit) void acpigen_resource_producer_io(u16 io_base, u16 io_limit) { - acpigen_resource_word(RSRC_TYPE_IO, /* res_type */ + acpigen_resource_dword(RSRC_TYPE_IO, /* res_type */ ADDR_SPACE_GENERAL_FLAG_MAX_FIXED | ADDR_SPACE_GENERAL_FLAG_MIN_FIXED | ADDR_SPACE_GENERAL_FLAG_DEC_POS |