Martin Roth has posted comments on this change. ( https://review.coreboot.org/18381 )
Change subject: soc/intel/common/block: Add cache as ram init and teardown code ......................................................................
Patch Set 36:
(9 comments)
Some nits. Feel free to fix these in a follow-on patch if you want.
https://review.coreboot.org/#/c/18381/36/src/soc/intel/common/block/cpu/Kcon... File src/soc/intel/common/block/cpu/Kconfig:
PS36, Line 13: mode remove "mode" so we're not saying "non-evict mode mode"
PS36, Line 13: block blocked
PS36, Line 20: set up portion set up a portion
PS36, Line 21: use remainder use the remainder
PS36, Line 27: Current limitation NEM mode is that code and data size is derive : from the need not to spill out any modified line: as in NEM mode : there is no memory behind, the modified data will be lost and NEM : results will be inconsistent, hence NEM ENHANCED mode ensure to : have, some “magic” way to guarantee that modified data is always : kept in cache while clean data is replaced. Maybe: A current limitation of NEM (Non-Evict mode) is that code and data sizes are derived from the requirement to not write out any modified cache line.
With NEM, if there is no physical memory behind the cached area, the modified data will be lost and NEM results will be inconsistent. ENHANCED NEM guarantees that modified data is always kept in the cache while clean data is replaced.
https://review.coreboot.org/#/c/18381/36/src/soc/intel/common/block/cpu/car/... File src/soc/intel/common/block/cpu/car/cache_as_ram.S:
PS36, Line 108: /* Configure CAR region as write-back (WB) */ : mov $MTRR_PHYS_BASE(0), %ecx : mov $CONFIG_DCACHE_RAM_BASE, %eax : or $MTRR_TYPE_WRBACK, %eax : xor %edx,%edx : indent with tabs
PS36, Line 124: /* Configure CAR region as write-back (WB) */ : mov $MTRR_PHYS_BASE(0), %ecx : mov $CONFIG_DCACHE_RAM_BASE, %eax : or $MTRR_TYPE_WRBACK, %eax : xor %edx,%edx : wrmsr indent with tabs
https://review.coreboot.org/#/c/18381/36/src/soc/intel/skylake/Kconfig File src/soc/intel/skylake/Kconfig:
PS36, Line 269: Current limitation NEM mode is that code and data size is derive : from the need not to spill out any modified line: as in NEM mode : there is no memory behind, the modified data will be lost and NEM : results will be inconsistent, hence NEM ENHANCED mode ensure to : have, some “magic” way to guarantee that modified data is always : kept in cache while clean data is replaced. see previous comment
PS36, Line 280: Tear Down lowercase - tear down