Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44880 )
Change subject: security/intel/txt: Improve MTRR setup for GETSEC[ENTERACCS] ......................................................................
Patch Set 11:
(4 comments)
Looking good!
I'd think that passing a MTRR handof struct (maybe even reuse the one from postcar) and setting things up in C code could make our lives a lot easier?
https://review.coreboot.org/c/coreboot/+/44880/11/src/security/intel/txt/get... File src/security/intel/txt/getsec_enteraccs.S:
https://review.coreboot.org/c/coreboot/+/44880/11/src/security/intel/txt/get... PS11, Line 183: Use XMM to store local variables Maybe we should document that after all MTRR's are saved, the rest should be stackless?
https://review.coreboot.org/c/coreboot/+/44880/11/src/security/intel/txt/get... PS11, Line 195: /* Check if there are enough variable MTRRs to cache this size */ : popcnt %ebx, %edx : cmp %eax, %edx I guess some of the checks could be moved to C code before calling assembly? Probably a thing to do later on.
https://review.coreboot.org/c/coreboot/+/44880/11/src/security/intel/txt/get... PS11, Line 243: MTRR_HIGH_MASK Sidenote: This can be fetched dynamically (see CAR setups).
https://review.coreboot.org/c/coreboot/+/44880/11/src/security/intel/txt/get... PS11, Line 246: (1 << 11) just use MTRR_PHYS_MASK_VALID.