Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35377 )
Change subject: lib/fmap: Cache FMAP in cbmem ......................................................................
Patch Set 8:
(5 comments)
https://review.coreboot.org/c/coreboot/+/35377/7/src/lib/fmap.c File src/lib/fmap.c:
https://review.coreboot.org/c/coreboot/+/35377/7/src/lib/fmap.c@42 PS7, Line 42: if (cbmem_possibly_online()) {
Saves 5 more instructions for pre-RAM stages, I guess?
Yes, that will remove the caching code in bootblock, verstage and SMM, as it doesn't work anyway.
https://review.coreboot.org/c/coreboot/+/35377/7/src/lib/fmap.c@45 PS7, Line 45: fmap_cache
just use car_get_var(&fmap_cache);
Done
https://review.coreboot.org/c/coreboot/+/35377/7/src/lib/fmap.c@47 PS7, Line 47: if (!rdev_chain(fmrd, &cache->rdev, 0, region_device_sz(&cache->rdev)))
Is there a point in checking this rather than just 'return rdev_chain(... […]
Done
https://review.coreboot.org/c/coreboot/+/35377/7/src/lib/fmap.c@212 PS7, Line 212: fmap_cache_setup_late
nit: I think register_cache() or find_cache() or something would be more clear than setup_late().
Done
https://review.coreboot.org/c/coreboot/+/35377/7/src/lib/fmap.c@223 PS7, Line 223: mdev
Why can't we use the global directly? I don't understand why we'd be copying objects from local to g […]
Done