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:
(1 comment)
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?
Yes.
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.
Do you mean memmap.c logic will take care of alignment part?
All the algorithms in question already try to fit the requested address and size to meet mtrr natural alignment requirements. I'm suggesting that if there is an address which isn't aligned to high enough granularity we should just have cbmem_top() enforce a better alignment to optimize for MTRR usage at the expense of stranded DRAM. That said, it's easier said than done when it comes to FSP deciding memory maps and needing to deal w/ the reserved space.