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