Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34754 )
Change subject: soc/intel/cannonlake: Add provision to skip postcar and load ramstage ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34754/2/src/soc/intel/cannonlake/ro... File src/soc/intel/cannonlake/romstage/romstage.c:
https://review.coreboot.org/c/coreboot/+/34754/2/src/soc/intel/cannonlake/ro... PS2, Line 143: set_var_mtrr(mtrr, base, size, MTRR_TYPE_WRPROT);
Was this 'first way' available for review?
no, i didn't pushed that CL
I am explicitly saying to program the MTRRs (even in C) without tearing down the CAR.
yes, got your point, you are telling to perform below MTRRs in romstage itself before tearing down the car. 1. set_var_mtrr(<number>, top_of_stack, size, MTRR_TYPE_WRPROT); 2. set_var_mtrr(<number>, ROM start address, ROM size, MTRR_TYPE_WRPROT);
if i look at romstage MTRR snapshot, i could see it always has #2 MTRR programmed also additionally it has DACHE_RAM_BASE/SIZE in another MTRR.
So, additionally i only need #1 MTRR programming which i have done here. Did i miss anything ?
And then reuse the same frame in ramstage to teardown CAR after stack switch.
yes, doing the same using exit_car.S in front of ramstage