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 10:
(6 comments)
https://review.coreboot.org/c/coreboot/+/35377/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35377/4//COMMIT_MSG@14 PS4, Line 14: TODO: Is it secure to store FMAP in DRAM?
Don't we resume into DRAM (relocatable ramstage) anyway? Or am I confusing things there? […]
Done
https://review.coreboot.org/c/coreboot/+/35377/2/src/lib/coreboot_table.c File src/lib/coreboot_table.c:
https://review.coreboot.org/c/coreboot/+/35377/2/src/lib/coreboot_table.c@48... PS2, Line 489: void *fmap_cbmem = cbmem_add(CBMEM_ID_FMAP, region_device_sz(&fmrd));
I'll look into that
Done
https://review.coreboot.org/c/coreboot/+/35377/2/src/lib/coreboot_table.c@50... PS2, Line 501: memcpy(fmap_cbmem, fmap_reg, region_device_sz(&fmrd));
Please use rdev_read() instead of mmap so it isn't copied twice on non-x86 devices.
Done
https://review.coreboot.org/c/coreboot/+/35377/4/src/lib/fmap.c File src/lib/fmap.c:
https://review.coreboot.org/c/coreboot/+/35377/4/src/lib/fmap.c@32 PS4, Line 32: static struct fmap *fmap_c CAR_GLOBAL;
Leaving this in as there are still FSP1.0 platforms and AMD? that needs CAR_GLOBAL.
Done
https://review.coreboot.org/c/coreboot/+/35377/4/src/lib/fmap.c@104 PS4, Line 104: if (!car_get_var(fmap_c)) {
OK. It's certainly possible to cache things in SMM as well if one wanted. […]
Done
https://review.coreboot.org/c/coreboot/+/35377/4/src/lib/fmap.c@108 PS4, Line 108: /* Try to cache FMAP. Might fail if CBMEM isn't up yet. */
I tried to but with CAR_GLOBAL it's difficult to implement. […]
Done