Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37190 )
Change subject: soc/intel/common/cache_as_ram.S: Add macro to find a free MTRR ......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/c/coreboot/+/37190/4/src/soc/intel/common/block/... File src/soc/intel/common/block/cpu/car/cache_as_ram.S:
https://review.coreboot.org/c/coreboot/+/37190/4/src/soc/intel/common/block/... PS4, Line 27: * macro: find_free_mtrr : * Clobbers %eax, %ebx, %ecx, %edx. : * If not found %ebx is 0. : * If found MTRR_BASE is at %ecx.
Note: the MTRR MSRs are contiguous, and alternating between BASE and MASK: MTRR_PHYS_MASK(0) = MTRR_PHYS_BASE(0) + 1 MTRR_PHYS_BASE(n) = MTRR_PHYS_BASE(0) + 2 * n MTRR_PHYS_MASK(n) = MTRR_PHYS_MASK(0) + 2 * n
That applies to the whole file, not just this macro.
https://review.coreboot.org/c/coreboot/+/37190/4/src/soc/intel/common/block/... PS4, Line 43: 2f
right. […]
Are you sure one can use names in an assembler macro?