aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-06-29 21:09:52 +0200
committerLean Sheng Tan <sheng.tan@9elements.com>2023-12-08 14:02:45 +0000
commit87837df807eeea39c08033a0f5b9a055926f6ae4 (patch)
treec3c69a59e3e0b3cf4f038019561138a04f9afffb
parent03807acfa968da58d3596a5b23e2aeabbb984fa8 (diff)
acpi.c: Fix generating pointer to cb_tables located >4G
Use the generic resource_consumer method which works for memory both above and below 4G. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I1bc553b18d08cee502b765166227810f8e619631 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76181 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
-rw-r--r--src/acpi/acpi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index db9c31646d..beba5fdb3a 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -300,7 +300,9 @@ static void acpi_ssdt_write_cbtable(void)
acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON);
acpigen_write_name("_CRS");
acpigen_write_resourcetemplate_header();
- acpigen_write_mem32fixed(0, base, size);
+ acpigen_resource_consumer_mmio(base, base + size - 1,
+ MEM_RSRC_FLAG_MEM_READ_ONLY
+ | MEM_RSRC_FLAG_MEM_ATTR_CACHE);
acpigen_write_resourcetemplate_footer();
acpigen_pop_len();
}