x86_init.c 1.8 KB
Newer Older
1 2 3 4 5 6 7
/*
 * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
 *
 *  For licencing details see kernel-base/COPYING
 */
#include <linux/init.h>

8
#include <asm/bios_ebda.h>
9
#include <asm/paravirt.h>
10
#include <asm/mpspec.h>
11
#include <asm/setup.h>
12
#include <asm/apic.h>
13
#include <asm/e820.h>
14
#include <asm/time.h>
15
#include <asm/irq.h>
16
#include <asm/tsc.h>
17 18

void __cpuinit x86_init_noop(void) { }
19
void __init x86_init_uint_noop(unsigned int unused) { }
20
void __init x86_init_pgd_noop(pgd_t *unused) { }
21 22 23 24 25

/*
 * The platform setup functions are preset with the default functions
 * for standard PC hardware.
 */
26
struct x86_init_ops x86_init __initdata = {
27 28 29

	.resources = {
		.probe_roms		= x86_init_noop,
30
		.reserve_resources	= reserve_standard_io_resources,
31
		.memory_setup		= default_machine_specific_memory_setup,
32
	},
33 34 35

	.mpparse = {
		.mpc_record		= x86_init_uint_noop,
36
		.setup_ioapic_ids	= x86_init_noop,
37
		.mpc_apic_id		= default_mpc_apic_id,
38
		.smp_read_mpc_oem	= default_smp_read_mpc_oem,
39
		.mpc_oem_bus_info	= default_mpc_oem_bus_info,
40 41
		.find_smp_config	= default_find_smp_config,
		.get_smp_config		= default_get_smp_config,
42
	},
43 44 45

	.irqs = {
		.pre_vector_init	= init_ISA_irqs,
46
		.intr_init		= native_init_IRQ,
47
		.trap_init		= x86_init_noop,
48
	},
49 50 51

	.oem = {
		.arch_setup		= x86_init_noop,
52
		.banner			= default_banner,
53
	},
54 55 56 57 58

	.paging = {
		.pagetable_setup_start	= native_pagetable_setup_start,
		.pagetable_setup_done	= native_pagetable_setup_done,
	},
59 60 61

	.timers = {
		.setup_percpu_clockev	= setup_boot_APIC_clock,
62 63
		.tsc_pre_init		= x86_init_noop,
		.timer_init		= hpet_time_init,
64 65 66
	},
};

67
struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
68
	.setup_percpu_clockev		= setup_secondary_APIC_clock,
69
};
70 71 72

struct x86_platform_ops x86_platform = {
	.calibrate_tsc			= native_calibrate_tsc,
73 74
	.get_wallclock			= mach_get_cmos_time,
	.set_wallclock			= mach_set_rtc_mmss,
75
};