Grzegorz Bernacki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74715 )
Change subject: acpi: Add missing cbfs_unmap() ......................................................................
acpi: Add missing cbfs_unmap()
cbfs_map() can allocate memory, so cbfs_unmap() should be called before leaving the function.
BUG=278264488 TEST=Built and run with additional debugs on Skyrim device to confirm that data are correctly unmapped
Change-Id: Ibf7ba6842f42404ad8bb415f8e7fda10403cbe2e Signed-off-by: Grzegorz Bernacki bernacki@google.com --- M src/acpi/acpi.c 1 file changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/74715/1
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c index fb9a758..c0cb554 100644 --- a/src/acpi/acpi.c +++ b/src/acpi/acpi.c @@ -1853,6 +1853,7 @@ || dsdt_file->length < sizeof(acpi_header_t) || memcmp(dsdt_file->signature, "DSDT", 4) != 0) { printk(BIOS_ERR, "Invalid DSDT file, skipping ACPI tables\n"); + cbfs_unmap(dsdt_file); return current; }
@@ -1929,6 +1930,8 @@ dsdt->checksum = acpi_checksum((void *)dsdt, dsdt->length); }
+ cbfs_unmap(dsdt_file); + current = acpi_align_current(current);
printk(BIOS_DEBUG, "ACPI: * FADT\n");