]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.xen/xen3-patch-2.6.27.5-6
Imported linux-2.6.27.39 suse/xen patches.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.xen / xen3-patch-2.6.27.5-6
CommitLineData
2cb7cef9
BS
1From: Greg Kroah-Hartman <gregkh@suse.de>
2Subject: Linux 2.6.27.6
3
4Upstream 2.6.27.6 release from kernel.org
5
6Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
7
8Automatically created from "patches.kernel.org/patch-2.6.27.5-6" by xen-port-patches.py
9
10--- sle11-2009-02-16.orig/arch/x86/Kconfig 2009-02-16 16:33:55.000000000 +0100
11+++ sle11-2009-02-16/arch/x86/Kconfig 2009-02-16 16:49:20.000000000 +0100
12@@ -1147,6 +1147,7 @@ config HIGHPTE
13 config X86_RESERVE_LOW_64K
14 bool "Reserve low 64K of RAM on AMI/Phoenix BIOSen"
15 default y
16+ depends on !XEN
17 help
18 Reserve the first 64K of physical RAM on BIOSes that are known
19 to potentially corrupt that memory range. A numbers of BIOSes are
20--- sle11-2009-02-16.orig/arch/x86/kernel/setup-xen.c 2009-02-16 16:37:48.000000000 +0100
21+++ sle11-2009-02-16/arch/x86/kernel/setup-xen.c 2009-02-16 16:49:20.000000000 +0100
22@@ -645,6 +645,41 @@ static struct x86_quirks default_x86_qui
23
24 struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
25
26+#ifdef CONFIG_X86_RESERVE_LOW_64K
27+static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
28+{
29+ printk(KERN_NOTICE
30+ "%s detected: BIOS may corrupt low RAM, working it around.\n",
31+ d->ident);
32+
33+ e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED);
34+ sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
35+
36+ return 0;
37+}
38+#endif
39+
40+/* List of systems that have known low memory corruption BIOS problems */
41+static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
42+#ifdef CONFIG_X86_RESERVE_LOW_64K
43+ {
44+ .callback = dmi_low_memory_corruption,
45+ .ident = "AMI BIOS",
46+ .matches = {
47+ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
48+ },
49+ },
50+ {
51+ .callback = dmi_low_memory_corruption,
52+ .ident = "Phoenix BIOS",
53+ .matches = {
54+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
55+ },
56+ },
57+#endif
58+ {}
59+};
60+
61 /*
62 * Determine if we were loaded by an EFI loader. If so, then we have also been
63 * passed the efi memmap, systab, etc., so we should use these data structures
64@@ -819,6 +854,11 @@ void __init setup_arch(char **cmdline_p)
65
66 finish_e820_parsing();
67
68+ if (is_initial_xendomain()) {
69+ dmi_scan_machine();
70+ dmi_check_system(bad_bios_dmi_table);
71+ }
72+
73 #ifdef CONFIG_X86_32
74 probe_roms();
75 #endif
76@@ -906,9 +946,6 @@ void __init setup_arch(char **cmdline_p)
77 vsmp_init();
78 #endif
79
80- if (is_initial_xendomain())
81- dmi_scan_machine();
82-
83 io_delay_init();
84
85 #ifdef CONFIG_ACPI