Attention is currently required from: Shelley Chen, Martin L Roth.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/69486 )
Change subject: lib/fmap.c: Show error on fmd flash size mismatch with Kconfig ......................................................................
Patch Set 1: Code-Review+2
(4 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/69486/comment/e419ce53_f9b9b723 PS1, Line 14: in helping to eliminate the confusion. Not really sure what more there needs to be done, I think this should report the problem reliably?
Patchset:
PS1:
This needs a few boards fixed apparantly but the change is good.
On Herobrine there's a weird situation where some of the early test boards were built by Qualcomm with a larger flash than intended, but we wanted to have it keep using the same flash layout as the other boards of the family -- so the simple hack was to just keep using the 8MB flash map on the 64MB flash. But I understand that it's probably better not to allow such a configuration to prevent mistakes.
Looks like we're preprocessing .fmd files, so I think it should be as simple as changing the `FLASH@0x0 8M` to `FLASH@0x0 CONFIG_ROM_SIZE` (or do an `#if CONFIG_BOARD_GOOGLE_HOGLIN || CONFIG_BOARD_GOOGLE_PIGLIN`, if we want it to be more explicit).
File src/lib/fmap.c:
https://review.coreboot.org/c/coreboot/+/69486/comment/1188863c_f085ef6b PS1, Line 23: #ifdef FMAP_SECTION_FLASH_SIZE Why would this ever not be defined? We rely on FMAP_OFFSET being available below as well, and this comes from the same header, so I think you can assume it is always available.
https://review.coreboot.org/c/coreboot/+/69486/comment/8cceeec2_e3b0cb9e PS1, Line 25: rom nit: "ROM"