summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2011-03-06 19:06:48 -0500
committerKevin O'Connor <kevin@koconnor.net>2011-03-06 19:06:48 -0500
commit424f217fe01ed7e2398d9e56a2803f86856cdc06 (patch)
tree07e0f403088fa1f5d066f09f64d9d9704257e9e2
parentfb2f10d074091573b2493f8bddedf3e9182d8313 (diff)
Add config option to disable MTRR initialization.
Some versions of Bochs don't like the MTRR initialization, so add CONFIG_MTRR_INIT to control whether SeaBIOS will touch the MTRRs.
-rw-r--r--src/Kconfig6
-rw-r--r--src/mtrr.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/Kconfig b/src/Kconfig
index fca73e4..f064b27 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -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"
diff --git a/src/mtrr.c b/src/mtrr.c
index ed239c8..0502c18 100644
--- a/src/mtrr.c
+++ b/src/mtrr.c
@@ -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;