summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-29 15:03:59 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-08-31 11:09:40 +0200
commit47a3d5da70f411bc044ecd3c0593b158b09d0efa (patch)
tree30d5204e6d11cd81b20bc3fa582762cd4bdd3135 /arch/x86/kernel
parentx86: Move tsc_init to late_time_init (diff)
downloadlinux-47a3d5da70f411bc044ecd3c0593b158b09d0efa.tar.xz
linux-47a3d5da70f411bc044ecd3c0593b158b09d0efa.zip
x86: Add early platform detection
Platforms like Moorestown require early setup and want to avoid the call to reserve_ebda_region. The x86_init override is too late when the MRST detection happens in setup_arch. Move the default i386 x86_init overrides and the call to reserve_ebda_region into a separate function which is called as the default of a switch case depending on the hardware_subarch id in boot params. This allows us to add a case for MRST and let MRST have its own early setup function. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/head32.c22
-rw-r--r--arch/x86/kernel/head64.c3
-rw-r--r--arch/x86/kernel/x86_init.c1
3 files changed, 19 insertions, 7 deletions
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index a21398fac4fa..441c075e2b80 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -15,6 +15,17 @@
#include <asm/trampoline.h>
#include <asm/apic.h>
#include <asm/io_apic.h>
+#include <asm/bios_ebda.h>
+
+static void __init i386_default_early_setup(void)
+{
+ /* Initilize 32bit specific setup functions */
+ x86_init.resources.probe_roms = probe_roms;
+ x86_init.resources.reserve_resources = i386_reserve_resources;
+ x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
+
+ reserve_ebda_region();
+}
void __init i386_start_kernel(void)
{
@@ -31,12 +42,13 @@ void __init i386_start_kernel(void)
reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
}
#endif
- /* Initilize 32bit specific setup functions */
- x86_init.resources.probe_roms = probe_roms;
- x86_init.resources.reserve_resources = i386_reserve_resources;
- x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
- x86_init.resources.reserve_ebda_region();
+ /* Call the subarch specific early setup function */
+ switch (boot_params.hdr.hardware_subarch) {
+ default:
+ i386_default_early_setup();
+ break;
+ }
/*
* At this point everything still needed from the boot loader
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index cead8149c3de..0b06cd778fd9 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -24,6 +24,7 @@
#include <asm/kdebug.h>
#include <asm/e820.h>
#include <asm/trampoline.h>
+#include <asm/bios_ebda.h>
static void __init zap_identity_mappings(void)
{
@@ -111,7 +112,7 @@ void __init x86_64_start_reservations(char *real_mode_data)
}
#endif
- x86_init.resources.reserve_ebda_region();
+ reserve_ebda_region();
/*
* At this point everything still needed from the boot loader
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 13081b921914..24be7f397894 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -28,7 +28,6 @@ struct __initdata x86_init_ops x86_init = {
.resources = {
.probe_roms = x86_init_noop,
.reserve_resources = reserve_standard_io_resources,
- .reserve_ebda_region = reserve_ebda_region,
.memory_setup = default_machine_specific_memory_setup,
},