Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43488 )
Change subject: lib: Remove corrupted fmap cache error for psp_verstage ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43488/1/src/lib/fmap.c File src/lib/fmap.c:
https://review.coreboot.org/c/coreboot/+/43488/1/src/lib/fmap.c@60 PS1, Line 60: (ENV_SEPARATE_VERSTAGE && CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)))) {
It's definitely beneficial to use the cache if possible. […]
We will know at build time whether or not the MP2 is being used. If it is, we can only pass the 8k workbuf. I expect that will be the case on future platforms as the MP2 memory is already used for S0I3 resume so won't be available for verstage.
What I meant by saying that we "can't guarantee" that the 32k we currently have is available is that we can have one build where it is available, and another build where it isn't. We get the available size at runtime though, not at build time.
I'll add the code to pass the fmap cache if memory is available. I do think that we should consider the PSP flow to be outside the coreboot flow for many things since it has its own memory space. Things like this buffer may need to be looked at as having 2 'first' stages, one for each different processor that coreboot is running on.
I'll see what I can do about making an appropriate ENV_FIRST_STAGE.