Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36657 )
Change subject: lib/fmap: Add optional pre-RAM cache ......................................................................
Patch Set 4:
(6 comments)
https://review.coreboot.org/c/coreboot/+/36657/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/36657/4//COMMIT_MSG@10 PS4, Line 10: CBMEM CBMEM cache for FMAP?
https://review.coreboot.org/c/coreboot/+/36657/4/src/lib/cbfs.c File src/lib/cbfs.c:
https://review.coreboot.org/c/coreboot/+/36657/4/src/lib/cbfs.c@299 PS4, Line 299: fmap_region.offset + fmap_region.size; Could you please use region_offset(&fmap_region) and region_sz(&fmap_region). We could introduce a region_end() helper to yield the calculation as well.
https://review.coreboot.org/c/coreboot/+/36657/4/src/lib/fmap.c File src/lib/fmap.c:
https://review.coreboot.org/c/coreboot/+/36657/4/src/lib/fmap.c@47 PS4, Line 47: static int check_signature(struct fmap *fmap) const struct
https://review.coreboot.org/c/coreboot/+/36657/4/src/lib/fmap.c@52 PS4, Line 52: static void report(struct fmap *fmap) const struct
https://review.coreboot.org/c/coreboot/+/36657/4/src/lib/fmap.c@68 PS4, Line 68: "WARNING: Post-RAM FMAP access too early for cache!\n"); nit: function is called setup_preram_cache() but clearly we can get here post ram. It seems a little confusing.
https://review.coreboot.org/c/coreboot/+/36657/4/src/lib/fmap.c@123 PS4, Line 123: region_device_sz(&cache->rdev)); fyi: https://review.coreboot.org/c/coreboot/+/36683