2 * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
4 * For licencing details see kernel-base/COPYING
6 #include <linux/init.h>
7 #include <linux/ioport.h>
8 #include <linux/module.h>
11 #include <asm/bios_ebda.h>
12 #include <asm/paravirt.h>
13 #include <asm/pci_x86.h>
15 #include <asm/mpspec.h>
16 #include <asm/setup.h>
21 #include <asm/io_apic.h>
24 #include <asm/iommu.h>
25 #include <asm/mach_traps.h>
27 void __cpuinit
x86_init_noop(void) { }
28 void __init
x86_init_uint_noop(unsigned int unused
) { }
29 int __init
iommu_init_noop(void) { return 0; }
30 void iommu_shutdown_noop(void) { }
33 * The platform setup functions are preset with the default functions
34 * for standard PC hardware.
36 struct x86_init_ops x86_init __initdata
= {
39 .probe_roms
= probe_roms
,
40 .reserve_resources
= reserve_standard_io_resources
,
41 .memory_setup
= default_machine_specific_memory_setup
,
45 .mpc_record
= x86_init_uint_noop
,
46 .setup_ioapic_ids
= x86_init_noop
,
47 .mpc_apic_id
= default_mpc_apic_id
,
48 .smp_read_mpc_oem
= default_smp_read_mpc_oem
,
49 .mpc_oem_bus_info
= default_mpc_oem_bus_info
,
50 .find_smp_config
= default_find_smp_config
,
51 .get_smp_config
= default_get_smp_config
,
55 .pre_vector_init
= init_ISA_irqs
,
56 .intr_init
= native_init_IRQ
,
57 .trap_init
= x86_init_noop
,
61 .arch_setup
= x86_init_noop
,
62 .banner
= default_banner
,
66 .pagetable_reserve
= native_pagetable_reserve
,
70 .pagetable_init
= native_pagetable_init
,
74 .setup_percpu_clockev
= setup_boot_APIC_clock
,
75 .tsc_pre_init
= x86_init_noop
,
76 .timer_init
= hpet_time_init
,
77 .wallclock_init
= x86_init_noop
,
81 .iommu_init
= iommu_init_noop
,
85 .init
= x86_default_pci_init
,
86 .init_irq
= x86_default_pci_init_irq
,
87 .fixup_irqs
= x86_default_pci_fixup_irqs
,
91 struct x86_cpuinit_ops x86_cpuinit __cpuinitdata
= {
92 .early_percpu_clock_init
= x86_init_noop
,
93 .setup_percpu_clockev
= setup_secondary_APIC_clock
,
96 static void default_nmi_init(void) { };
97 static int default_i8042_detect(void) { return 1; };
99 struct x86_platform_ops x86_platform
= {
100 .calibrate_tsc
= native_calibrate_tsc
,
101 .get_wallclock
= mach_get_cmos_time
,
102 .set_wallclock
= mach_set_rtc_mmss
,
103 .iommu_shutdown
= iommu_shutdown_noop
,
104 .is_untracked_pat_range
= is_ISA_range
,
105 .nmi_init
= default_nmi_init
,
106 .get_nmi_reason
= default_get_nmi_reason
,
107 .i8042_detect
= default_i8042_detect
,
108 .save_sched_clock_state
= tsc_save_sched_clock_state
,
109 .restore_sched_clock_state
= tsc_restore_sched_clock_state
,
112 EXPORT_SYMBOL_GPL(x86_platform
);
113 struct x86_msi_ops x86_msi
= {
114 .setup_msi_irqs
= native_setup_msi_irqs
,
115 .teardown_msi_irq
= native_teardown_msi_irq
,
116 .teardown_msi_irqs
= default_teardown_msi_irqs
,
117 .restore_msi_irqs
= default_restore_msi_irqs
,
120 struct x86_io_apic_ops x86_io_apic_ops
= {
121 .init
= native_io_apic_init_mappings
,
122 .read
= native_io_apic_read
,
123 .write
= native_io_apic_write
,
124 .modify
= native_io_apic_modify
,