Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35377 )
Change subject: coreboot_table: Add copy of FMAP ......................................................................
Patch Set 2:
(2 comments)
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)); Yay, more reserved memory that the OS will never get back...
Any chance I could persuade you to integrate this into the FMAP code as a cache, so that after CBMEM is up all the FMAP functions won't need to read from flash again every time they're called? That might help convince me that this is worth the cost... ;)
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.