4343#include "southbridge/intel/lynxpoint/pch.h"
4444#include "southbridge/intel/lynxpoint/me.h"
4545#include <security/tpm/tspi.h>
46+ #include <cpu/intel/romstage.h>
4647
4748static inline void reset_system (void )
4849{
@@ -55,7 +56,7 @@ static inline void reset_system(void)
5556/* platform_enter_postcar() determines the stack to use after
5657 * cache-as-ram is torn down as well as the MTRR settings to use,
5758 * and continues execution in postcar stage. */
58- static void platform_enter_postcar (void )
59+ void platform_enter_postcar (void )
5960{
6061 struct postcar_frame pcf ;
6162 uintptr_t top_of_ram ;
@@ -80,34 +81,6 @@ static void platform_enter_postcar(void)
8081 run_postcar_phase (& pcf );
8182}
8283
83- asmlinkage void * romstage_main (unsigned long bist )
84- {
85- int i ;
86- const int num_guards = 4 ;
87- const u32 stack_guard = 0xdeadbeef ;
88- u32 * stack_base = (void * )(CONFIG_DCACHE_RAM_BASE +
89- CONFIG_DCACHE_RAM_SIZE -
90- CONFIG_DCACHE_RAM_ROMSTAGE_STACK_SIZE );
91-
92- printk (BIOS_DEBUG , "Setting up stack guards.\n" );
93- for (i = 0 ; i < num_guards ; i ++ )
94- stack_base [i ] = stack_guard ;
95-
96- mainboard_romstage_entry (bist );
97-
98- /* Check the stack. */
99- for (i = 0 ; i < num_guards ; i ++ ) {
100- if (stack_base [i ] == stack_guard )
101- continue ;
102- printk (BIOS_DEBUG , "Smashed stack detected in romstage!\n" );
103- }
104-
105- platform_enter_postcar ();
106-
107- /* We do not return here */
108- return NULL ;
109- }
110-
11184void romstage_common (const struct romstage_params * params )
11285{
11386 int boot_mode ;
0 commit comments