Attention is currently required from: Jason Glenesk, Raul Rangel, Marshall Dawson. Hello Jason Glenesk, Raul Rangel, Marshall Dawson,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/57068
to look at the new patch set (#2).
Change subject: soc/amd/common/fsp/fsp_validate: check FSP-M binary size ......................................................................
soc/amd/common/fsp/fsp_validate: check FSP-M binary size
When modules are added to the FSP and they won't fit into the FSP binary any more, the size can be increased in the FSP build. Especially in the case of debug builds the increased size might not fit into the memory region it gets put into which starts at FSP_M_ADDR and has a size of FSP_M_SIZE. SoCs can implement the soc_validate_fsp_version function that ends up being called by the FSP driver in romstage to check the FSP version, but since the image size is also present in the header we can also implement and use this function to check if it fits into the reserved region. Since the FSP-M memory region is located after romstage loading it won't clobber the romstage code where we do the check.
BUG=b:186149011 TEST=Mandolin still boots fine with the patch applied. When as a test the FSP_M_SIZE Kconfig option in soc/amd/picasso is decreased to 0x10000 which is by far not enough for the decompressed FSP-M binary to fit into it prints the newly added error message on the console and then stops.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I9b74a2d03993ba50b166eb6e87d4e57b93afc069 --- M src/soc/amd/common/fsp/Makefile.inc A src/soc/amd/common/fsp/fsp_validate.c 2 files changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/57068/2