Skip to contentSkip to conversation

Add boot option to disable MTRR clipping

PATCH New George Dunlap 1 participant 1 message Apr 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add boot option to disable MTRR clipping

In the unusual event that the range clipping causes problems, or people just want to use all of their memory even if it's uncached, add a boot option to disable MTRR clipping.

xen/arch/x86/e820.c +10 -3
diff -r 7809e0941b38 xen/arch/x86/e820.c
@@ -15,6 +15,10 @@
 static void parse_mem(char *s) { opt_mem = parse_size_and_unit(s, NULL); }
 custom_param("mem", parse_mem);
 
+/* opt_nomtrr_check: Don't clip ram to highest cacheable MTRR. */
+static int __initdata opt_no_mtrr_check = 0;
+boolean_param("nomtrr", opt_no_mtrr_check);
+
 struct e820map e820;
 
 static void __init add_memory_region(unsigned long long start,
@@ -444,9 +448,12 @@
 
     reserve_dmi_region();
 
-    top_of_ram = mtrr_top_of_ram();
-    if ( top_of_ram )
-        clip_to_limit(top_of_ram, "MTRRs do not cover all of memory.");
+    if ( !opt_no_mtrr_check )
+    {
+        top_of_ram = mtrr_top_of_ram();
+        if ( top_of_ram )
+            clip_to_limit(top_of_ram, "MTRRs do not cover all of memory.");
+    }
 }
 
 int __init e820_change_range_type(

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel