Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46435 )
Change subject: cpu/x86/mtrr: add support for address space higher than 16TiB ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46435/4/src/cpu/x86/mtrr/mtrr.c File src/cpu/x86/mtrr/mtrr.c:
https://review.coreboot.org/c/coreboot/+/46435/4/src/cpu/x86/mtrr/mtrr.c@120 PS4, Line 120: 1 Update this as well?
https://review.coreboot.org/c/coreboot/+/46435/4/src/cpu/x86/mtrr/mtrr.c@463 PS4, Line 463: return fms(x >> 32) + 32; Did you double check the semantics of fls and fms? I recall those being sorta odd.
Looks like fms() returns 0 on no bits set and fls() returns 32 when not bits set.
I think you have the conditions wrong for the failing cases. Please double check and confirm.