x86: Add early platform detection
[pandora-kernel.git] / arch / x86 / kernel / head32.c
index a21398f..441c075 100644 (file)
 #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