diff --git a/arch/x86/stage1_mtrr.c b/arch/x86/stage1_mtrr.c index 56330660d5..2810348c26 100644 --- a/arch/x86/stage1_mtrr.c +++ b/arch/x86/stage1_mtrr.c @@ -106,6 +106,10 @@ void do_early_mtrr_init(const unsigned long *mtrr_msrs) } +/** + * Call this function early in stage1 to enable mtrrs, which will ensure + * caching of ROM + */ void early_mtrr_init(void) { static const unsigned long mtrr_msrs[] = { diff --git a/arch/x86/via/stage1.c b/arch/x86/via/stage1.c index d3b14c2e79..621ddfa933 100644 --- a/arch/x86/via/stage1.c +++ b/arch/x86/via/stage1.c @@ -30,21 +30,6 @@ #include #include -#ifdef NO_IDEA_WHETHER_THIS_IS_RELEVANT_ON_C7 -/** - * Set the MTRR for initial ram access. - * be warned, this will be used by core other than core 0/node 0 or core0/node0 when cpu_reset. - * This warning has some significance I don't yet understand. - */ -void set_init_ram_access(void) -{ - set_var_mtrr(0, 0x00000000, CONFIG_CBMEMK << 10, MTRR_TYPE_WRBACK); -} -#endif - -#define __stringify_1(x) #x -#define __stringify(x) __stringify_1(x) - /** * Disable Cache As RAM (CAR) after memory is setup. */ diff --git a/mainboard/via/epia-cn/Makefile b/mainboard/via/epia-cn/Makefile index 073a7fa1b0..7ba6259c4d 100644 --- a/mainboard/via/epia-cn/Makefile +++ b/mainboard/via/epia-cn/Makefile @@ -18,7 +18,9 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -STAGE0_MAINBOARD_SRC := $(src)/mainboard/$(MAINBOARDDIR)/stage1.c +STAGE0_MAINBOARD_SRC := $(src)/lib/clog2.c \ + $(src)/arch/x86/stage1_mtrr.c \ + $(src)/mainboard/$(MAINBOARDDIR)/stage1.c INITRAM_SRC = $(src)/mainboard/$(MAINBOARDDIR)/initram.c \ $(src)/northbridge/via/cn700/initram.c \ diff --git a/mainboard/via/epia-cn/stage1.c b/mainboard/via/epia-cn/stage1.c index aaed1d30cf..309d846a25 100644 --- a/mainboard/via/epia-cn/stage1.c +++ b/mainboard/via/epia-cn/stage1.c @@ -36,10 +36,15 @@ void stop_ap(void) void hardware_stage1(void) { + void early_mtrr_init(void); void vt1211_enable_serial(u8 dev, u8 serial, u16 iobase); u32 dev; post_code(POST_START_OF_MAIN); + + /* do this or watch the system run slowly */ + early_mtrr_init(); + vt1211_enable_serial(0x2e, 2, 0x3f8); /* Enable multifunction for northbridge. */