head32.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * linux/arch/i386/kernel/head32.c -- prepare to run common code
  3. *
  4. * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
  5. * Copyright (C) 2007 Eric Biederman <ebiederm@xmission.com>
  6. */
  7. #include <linux/init.h>
  8. #include <linux/start_kernel.h>
  9. #include <linux/mm.h>
  10. #include <linux/memblock.h>
  11. #include <asm/setup.h>
  12. #include <asm/sections.h>
  13. #include <asm/e820.h>
  14. #include <asm/page.h>
  15. #include <asm/apic.h>
  16. #include <asm/io_apic.h>
  17. #include <asm/bios_ebda.h>
  18. #include <asm/tlbflush.h>
  19. #include <asm/bootparam_utils.h>
  20. static void __init i386_default_early_setup(void)
  21. {
  22. /* Initialize 32bit specific setup functions */
  23. x86_init.resources.reserve_resources = i386_reserve_resources;
  24. x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
  25. }
  26. asmlinkage __visible void __init i386_start_kernel(void)
  27. {
  28. cr4_init_shadow();
  29. sanitize_boot_params(&boot_params);
  30. x86_early_init_platform_quirks();
  31. /* Call the subarch specific early setup function */
  32. switch (boot_params.hdr.hardware_subarch) {
  33. case X86_SUBARCH_INTEL_MID:
  34. x86_intel_mid_early_setup();
  35. break;
  36. case X86_SUBARCH_CE4100:
  37. x86_ce4100_early_setup();
  38. break;
  39. default:
  40. i386_default_early_setup();
  41. break;
  42. }
  43. start_kernel();
  44. }