Thomas Gleixner | 57844a8 | 2009-08-19 14:48:38 +0200 | [diff] [blame] | 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 | |
Thomas Gleixner | 816c25e | 2009-08-19 14:36:27 +0200 | [diff] [blame] | 8 | #include <asm/bios_ebda.h> |
Thomas Gleixner | 6f30c1a | 2009-08-20 13:19:57 +0200 | [diff] [blame] | 9 | #include <asm/paravirt.h> |
Thomas Gleixner | fd6c666 | 2009-08-20 10:41:58 +0200 | [diff] [blame] | 10 | #include <asm/mpspec.h> |
Thomas Gleixner | 8fee697 | 2009-08-19 14:55:50 +0200 | [diff] [blame] | 11 | #include <asm/setup.h> |
Thomas Gleixner | 736deca | 2009-08-19 12:35:53 +0200 | [diff] [blame] | 12 | #include <asm/apic.h> |
Thomas Gleixner | 6b18ae3 | 2009-08-20 10:19:54 +0200 | [diff] [blame] | 13 | #include <asm/e820.h> |
Thomas Gleixner | 845b394 | 2009-08-19 15:37:03 +0200 | [diff] [blame] | 14 | #include <asm/time.h> |
Thomas Gleixner | d9112f4 | 2009-08-20 09:41:38 +0200 | [diff] [blame] | 15 | #include <asm/irq.h> |
Jack Steiner | fd12a0d | 2009-11-19 14:23:41 -0600 | [diff] [blame] | 16 | #include <asm/pat.h> |
Thomas Gleixner | 2d82640 | 2009-08-20 17:06:25 +0200 | [diff] [blame] | 17 | #include <asm/tsc.h> |
FUJITA Tomonori | 338bac5 | 2009-10-27 16:34:44 +0900 | [diff] [blame] | 18 | #include <asm/iommu.h> |
Thomas Gleixner | 57844a8 | 2009-08-19 14:48:38 +0200 | [diff] [blame] | 19 | |
| 20 | void __cpuinit x86_init_noop(void) { } |
Thomas Gleixner | f484847 | 2009-08-20 12:05:01 +0200 | [diff] [blame] | 21 | void __init x86_init_uint_noop(unsigned int unused) { } |
Thomas Gleixner | 030cb6c | 2009-08-20 14:30:02 +0200 | [diff] [blame] | 22 | void __init x86_init_pgd_noop(pgd_t *unused) { } |
FUJITA Tomonori | d07c1be | 2009-11-10 19:46:12 +0900 | [diff] [blame] | 23 | int __init iommu_init_noop(void) { return 0; } |
Hiroshi Shimamoto | 62ad33f | 2009-11-16 11:44:30 +0900 | [diff] [blame] | 24 | void iommu_shutdown_noop(void) { } |
Thomas Gleixner | 57844a8 | 2009-08-19 14:48:38 +0200 | [diff] [blame] | 25 | |
| 26 | /* |
| 27 | * The platform setup functions are preset with the default functions |
| 28 | * for standard PC hardware. |
| 29 | */ |
Thomas Gleixner | 54e2603 | 2009-09-16 08:42:26 +0200 | [diff] [blame] | 30 | struct x86_init_ops x86_init __initdata = { |
Thomas Gleixner | f7cf5a5 | 2009-08-19 14:43:56 +0200 | [diff] [blame] | 31 | |
| 32 | .resources = { |
| 33 | .probe_roms = x86_init_noop, |
Thomas Gleixner | 8fee697 | 2009-08-19 14:55:50 +0200 | [diff] [blame] | 34 | .reserve_resources = reserve_standard_io_resources, |
Thomas Gleixner | 6b18ae3 | 2009-08-20 10:19:54 +0200 | [diff] [blame] | 35 | .memory_setup = default_machine_specific_memory_setup, |
Thomas Gleixner | f7cf5a5 | 2009-08-19 14:43:56 +0200 | [diff] [blame] | 36 | }, |
Thomas Gleixner | f484847 | 2009-08-20 12:05:01 +0200 | [diff] [blame] | 37 | |
| 38 | .mpparse = { |
| 39 | .mpc_record = x86_init_uint_noop, |
Thomas Gleixner | de93410 | 2009-08-20 09:27:29 +0200 | [diff] [blame] | 40 | .setup_ioapic_ids = x86_init_noop, |
Thomas Gleixner | fd6c666 | 2009-08-20 10:41:58 +0200 | [diff] [blame] | 41 | .mpc_apic_id = default_mpc_apic_id, |
Thomas Gleixner | 7230214 | 2009-08-20 12:18:32 +0200 | [diff] [blame] | 42 | .smp_read_mpc_oem = default_smp_read_mpc_oem, |
Thomas Gleixner | 90e1c69 | 2009-08-20 12:34:47 +0200 | [diff] [blame] | 43 | .mpc_oem_bus_info = default_mpc_oem_bus_info, |
Thomas Gleixner | b3f1b61 | 2009-08-20 11:11:52 +0200 | [diff] [blame] | 44 | .find_smp_config = default_find_smp_config, |
| 45 | .get_smp_config = default_get_smp_config, |
Thomas Gleixner | f484847 | 2009-08-20 12:05:01 +0200 | [diff] [blame] | 46 | }, |
Thomas Gleixner | d9112f4 | 2009-08-20 09:41:38 +0200 | [diff] [blame] | 47 | |
| 48 | .irqs = { |
| 49 | .pre_vector_init = init_ISA_irqs, |
Thomas Gleixner | 66bcaf0 | 2009-08-20 09:59:09 +0200 | [diff] [blame] | 50 | .intr_init = native_init_IRQ, |
Thomas Gleixner | 428cf90 | 2009-08-20 10:35:46 +0200 | [diff] [blame] | 51 | .trap_init = x86_init_noop, |
Thomas Gleixner | d9112f4 | 2009-08-20 09:41:38 +0200 | [diff] [blame] | 52 | }, |
Thomas Gleixner | 42bbdb4 | 2009-08-20 13:04:10 +0200 | [diff] [blame] | 53 | |
| 54 | .oem = { |
| 55 | .arch_setup = x86_init_noop, |
Thomas Gleixner | 6f30c1a | 2009-08-20 13:19:57 +0200 | [diff] [blame] | 56 | .banner = default_banner, |
Thomas Gleixner | 42bbdb4 | 2009-08-20 13:04:10 +0200 | [diff] [blame] | 57 | }, |
Thomas Gleixner | 030cb6c | 2009-08-20 14:30:02 +0200 | [diff] [blame] | 58 | |
| 59 | .paging = { |
| 60 | .pagetable_setup_start = native_pagetable_setup_start, |
| 61 | .pagetable_setup_done = native_pagetable_setup_done, |
| 62 | }, |
Thomas Gleixner | 736deca | 2009-08-19 12:35:53 +0200 | [diff] [blame] | 63 | |
| 64 | .timers = { |
| 65 | .setup_percpu_clockev = setup_boot_APIC_clock, |
Thomas Gleixner | 845b394 | 2009-08-19 15:37:03 +0200 | [diff] [blame] | 66 | .tsc_pre_init = x86_init_noop, |
| 67 | .timer_init = hpet_time_init, |
Thomas Gleixner | 736deca | 2009-08-19 12:35:53 +0200 | [diff] [blame] | 68 | }, |
FUJITA Tomonori | d07c1be | 2009-11-10 19:46:12 +0900 | [diff] [blame] | 69 | |
| 70 | .iommu = { |
| 71 | .iommu_init = iommu_init_noop, |
| 72 | }, |
Thomas Gleixner | 736deca | 2009-08-19 12:35:53 +0200 | [diff] [blame] | 73 | }; |
| 74 | |
Thomas Gleixner | 54e2603 | 2009-09-16 08:42:26 +0200 | [diff] [blame] | 75 | struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = { |
Thomas Gleixner | 736deca | 2009-08-19 12:35:53 +0200 | [diff] [blame] | 76 | .setup_percpu_clockev = setup_secondary_APIC_clock, |
Thomas Gleixner | 57844a8 | 2009-08-19 14:48:38 +0200 | [diff] [blame] | 77 | }; |
Thomas Gleixner | 2d82640 | 2009-08-20 17:06:25 +0200 | [diff] [blame] | 78 | |
| 79 | struct x86_platform_ops x86_platform = { |
| 80 | .calibrate_tsc = native_calibrate_tsc, |
Feng Tang | 7bd867d | 2009-09-10 10:48:56 +0800 | [diff] [blame] | 81 | .get_wallclock = mach_get_cmos_time, |
| 82 | .set_wallclock = mach_set_rtc_mmss, |
FUJITA Tomonori | 338bac5 | 2009-10-27 16:34:44 +0900 | [diff] [blame] | 83 | .iommu_shutdown = iommu_shutdown_noop, |
H. Peter Anvin | eb41c8b | 2009-11-23 14:46:07 -0800 | [diff] [blame] | 84 | .is_untracked_pat_range = is_ISA_range, |
Thomas Gleixner | 2d82640 | 2009-08-20 17:06:25 +0200 | [diff] [blame] | 85 | }; |