blob: 1817cd7a03fa49b1e3af618c08f217826dd5a107 [file] [log] [blame]
Thomas Gleixner57844a82009-08-19 14:48:38 +02001/*
2 * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
3 *
4 * For licencing details see kernel-base/COPYING
5 */
6#include <linux/init.h>
Thomas Gleixner9325a282009-08-29 17:51:26 +02007#include <linux/ioport.h>
Thomas Gleixner57844a82009-08-19 14:48:38 +02008
Thomas Gleixner816c25e2009-08-19 14:36:27 +02009#include <asm/bios_ebda.h>
Thomas Gleixner6f30c1a2009-08-20 13:19:57 +020010#include <asm/paravirt.h>
Thomas Gleixnerb72d0db2009-08-29 16:24:51 +020011#include <asm/pci_x86.h>
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +020012#include <asm/mpspec.h>
Thomas Gleixner8fee6972009-08-19 14:55:50 +020013#include <asm/setup.h>
Thomas Gleixner736deca2009-08-19 12:35:53 +020014#include <asm/apic.h>
Thomas Gleixner6b18ae32009-08-20 10:19:54 +020015#include <asm/e820.h>
Thomas Gleixner845b3942009-08-19 15:37:03 +020016#include <asm/time.h>
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020017#include <asm/irq.h>
Jack Steinerfd12a0d2009-11-19 14:23:41 -060018#include <asm/pat.h>
Thomas Gleixner2d826402009-08-20 17:06:25 +020019#include <asm/tsc.h>
FUJITA Tomonori338bac52009-10-27 16:34:44 +090020#include <asm/iommu.h>
Thomas Gleixner57844a82009-08-19 14:48:38 +020021
22void __cpuinit x86_init_noop(void) { }
Thomas Gleixnerf4848472009-08-20 12:05:01 +020023void __init x86_init_uint_noop(unsigned int unused) { }
Thomas Gleixner030cb6c2009-08-20 14:30:02 +020024void __init x86_init_pgd_noop(pgd_t *unused) { }
FUJITA Tomonorid07c1be2009-11-10 19:46:12 +090025int __init iommu_init_noop(void) { return 0; }
Hiroshi Shimamoto62ad33f2009-11-16 11:44:30 +090026void iommu_shutdown_noop(void) { }
Thomas Gleixner57844a82009-08-19 14:48:38 +020027
28/*
29 * The platform setup functions are preset with the default functions
30 * for standard PC hardware.
31 */
Thomas Gleixner54e26032009-09-16 08:42:26 +020032struct x86_init_ops x86_init __initdata = {
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020033
34 .resources = {
35 .probe_roms = x86_init_noop,
Thomas Gleixner8fee6972009-08-19 14:55:50 +020036 .reserve_resources = reserve_standard_io_resources,
Thomas Gleixner6b18ae32009-08-20 10:19:54 +020037 .memory_setup = default_machine_specific_memory_setup,
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020038 },
Thomas Gleixnerf4848472009-08-20 12:05:01 +020039
40 .mpparse = {
41 .mpc_record = x86_init_uint_noop,
Thomas Gleixnerde934102009-08-20 09:27:29 +020042 .setup_ioapic_ids = x86_init_noop,
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +020043 .mpc_apic_id = default_mpc_apic_id,
Thomas Gleixner72302142009-08-20 12:18:32 +020044 .smp_read_mpc_oem = default_smp_read_mpc_oem,
Thomas Gleixner90e1c692009-08-20 12:34:47 +020045 .mpc_oem_bus_info = default_mpc_oem_bus_info,
Thomas Gleixnerb3f1b612009-08-20 11:11:52 +020046 .find_smp_config = default_find_smp_config,
47 .get_smp_config = default_get_smp_config,
Thomas Gleixnerf4848472009-08-20 12:05:01 +020048 },
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020049
50 .irqs = {
51 .pre_vector_init = init_ISA_irqs,
Thomas Gleixner66bcaf02009-08-20 09:59:09 +020052 .intr_init = native_init_IRQ,
Thomas Gleixner428cf902009-08-20 10:35:46 +020053 .trap_init = x86_init_noop,
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020054 },
Thomas Gleixner42bbdb42009-08-20 13:04:10 +020055
56 .oem = {
57 .arch_setup = x86_init_noop,
Thomas Gleixner6f30c1a2009-08-20 13:19:57 +020058 .banner = default_banner,
Thomas Gleixner42bbdb42009-08-20 13:04:10 +020059 },
Thomas Gleixner030cb6c2009-08-20 14:30:02 +020060
61 .paging = {
62 .pagetable_setup_start = native_pagetable_setup_start,
63 .pagetable_setup_done = native_pagetable_setup_done,
64 },
Thomas Gleixner736deca2009-08-19 12:35:53 +020065
66 .timers = {
67 .setup_percpu_clockev = setup_boot_APIC_clock,
Thomas Gleixner845b3942009-08-19 15:37:03 +020068 .tsc_pre_init = x86_init_noop,
69 .timer_init = hpet_time_init,
Thomas Gleixner736deca2009-08-19 12:35:53 +020070 },
FUJITA Tomonorid07c1be2009-11-10 19:46:12 +090071
72 .iommu = {
73 .iommu_init = iommu_init_noop,
74 },
Thomas Gleixnerb72d0db2009-08-29 16:24:51 +020075
76 .pci = {
77 .init = x86_default_pci_init,
Thomas Gleixnerab3b3792009-08-29 17:47:33 +020078 .init_irq = x86_default_pci_init_irq,
Thomas Gleixner9325a282009-08-29 17:51:26 +020079 .fixup_irqs = x86_default_pci_fixup_irqs,
Thomas Gleixnerb72d0db2009-08-29 16:24:51 +020080 },
Thomas Gleixner736deca2009-08-19 12:35:53 +020081};
82
Thomas Gleixner54e26032009-09-16 08:42:26 +020083struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
Thomas Gleixner736deca2009-08-19 12:35:53 +020084 .setup_percpu_clockev = setup_secondary_APIC_clock,
Thomas Gleixner57844a82009-08-19 14:48:38 +020085};
Thomas Gleixner2d826402009-08-20 17:06:25 +020086
87struct x86_platform_ops x86_platform = {
88 .calibrate_tsc = native_calibrate_tsc,
Feng Tang7bd867d2009-09-10 10:48:56 +080089 .get_wallclock = mach_get_cmos_time,
90 .set_wallclock = mach_set_rtc_mmss,
FUJITA Tomonori338bac52009-10-27 16:34:44 +090091 .iommu_shutdown = iommu_shutdown_noop,
H. Peter Anvineb41c8b2009-11-23 14:46:07 -080092 .is_untracked_pat_range = is_ISA_range,
Thomas Gleixner2d826402009-08-20 17:06:25 +020093};