Attention is currently required from: Lance Zhao, Tim Wawrzynczak.
Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75613?usp=email )
Change subject: acpi/acpigen: warn if acpigen_resource_producer_io truncates length ......................................................................
acpi/acpigen: warn if acpigen_resource_producer_io truncates length
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 will overflow and be truncated. This results in Linux not finding any usable IO space to use for the PCI IO BARs.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I8a59cdfcfa30a8fdd13f8db3dc1447994c266c8b --- M src/acpi/acpigen.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/75613/1
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index 21b8ac1..6b7a0f2 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -2243,6 +2243,10 @@
void acpigen_resource_producer_io(u16 io_base, u16 io_limit) { + if (io_base == 0 && io_limit == 0xffff) + printk(BIOS_WARNING, "%s: IO range too large, length will be truncated\n", + __func__); + acpigen_resource_word(RSRC_TYPE_IO, /* res_type */ ADDR_SPACE_GENERAL_FLAG_MAX_FIXED | ADDR_SPACE_GENERAL_FLAG_MIN_FIXED