aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mach-voyager
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-18 20:27:08 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 04:39:01 -0400
commit95a71a45c250177854f7c530810c88a8a19a443b (patch)
tree9a063a825cdc5d088973ad06b7cecfb789c3a0dd /arch/x86/mach-voyager
parent66a6f8d539416c9664f3a04ecb12f55a0097ab8c (diff)
x86: cleanup machine_specific_memory_setup, v2
1. let 64bit support 88 and e801 too 2. introduce default_machine_specific_memory_setup, and reuse it for voyager v2: fix 64 bit compiling Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mach-voyager')
-rw-r--r--arch/x86/mach-voyager/setup.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/arch/x86/mach-voyager/setup.c b/arch/x86/mach-voyager/setup.c
index f27b583154e5..6bbdd633864c 100644
--- a/arch/x86/mach-voyager/setup.c
+++ b/arch/x86/mach-voyager/setup.c
@@ -104,35 +104,5 @@ char *__init machine_specific_memory_setup(void)
104 return who; 104 return who;
105 } 105 }
106 106
107 who = "BIOS-e820"; 107 return default_machine_specific_memory_setup();
108
109 /*
110 * Try to copy the BIOS-supplied E820-map.
111 *
112 * Otherwise fake a memory map; one section from 0k->640k,
113 * the next section from 1mb->appropriate_mem_k
114 */
115 new_nr = boot_params.e820_entries;
116 sanitize_e820_map(boot_params.e820_map,
117 ARRAY_SIZE(boot_params.e820_map),
118 &new_nr);
119 boot_params.e820_entries = new_nr;
120 if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries)
121 < 0) {
122 unsigned long mem_size;
123
124 /* compare results from other methods and take the greater */
125 if (boot_params.alt_mem_k < boot_params.screen_info.ext_mem_k) {
126 mem_size = boot_params.screen_info.ext_mem_k;
127 who = "BIOS-88";
128 } else {
129 mem_size = boot_params.alt_mem_k;
130 who = "BIOS-e801";
131 }
132
133 e820.nr_map = 0;
134 e820_add_region(0, LOWMEMSIZE(), E820_RAM);
135 e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
136 }
137 return who;
138} 108}