x86_init.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 <asm/bios_ebda.h>
  8. #include <asm/paravirt.h>
  9. #include <asm/pci_x86.h>
  10. #include <asm/mpspec.h>
  11. #include <asm/setup.h>
  12. #include <asm/apic.h>
  13. #include <asm/e820.h>
  14. #include <asm/time.h>
  15. #include <asm/irq.h>
  16. #include <asm/pat.h>
  17. #include <asm/tsc.h>
  18. #include <asm/iommu.h>
  19. void __cpuinit x86_init_noop(void) { }
  20. void __init x86_init_uint_noop(unsigned int unused) { }
  21. void __init x86_init_pgd_noop(pgd_t *unused) { }
  22. int __init iommu_init_noop(void) { return 0; }
  23. void iommu_shutdown_noop(void) { }
  24. /*
  25. * The platform setup functions are preset with the default functions
  26. * for standard PC hardware.
  27. */
  28. struct x86_init_ops x86_init __initdata = {
  29. .resources = {
  30. .probe_roms = x86_init_noop,
  31. .reserve_resources = reserve_standard_io_resources,
  32. .memory_setup = default_machine_specific_memory_setup,
  33. },
  34. .mpparse = {
  35. .mpc_record = x86_init_uint_noop,
  36. .setup_ioapic_ids = x86_init_noop,
  37. .mpc_apic_id = default_mpc_apic_id,
  38. .smp_read_mpc_oem = default_smp_read_mpc_oem,
  39. .mpc_oem_bus_info = default_mpc_oem_bus_info,
  40. .find_smp_config = default_find_smp_config,
  41. .get_smp_config = default_get_smp_config,
  42. },
  43. .irqs = {
  44. .pre_vector_init = init_ISA_irqs,
  45. .intr_init = native_init_IRQ,
  46. .trap_init = x86_init_noop,
  47. },
  48. .oem = {
  49. .arch_setup = x86_init_noop,
  50. .banner = default_banner,
  51. },
  52. .paging = {
  53. .pagetable_setup_start = native_pagetable_setup_start,
  54. .pagetable_setup_done = native_pagetable_setup_done,
  55. },
  56. .timers = {
  57. .setup_percpu_clockev = setup_boot_APIC_clock,
  58. .tsc_pre_init = x86_init_noop,
  59. .timer_init = hpet_time_init,
  60. },
  61. .iommu = {
  62. .iommu_init = iommu_init_noop,
  63. },
  64. .pci = {
  65. .init = x86_default_pci_init,
  66. .init_irq = x86_default_pci_init_irq,
  67. },
  68. };
  69. struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
  70. .setup_percpu_clockev = setup_secondary_APIC_clock,
  71. };
  72. struct x86_platform_ops x86_platform = {
  73. .calibrate_tsc = native_calibrate_tsc,
  74. .get_wallclock = mach_get_cmos_time,
  75. .set_wallclock = mach_set_rtc_mmss,
  76. .iommu_shutdown = iommu_shutdown_noop,
  77. .is_untracked_pat_range = is_ISA_range,
  78. };