Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30872 )
Change subject: arch/x86: Add symbols for CAR MTRRs in linker script ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/30872/5/src/arch/x86/car.ld File src/arch/x86/car.ld:
https://review.coreboot.org/c/coreboot/+/30872/5/src/arch/x86/car.ld@90 PS5, Line 90: _xip_mtrr_mask = ~(MAX(4096, _xip_program_sz_log2) - 1);
The references are in couple cache_as_ram.S files and I don't have a single good guard ready at hand. It would be either new Kconfig or logical or of selected CPU_INTEL_SLOT_x and CPU_INTEL_SOCKET_x.
Would you accept _booblock_mtrr_mask exposed unconditionally?
The xip symbols are conditional on !CONFIG(NO_XIP_EARLY_STAGES). They shouldn't be unconditionally exposed.
I wouldn't be opposed to a Kconfig indicating 'expose symbols for MTRR init' because it'd be easy for auditing purposes, and it'd be explicit about intention of relying on these symbols.