Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35029 )
Change subject: soc/intel/{cnl, dnv, icl, skl}: Make top_of_ram align ......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://review.coreboot.org/c/coreboot/+/35029/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35029/1//COMMIT_MSG@10 PS1, Line 10: alignment requirments. What is the further motivation here? Reducing variable MTRR usage? The algorithms take into account natural alignment. However, if the memory map is not aligned well then cbmem_top() should be the entity providing the alignment.
https://review.coreboot.org/c/coreboot/+/35029/1/src/soc/intel/cannonlake/ro... File src/soc/intel/cannonlake/romstage/romstage.c:
https://review.coreboot.org/c/coreboot/+/35029/1/src/soc/intel/cannonlake/ro... PS1, Line 162: top_of_ram = ALIGN_DOWN((uintptr_t)cbmem_top(), top_of_ram_size);
It does what the comment says, at least 8 MiB below, at most 8 MiB above cbmem_top() will be WB. […]
I really don't see what this change provides. It doesn't guarantee the memory we're actually using is covered. It's optimizing for MTRR usage while not guaranteeing the region we're using is covered.