haswell: romstage: pass stack pointer and MTRRs
Instead of hard coding the policy for the stack and MTRR values after the cache-as-ram is torn down, allow for the C code to pass those policies back to the cache-as-ram assembly file. That way, ramstage relocation can use a different stack as well as different MTRR policies. Change-Id: Ied024d933f96a12ed0703c51c506586f4b50bd14 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/2755 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Ronald G. Minnich
parent
a267161362
commit
38d9423dbe
@@ -113,6 +113,22 @@ struct romstage_params {
|
||||
};
|
||||
void mainboard_romstage_entry(unsigned long bist);
|
||||
void romstage_common(const struct romstage_params *params);
|
||||
/* romstage_main is called from the cache-as-ram assembly file. The return
|
||||
* value is the stack value to be used for romstage once cache-as-ram is
|
||||
* torn down. The following values are pushed onto the stack to setup the
|
||||
* MTRRs:
|
||||
* +0: Number of MTRRs
|
||||
* +4: MTTR base 0 31:0
|
||||
* +8: MTTR base 0 63:32
|
||||
* +12: MTTR mask 0 31:0
|
||||
* +16: MTTR mask 0 63:32
|
||||
* +20: MTTR base 1 31:0
|
||||
* +24: MTTR base 1 63:32
|
||||
* +28: MTTR mask 1 31:0
|
||||
* +32: MTTR mask 1 63:32
|
||||
* ...
|
||||
*/
|
||||
void * __attribute__((regparm(0))) romstage_main(unsigned long bist);
|
||||
#endif
|
||||
|
||||
#ifdef __SMM__
|
||||
|
Reference in New Issue
Block a user