Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38692 )
Change subject: soc/amd/picasso: Cache romstage in RAM ......................................................................
Patch Set 1:
Patch Set 1:
Is doing this in the bootblock as part of the platform_prog_run hook in bootblock not a better idea? That way the romstage is cached for the full extend of its execution.
Hmm, they the hook seems very promising. The types, name and entry look like what I expect but I'm not seeing the stage size anywhere. The comment in program_loading.h says "The region_device is the source of the program content to load." however in looking at parameters passed for loading romstage, the rdev.offset = entry = CONFIG_ROMSTAGE_ADDR. The rdev.size isn't particularly recognizable.
BTW, using the hook looks to be better for caching the ramstage target area and TSEG as well.
What do you think about CB:38728 as a different approach?