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>
This commit is contained in:
Arthur Heymans 2023-06-29 21:09:52 +02:00 committed by Lean Sheng Tan
parent 03807acfa9
commit 87837df807
1 changed files with 3 additions and 1 deletions

View File

@ -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();
}