Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44196 )
Change subject: mrc_cache: Update mrc_cache data in romstage ......................................................................
Patch Set 22:
(6 comments)
https://review.coreboot.org/c/coreboot/+/44196/22/src/drivers/mrc_cache/mrc_... File src/drivers/mrc_cache/mrc_cache.c:
https://review.coreboot.org/c/coreboot/+/44196/22/src/drivers/mrc_cache/mrc_... PS22, Line 120: nit: irrelevant change.
https://review.coreboot.org/c/coreboot/+/44196/22/src/drivers/mrc_cache/mrc_... PS22, Line 314: struct const struct
https://review.coreboot.org/c/coreboot/+/44196/22/src/drivers/mrc_cache/mrc_... PS22, Line 337: ( If need_update is set to true above, there is no need to compare the data.
if (!need_update && memcmp(new_data, data_mapping, new_data_size)) need_update = true;
Or you can just extract the comparison into a function of its own:
mapping = rdev_mmap_full(rdev); if (mapping == NULL) { ... } need_update = mrc_compare(mapping, new_md, new_data, new_data_size);
rdev_munmap(rdev, mapping);
return need_update;
https://review.coreboot.org/c/coreboot/+/44196/22/src/drivers/mrc_cache/mrc_... PS22, Line 422: new_md, : new_data, new_data_size) nit: I think this might fit on a single line with 96-column limit?
https://review.coreboot.org/c/coreboot/+/44196/22/src/drivers/mrc_cache/mrc_... PS22, Line 602: MRC_WRITE_NV_LATE As per the latest comment, this will have to be MRC_STASH_TO_CBMEM
https://review.coreboot.org/c/coreboot/+/44196/22/src/drivers/mrc_cache/mrc_... PS22, Line 636: MRC_WRITE_NV_LATE MRC_STASH_TO_CBMEM