2009-08-19 06:48:38 -06:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
*
|
|
|
|
* For licencing details see kernel-base/COPYING
|
|
|
|
*/
|
|
|
|
#include <linux/init.h>
|
2009-08-29 09:51:26 -06:00
|
|
|
#include <linux/ioport.h>
|
2010-07-07 17:57:46 -06:00
|
|
|
#include <linux/module.h>
|
2010-10-06 14:12:28 -06:00
|
|
|
#include <linux/pci.h>
|
2009-08-19 06:48:38 -06:00
|
|
|
|
2009-08-19 06:36:27 -06:00
|
|
|
#include <asm/bios_ebda.h>
|
2009-08-20 05:19:57 -06:00
|
|
|
#include <asm/paravirt.h>
|
2009-08-29 08:24:51 -06:00
|
|
|
#include <asm/pci_x86.h>
|
2010-10-06 14:12:28 -06:00
|
|
|
#include <asm/pci.h>
|
2009-08-20 02:41:58 -06:00
|
|
|
#include <asm/mpspec.h>
|
2009-08-19 06:55:50 -06:00
|
|
|
#include <asm/setup.h>
|
2009-08-19 04:35:53 -06:00
|
|
|
#include <asm/apic.h>
|
2009-08-20 02:19:54 -06:00
|
|
|
#include <asm/e820.h>
|
2009-08-19 07:37:03 -06:00
|
|
|
#include <asm/time.h>
|
2009-08-20 01:41:38 -06:00
|
|
|
#include <asm/irq.h>
|
2009-11-19 13:23:41 -07:00
|
|
|
#include <asm/pat.h>
|
2009-08-20 09:06:25 -06:00
|
|
|
#include <asm/tsc.h>
|
2009-10-27 01:34:44 -06:00
|
|
|
#include <asm/iommu.h>
|
2011-11-10 06:43:05 -07:00
|
|
|
#include <asm/mach_traps.h>
|
2009-08-19 06:48:38 -06:00
|
|
|
|
|
|
|
void __cpuinit x86_init_noop(void) { }
|
2009-08-20 04:05:01 -06:00
|
|
|
void __init x86_init_uint_noop(unsigned int unused) { }
|
2009-08-20 06:30:02 -06:00
|
|
|
void __init x86_init_pgd_noop(pgd_t *unused) { }
|
2009-11-10 03:46:12 -07:00
|
|
|
int __init iommu_init_noop(void) { return 0; }
|
2009-11-15 19:44:30 -07:00
|
|
|
void iommu_shutdown_noop(void) { }
|
2011-11-10 06:42:02 -07:00
|
|
|
void wallclock_init_noop(void) { }
|
2009-08-19 06:48:38 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The platform setup functions are preset with the default functions
|
|
|
|
* for standard PC hardware.
|
|
|
|
*/
|
2009-09-16 00:42:26 -06:00
|
|
|
struct x86_init_ops x86_init __initdata = {
|
2009-08-19 06:43:56 -06:00
|
|
|
|
|
|
|
.resources = {
|
2011-03-08 11:36:19 -07:00
|
|
|
.probe_roms = probe_roms,
|
2009-08-19 06:55:50 -06:00
|
|
|
.reserve_resources = reserve_standard_io_resources,
|
2009-08-20 02:19:54 -06:00
|
|
|
.memory_setup = default_machine_specific_memory_setup,
|
2009-08-19 06:43:56 -06:00
|
|
|
},
|
2009-08-20 04:05:01 -06:00
|
|
|
|
|
|
|
.mpparse = {
|
|
|
|
.mpc_record = x86_init_uint_noop,
|
2009-08-20 01:27:29 -06:00
|
|
|
.setup_ioapic_ids = x86_init_noop,
|
2009-08-20 02:41:58 -06:00
|
|
|
.mpc_apic_id = default_mpc_apic_id,
|
2009-08-20 04:18:32 -06:00
|
|
|
.smp_read_mpc_oem = default_smp_read_mpc_oem,
|
2009-08-20 04:34:47 -06:00
|
|
|
.mpc_oem_bus_info = default_mpc_oem_bus_info,
|
2009-08-20 03:11:52 -06:00
|
|
|
.find_smp_config = default_find_smp_config,
|
|
|
|
.get_smp_config = default_get_smp_config,
|
2009-08-20 04:05:01 -06:00
|
|
|
},
|
2009-08-20 01:41:38 -06:00
|
|
|
|
|
|
|
.irqs = {
|
|
|
|
.pre_vector_init = init_ISA_irqs,
|
2009-08-20 01:59:09 -06:00
|
|
|
.intr_init = native_init_IRQ,
|
2009-08-20 02:35:46 -06:00
|
|
|
.trap_init = x86_init_noop,
|
2009-08-20 01:41:38 -06:00
|
|
|
},
|
2009-08-20 05:04:10 -06:00
|
|
|
|
|
|
|
.oem = {
|
|
|
|
.arch_setup = x86_init_noop,
|
2009-08-20 05:19:57 -06:00
|
|
|
.banner = default_banner,
|
2009-08-20 05:04:10 -06:00
|
|
|
},
|
2009-08-20 06:30:02 -06:00
|
|
|
|
2011-04-14 08:49:41 -06:00
|
|
|
.mapping = {
|
|
|
|
.pagetable_reserve = native_pagetable_reserve,
|
|
|
|
},
|
|
|
|
|
2009-08-20 06:30:02 -06:00
|
|
|
.paging = {
|
|
|
|
.pagetable_setup_start = native_pagetable_setup_start,
|
|
|
|
.pagetable_setup_done = native_pagetable_setup_done,
|
|
|
|
},
|
2009-08-19 04:35:53 -06:00
|
|
|
|
|
|
|
.timers = {
|
|
|
|
.setup_percpu_clockev = setup_boot_APIC_clock,
|
2009-08-19 07:37:03 -06:00
|
|
|
.tsc_pre_init = x86_init_noop,
|
|
|
|
.timer_init = hpet_time_init,
|
2011-02-14 09:13:31 -07:00
|
|
|
.wallclock_init = x86_init_noop,
|
2009-08-19 04:35:53 -06:00
|
|
|
},
|
2009-11-10 03:46:12 -07:00
|
|
|
|
|
|
|
.iommu = {
|
|
|
|
.iommu_init = iommu_init_noop,
|
|
|
|
},
|
2009-08-29 08:24:51 -06:00
|
|
|
|
|
|
|
.pci = {
|
|
|
|
.init = x86_default_pci_init,
|
2009-08-29 09:47:33 -06:00
|
|
|
.init_irq = x86_default_pci_init_irq,
|
2009-08-29 09:51:26 -06:00
|
|
|
.fixup_irqs = x86_default_pci_fixup_irqs,
|
2009-08-29 08:24:51 -06:00
|
|
|
},
|
2009-08-19 04:35:53 -06:00
|
|
|
};
|
|
|
|
|
2009-09-16 00:42:26 -06:00
|
|
|
struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
|
2009-08-19 04:35:53 -06:00
|
|
|
.setup_percpu_clockev = setup_secondary_APIC_clock,
|
2011-12-05 01:20:37 -07:00
|
|
|
.fixup_cpu_id = x86_default_fixup_cpu_id,
|
2009-08-19 06:48:38 -06:00
|
|
|
};
|
2009-08-20 09:06:25 -06:00
|
|
|
|
2010-02-26 09:49:12 -07:00
|
|
|
static void default_nmi_init(void) { };
|
2010-07-05 09:03:18 -06:00
|
|
|
static int default_i8042_detect(void) { return 1; };
|
2010-02-26 09:49:12 -07:00
|
|
|
|
2009-08-20 09:06:25 -06:00
|
|
|
struct x86_platform_ops x86_platform = {
|
|
|
|
.calibrate_tsc = native_calibrate_tsc,
|
2011-11-10 06:42:02 -07:00
|
|
|
.wallclock_init = wallclock_init_noop,
|
2009-09-09 20:48:56 -06:00
|
|
|
.get_wallclock = mach_get_cmos_time,
|
|
|
|
.set_wallclock = mach_set_rtc_mmss,
|
2009-10-27 01:34:44 -06:00
|
|
|
.iommu_shutdown = iommu_shutdown_noop,
|
2009-11-23 15:46:07 -07:00
|
|
|
.is_untracked_pat_range = is_ISA_range,
|
2010-07-05 09:03:18 -06:00
|
|
|
.nmi_init = default_nmi_init,
|
2011-11-10 06:43:05 -07:00
|
|
|
.get_nmi_reason = default_get_nmi_reason,
|
2010-07-05 09:03:18 -06:00
|
|
|
.i8042_detect = default_i8042_detect
|
2009-08-20 09:06:25 -06:00
|
|
|
};
|
2010-07-07 17:57:46 -06:00
|
|
|
|
|
|
|
EXPORT_SYMBOL_GPL(x86_platform);
|
2010-10-06 14:12:28 -06:00
|
|
|
struct x86_msi_ops x86_msi = {
|
|
|
|
.setup_msi_irqs = native_setup_msi_irqs,
|
|
|
|
.teardown_msi_irq = native_teardown_msi_irq,
|
|
|
|
.teardown_msi_irqs = default_teardown_msi_irqs,
|
2011-12-16 15:38:18 -07:00
|
|
|
.restore_msi_irqs = default_restore_msi_irqs,
|
2010-10-06 14:12:28 -06:00
|
|
|
};
|