aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mach-default
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/mach-default')
-rw-r--r--arch/i386/mach-default/setup.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c
index b4a7455c6993..004837c58793 100644
--- a/arch/i386/mach-default/setup.c
+++ b/arch/i386/mach-default/setup.c
@@ -8,6 +8,8 @@
8#include <linux/interrupt.h> 8#include <linux/interrupt.h>
9#include <asm/acpi.h> 9#include <asm/acpi.h>
10#include <asm/arch_hooks.h> 10#include <asm/arch_hooks.h>
11#include <asm/e820.h>
12#include <asm/setup.h>
11 13
12#ifdef CONFIG_HOTPLUG_CPU 14#ifdef CONFIG_HOTPLUG_CPU
13#define DEFAULT_SEND_IPI (1) 15#define DEFAULT_SEND_IPI (1)
@@ -130,3 +132,44 @@ static int __init print_ipi_mode(void)
130} 132}
131 133
132late_initcall(print_ipi_mode); 134late_initcall(print_ipi_mode);
135
136/**
137 * machine_specific_memory_setup - Hook for machine specific memory setup.
138 *
139 * Description:
140 * This is included late in kernel/setup.c so that it can make
141 * use of all of the static functions.
142 **/
143
144char * __init machine_specific_memory_setup(void)
145{
146 char *who;
147
148
149 who = "BIOS-e820";
150
151 /*
152 * Try to copy the BIOS-supplied E820-map.
153 *
154 * Otherwise fake a memory map; one section from 0k->640k,
155 * the next section from 1mb->appropriate_mem_k
156 */
157 sanitize_e820_map(E820_MAP, &E820_MAP_NR);
158 if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {
159 unsigned long mem_size;
160
161 /* compare results from other methods and take the greater */
162 if (ALT_MEM_K < EXT_MEM_K) {
163 mem_size = EXT_MEM_K;
164 who = "BIOS-88";
165 } else {
166 mem_size = ALT_MEM_K;
167 who = "BIOS-e801";
168 }
169
170 e820.nr_map = 0;
171 add_memory_region(0, LOWMEMSIZE(), E820_RAM);
172 add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
173 }
174 return who;
175}