blob: 0dd02ce355658f935412171d8e4730febb363f80 [file] [log] [blame]
Aaron Durbina0a37272014-08-14 08:35:11 -05001#ifndef _CPU_INTEL_ROMSTAGE_H
2#define _CPU_INTEL_ROMSTAGE_H
3
Kyösti Mälkkie325b222016-06-17 11:04:37 +03004#include <arch/cpu.h>
5
Kyösti Mälkkie325b222016-06-17 11:04:37 +03006void mainboard_romstage_entry(unsigned long bist);
Kyösti Mälkkia4ffe9d2016-06-27 13:24:11 +03007
8/* romstage_main is called from the cache-as-ram assembly file. The return
9 * value is the stack value to be used for romstage once cache-as-ram is
10 * torn down. The following values are pushed onto the stack to setup the
11 * MTRRs:
12 * +0: Number of MTRRs
13 * +4: MTRR base 0 31:0
14 * +8: MTRR base 0 63:32
15 * +12: MTRR mask 0 31:0
16 * +16: MTRR mask 0 63:32
17 * +20: MTRR base 1 31:0
18 * +24: MTRR base 1 63:32
19 * +28: MTRR mask 1 31:0
20 * +32: MTRR mask 1 63:32
21 * ...
22 */
23void *setup_stack_and_mtrrs(void);
24
25/* romstage_main is called from the cache-as-ram assembly file to prepare
26 * CAR stack guards.*/
Lee Leahy6d71a432017-03-07 15:24:16 -080027asmlinkage void *romstage_main(unsigned long bist);
Kyösti Mälkkia4ffe9d2016-06-27 13:24:11 +030028/* romstage_after_car() is the C function called after cache-as-ram has
29 * been torn down. It is responsible for loading the ramstage. */
30void asmlinkage romstage_after_car(void);
Kyösti Mälkkie325b222016-06-17 11:04:37 +030031
Aaron Durbina0a37272014-08-14 08:35:11 -050032#endif /* _CPU_INTEL_ROMSTAGE_H */