x86_init.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
  3. *
  4. * For licencing details see kernel-base/COPYING
  5. */
  6. #include <linux/init.h>
  7. #include <linux/ioport.h>
  8. #include <linux/module.h>
  9. #include <linux/pci.h>
  10. #include <asm/bios_ebda.h>
  11. #include <asm/paravirt.h>
  12. #include <asm/pci_x86.h>
  13. #include <asm/pci.h>
  14. #include <asm/mpspec.h>
  15. #include <asm/setup.h>
  16. #include <asm/apic.h>
  17. #include <asm/e820.h>
  18. #include <asm/time.h>
  19. #include <asm/irq.h>
  20. #include <asm/pat.h>
  21. #include <asm/tsc.h>
  22. #include <asm/iommu.h>
  23. #include <asm/mach_traps.h>
  24. void __cpuinit x86_init_noop(void) { }
  25. void __init x86_init_uint_noop(unsigned int unused) { }
  26. void __init x86_init_pgd_noop(pgd_t *unused) { }
  27. int __init iommu_init_noop(void) { return 0; }
  28. void iommu_shutdown_noop(void) { }
  29. void wallclock_init_noop(void) { }
  30. /*
  31. * The platform setup functions are preset with the default functions
  32. * for standard PC hardware.
  33. */
  34. struct x86_init_ops x86_init __initdata = {
  35. .resources = {
  36. .probe_roms = probe_roms,
  37. .reserve_resources = reserve_standard_io_resources,
  38. .memory_setup = default_machine_specific_memory_setup,
  39. },
  40. .mpparse = {
  41. .mpc_record = x86_init_uint_noop,
  42. .setup_ioapic_ids = x86_init_noop,
  43. .mpc_apic_id = default_mpc_apic_id,
  44. .smp_read_mpc_oem = default_smp_read_mpc_oem,
  45. .mpc_oem_bus_info = default_mpc_oem_bus_info,
  46. .find_smp_config = default_find_smp_config,
  47. .get_smp_config = default_get_smp_config,
  48. },
  49. .irqs = {
  50. .pre_vector_init = init_ISA_irqs,
  51. .intr_init = native_init_IRQ,
  52. .trap_init = x86_init_noop,
  53. },
  54. .oem = {
  55. .arch_setup = x86_init_noop,
  56. .banner = default_banner,
  57. },
  58. .mapping = {
  59. .pagetable_reserve = native_pagetable_reserve,
  60. },
  61. .paging = {
  62. .pagetable_setup_start = native_pagetable_setup_start,
  63. .pagetable_setup_done = native_pagetable_setup_done,
  64. },
  65. .timers = {
  66. .setup_percpu_clockev = setup_boot_APIC_clock,
  67. .tsc_pre_init = x86_init_noop,
  68. .timer_init = hpet_time_init,
  69. .wallclock_init = x86_init_noop,
  70. },
  71. .iommu = {
  72. .iommu_init = iommu_init_noop,
  73. },
  74. .pci = {
  75. .init = x86_default_pci_init,
  76. .init_irq = x86_default_pci_init_irq,
  77. .fixup_irqs = x86_default_pci_fixup_irqs,
  78. },
  79. };
  80. struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
  81. .early_percpu_clock_init = x86_init_noop,
  82. .setup_percpu_clockev = setup_secondary_APIC_clock,
  83. };
  84. static void default_nmi_init(void) { };
  85. static int default_i8042_detect(void) { return 1; };
  86. struct x86_platform_ops x86_platform = {
  87. .calibrate_tsc = native_calibrate_tsc,
  88. .wallclock_init = wallclock_init_noop,
  89. .get_wallclock = mach_get_cmos_time,
  90. .set_wallclock = mach_set_rtc_mmss,
  91. .iommu_shutdown = iommu_shutdown_noop,
  92. .is_untracked_pat_range = is_ISA_range,
  93. .nmi_init = default_nmi_init,
  94. .get_nmi_reason = default_get_nmi_reason,
  95. .i8042_detect = default_i8042_detect,
  96. .save_sched_clock_state = tsc_save_sched_clock_state,
  97. .restore_sched_clock_state = tsc_restore_sched_clock_state,
  98. };
  99. EXPORT_SYMBOL_GPL(x86_platform);
  100. struct x86_msi_ops x86_msi = {
  101. .setup_msi_irqs = native_setup_msi_irqs,
  102. .teardown_msi_irq = native_teardown_msi_irq,
  103. .teardown_msi_irqs = default_teardown_msi_irqs,
  104. .restore_msi_irqs = default_restore_msi_irqs,
  105. };