Add config option to disable MTRR initialization.
authorKevin O'Connor <kevin@koconnor.net>
Mon, 7 Mar 2011 00:06:48 +0000 (19:06 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 7 Mar 2011 00:06:48 +0000 (19:06 -0500)
Some versions of Bochs don't like the MTRR initialization, so add
CONFIG_MTRR_INIT to control whether SeaBIOS will touch the MTRRs.

src/Kconfig
src/mtrr.c

index fca73e44234b8b060d3d8f7b99d5468a13f09b86..f064b27a6600163be6003c295d39a81b64b4fc31 100644 (file)
@@ -194,6 +194,12 @@ menu "Hardware support"
         default y
         help
             Support System Management Mode (on emulators).
+    config MTRR_INIT
+        depends on !COREBOOT
+        bool "Initialize MTRRs"
+        default y
+        help
+            Initialize the Memory Type Range Registers (on emulators).
 endmenu
 
 menu "BIOS interfaces"
index ed239c81b1489b79f0b97709f8f1c6771dcb4623..0502c1835403f56461bd2e39d1e6f8658fd73015 100644 (file)
@@ -32,7 +32,7 @@
 
 void mtrr_setup(void)
 {
-    if (CONFIG_COREBOOT)
+    if (!CONFIG_MTRR_INIT || CONFIG_COREBOOT)
         return;
 
     u32 eax, ebx, ecx, edx, cpuid_features;