Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Grzegorz Bernacki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74779 )
Change subject: soc/amd/common/block/graphics: Add missing cbfs_unmap() ......................................................................
soc/amd/common/block/graphics: Add missing cbfs_unmap()
cbfs_map() can allocate memory, so cbfs_unmap() should be called before leaving the function.
BUG=278264488 TEST=Build and run with additional debug prints added to confirm that data are correctly unmapped
Change-Id: Ie6fbbfd36f0974551befef4d08423a8148e151e7 Signed-off-by: Grzegorz Bernacki bernacki@google.com --- M src/soc/amd/common/block/graphics/graphics.c 1 file changed, 30 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/74779/1
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index cc52053..abc5eee 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -157,11 +157,21 @@ return; } rom = pci_rom_probe(dev); - if (rom == NULL) + if (rom == NULL) { + printk(BIOS_ERR, "%s: Unable to find ROM for %s\n", + __func__, dev_path(dev)); + timestamp_add_now(TS_OPROM_COPY_END); return; + } + ram = pci_rom_load(dev, rom); - if (ram == NULL) - return; + if (ram == NULL) { + printk(BIOS_ERR, "%s: Unable to load ROM for %s\n", + __func__, dev_path(dev)); + } + + pci_rom_free(rom); + timestamp_add_now(TS_OPROM_COPY_END); }