Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44782 )
Change subject: fw_config: Add caching to successfully probed fields ......................................................................
Patch Set 3:
(4 comments)
https://review.coreboot.org/c/coreboot/+/44782/1/src/lib/fw_config.c File src/lib/fw_config.c:
https://review.coreboot.org/c/coreboot/+/44782/1/src/lib/fw_config.c@13 PS1, Line 13: #if ENV_RAMSTAGE
After moving things around I think you can just merge this to the ENV_RAMSTAGE block below.
Not even needed now, after moving caching to fw_config_init(), the linker does a fantastic job removing the unneeded statics from the !RAMSTAGE .o file.
https://review.coreboot.org/c/coreboot/+/44782/1/src/lib/fw_config.c@20 PS1, Line 20: static struct fw_config cached_configs[MAX_CACHE_ELEMENTS];
If you tie this to fw_config_init() you could just store pointers here, rather than having to memcpy […]
Done
https://review.coreboot.org/c/coreboot/+/44782/1/src/lib/fw_config.c@21 PS1, Line 21: static size_t cache_count;
that's exactly what I was trying to remember the intrinsic for and I couldn't to do exactly what you […]
Done
https://review.coreboot.org/c/coreboot/+/44782/1/src/lib/fw_config.c@112 PS1, Line 112: match = true;
Although this does all become a lot simpler if it's just done in _init()... […]
Much nicer, I'm convinced.