Wim Vervoorn has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41694 )
Change subject: [NOTFORMERGE] mb/facebook/fbg1701: Remove C_ENV_BOOTBLOCK_SIZE ......................................................................
Patch Set 1:
Patch Set 1:
Patch Set 1:
Patch Set 1:
Franw, Wim: I am looking at removing global C_ENV_BOOTBLOCK_SIZE and top-align bootblock for better SPI flash utilisation. CB:37895 patchset #9 would probably break measured boot since C_ENV_BOOTBLOCK_SIZE is no longer utilised.
Kyosti, I haven't looked into the details. Is there an alternative way to determine the size of the bootblock? Is the size of the bootblock still controlled somehow?
There would be no static value to use as an initializer, size of bootblock would grow dynamically based on the features one has enabled.
I can think of two solutions:
a) Get bootblock start and size from CBFS, something like:
VERIFY_FILE, "bootblock", CBFS_TYPE_BOOTBLOCK
b) Maintain C_ENV_BOOTBLOCK_SIZE under arch/x86 such that when it has a non-zero value, start of bootblock is extended to that size.
I have looked at it. I think the best solution is your 2nd option. This will work for us and it allows you to control bootblock size in case the top block of the flash can be swapped or if you want to permanently lock it for some reason.