[coreboot] [PATCH] early_mtrr_init is broken, comment it out

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Dec 10 12:57:08 CET 2008

early_mtrr_init() nukes all MTRRs including those which we use for CAR.
That means if it ever gets called while CAR is active, our stack will be
dropped and mayhem will ensue.
Besides that, it just replicated stage0.S functionality which already
nukes all MTRRs before enabling CAR.

We could move XIP ROM caching from stage0.S to early_mtrr_init(). It
would probably slow down booting a bit, but the amount of asm code would
be reduced.

Thanks to Corey for telling me that early_mtrr_init() broke booting for him.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: corebootv3-kill_early_mtrr_init/arch/x86/stage1_mtrr.c
--- corebootv3-kill_early_mtrr_init/arch/x86/stage1_mtrr.c	(Revision 1066)
+++ corebootv3-kill_early_mtrr_init/arch/x86/stage1_mtrr.c	(Arbeitskopie)
@@ -67,6 +67,11 @@
+/* early_mtrr_init was only usable for ROMCC compiled code. It nukes CAR.
+ * The only remaining purpose would be to enable ROM caching here instead of
+ * in stage0.S and even that is debatable.
+ */
+#if 0
 /* the fixed and variable MTTRs are power-up with random values,
  * clear them to MTRR_TYPE_UNCACHEABLE for safty.
@@ -130,6 +135,7 @@
 int early_mtrr_init_detected(void)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: linuxbios3_kill_early_mtrr_init.diff
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081210/ccfa47c2/attachment.diff>

More information about the coreboot mailing list