soc/amd/mendocino: Unmap hash table after usage

Earlier the entire SPI ROM is mapped at the start of verstage and then
unmapped at the end of verstage. With CB:74606, this behavior has
changed. So unmap the hash table CBFS file after usage.

BUG=b:240664755
TEST=Build and boot to OS in Skyrim. Perform cold, warm reboots and
suspend/resume cycles for 50 iterations each. Ensured that there is no
impact to boot time.

Change-Id: I5c605f8ba8bbd571b589b3cdf91e9cc71d711c1c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75092
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Karthikeyan Ramasubramanian 2023-05-09 11:23:02 -06:00 committed by Felix Held
parent 6f1b03b8f6
commit aa86e5f006
1 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,7 @@ void update_psp_fw_hash_table(const char *fname)
printk(BIOS_ERR, "Too many entries in AMD Firmware hash table"
" (SHA256:%d, SHA384:%d)\n",
hash_table.no_of_entries_256, hash_table.no_of_entries_384);
cbfs_unmap(spi_ptr);
return;
}
@ -52,6 +53,7 @@ void update_psp_fw_hash_table(const char *fname)
printk(BIOS_ERR, "No entries in AMD Firmware hash table"
" (SHA256:%d, SHA384:%d)\n",
hash_table.no_of_entries_256, hash_table.no_of_entries_384);
cbfs_unmap(spi_ptr);
return;
}
@ -67,6 +69,7 @@ void update_psp_fw_hash_table(const char *fname)
memcpy(hash_384, spi_ptr, len);
svc_set_fw_hash_table(&hash_table);
cbfs_unmap(spi_ptr);
}
uint32_t update_psp_bios_dir(uint32_t *psp_dir_offset, uint32_t *bios_dir_offset)