Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41849 )
Change subject: cpu/x86/mtrr: add helper for setting multiple MTRRs ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41849/2/src/cpu/x86/mtrr/earlymtrr.... File src/cpu/x86/mtrr/earlymtrr.c:
https://review.coreboot.org/c/coreboot/+/41849/2/src/cpu/x86/mtrr/earlymtrr.... PS2, Line 72: ctx->max_var_mtrrs = get_var_mtrr_count();
In the end I wanted to leave it to the callers because setting the MSRs directly may not be the intention. postcar_loader doesn't directly manipulate the MSRs, e.g
That makes sense. I was thinking that the caller could pass in a flag to ask var_mtrr_context_init() to do the clearing. But, it can as well call clear_all_var_mtrr() itself too.