blob: b7d258f4c40148bf47680dc8a9f3a197717fda71 [file] [log] [blame]
Thomas Gleixner57844a82009-08-19 14:48:38 +02001#ifndef _ASM_X86_PLATFORM_H
2#define _ASM_X86_PLATFORM_H
3
Thomas Gleixner030cb6c2009-08-20 14:30:02 +02004#include <asm/pgtable_types.h>
5
Thomas Gleixner52fdb562009-08-20 12:45:33 +02006struct mpc_bus;
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +02007struct mpc_cpu;
Thomas Gleixner72302142009-08-20 12:18:32 +02008struct mpc_table;
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +02009
Thomas Gleixner57844a82009-08-19 14:48:38 +020010/**
Thomas Gleixnerf4848472009-08-20 12:05:01 +020011 * struct x86_init_mpparse - platform specific mpparse ops
12 * @mpc_record: platform specific mpc record accounting
Thomas Gleixnerde934102009-08-20 09:27:29 +020013 * @setup_ioapic_ids: platform specific ioapic id override
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +020014 * @mpc_apic_id: platform specific mpc apic id assignment
Thomas Gleixner72302142009-08-20 12:18:32 +020015 * @smp_read_mpc_oem: platform specific oem mpc table setup
Thomas Gleixner52fdb562009-08-20 12:45:33 +020016 * @mpc_oem_pci_bus: platform specific pci bus setup (default NULL)
Thomas Gleixner90e1c692009-08-20 12:34:47 +020017 * @mpc_oem_bus_info: platform specific mpc bus info
Thomas Gleixnerb3f1b612009-08-20 11:11:52 +020018 * @find_smp_config: find the smp configuration
19 * @get_smp_config: get the smp configuration
Thomas Gleixnerf4848472009-08-20 12:05:01 +020020 */
21struct x86_init_mpparse {
22 void (*mpc_record)(unsigned int mode);
Thomas Gleixnerde934102009-08-20 09:27:29 +020023 void (*setup_ioapic_ids)(void);
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +020024 int (*mpc_apic_id)(struct mpc_cpu *m);
Thomas Gleixner72302142009-08-20 12:18:32 +020025 void (*smp_read_mpc_oem)(struct mpc_table *mpc);
Thomas Gleixner52fdb562009-08-20 12:45:33 +020026 void (*mpc_oem_pci_bus)(struct mpc_bus *m);
Thomas Gleixner90e1c692009-08-20 12:34:47 +020027 void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
Thomas Gleixnerb3f1b612009-08-20 11:11:52 +020028 void (*find_smp_config)(unsigned int reserve);
29 void (*get_smp_config)(unsigned int early);
Thomas Gleixnerf4848472009-08-20 12:05:01 +020030};
31
32/**
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020033 * struct x86_init_resources - platform specific resource related ops
34 * @probe_roms: probe BIOS roms
Thomas Gleixner8fee6972009-08-19 14:55:50 +020035 * @reserve_resources: reserve the standard resources for the
36 * platform
Thomas Gleixner816c25e2009-08-19 14:36:27 +020037 * @reserve_ebda_region: reserve the extended bios data area
Thomas Gleixner6b18ae32009-08-20 10:19:54 +020038 * @memory_setup: platform specific memory setup
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020039 *
40 */
41struct x86_init_resources {
42 void (*probe_roms)(void);
Thomas Gleixner8fee6972009-08-19 14:55:50 +020043 void (*reserve_resources)(void);
Thomas Gleixner816c25e2009-08-19 14:36:27 +020044 void (*reserve_ebda_region)(void);
Thomas Gleixner6b18ae32009-08-20 10:19:54 +020045 char *(*memory_setup)(void);
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020046};
47
48/**
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020049 * struct x86_init_irqs - platform specific interrupt setup
50 * @pre_vector_init: init code to run before interrupt vectors
51 * are set up.
Thomas Gleixner66bcaf02009-08-20 09:59:09 +020052 * @intr_init: interrupt init code
Thomas Gleixner428cf902009-08-20 10:35:46 +020053 * @trap_init: platform specific trap setup
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020054 */
55struct x86_init_irqs {
56 void (*pre_vector_init)(void);
Thomas Gleixner66bcaf02009-08-20 09:59:09 +020057 void (*intr_init)(void);
Thomas Gleixner428cf902009-08-20 10:35:46 +020058 void (*trap_init)(void);
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020059};
60
61/**
Thomas Gleixner42bbdb42009-08-20 13:04:10 +020062 * struct x86_init_oem - oem platform specific customizing functions
63 * @arch_setup: platform specific architecure setup
Thomas Gleixner6f30c1a2009-08-20 13:19:57 +020064 * @banner: print a platform specific banner
Thomas Gleixner42bbdb42009-08-20 13:04:10 +020065 */
66struct x86_init_oem {
67 void (*arch_setup)(void);
Thomas Gleixner6f30c1a2009-08-20 13:19:57 +020068 void (*banner)(void);
Thomas Gleixner42bbdb42009-08-20 13:04:10 +020069};
70
71/**
Thomas Gleixner030cb6c2009-08-20 14:30:02 +020072 * struct x86_init_paging - platform specific paging functions
73 * @pagetable_setup_start: platform specific pre paging_init() call
74 * @pagetable_setup_done: platform specific post paging_init() call
75 */
76struct x86_init_paging {
77 void (*pagetable_setup_start)(pgd_t *base);
78 void (*pagetable_setup_done)(pgd_t *base);
79};
80
81/**
Thomas Gleixner736deca2009-08-19 12:35:53 +020082 * struct x86_init_timers - platform specific timer setup
83 * @setup_perpcu_clockev: set up the per cpu clock event device for the
84 * boot cpu
85 */
86struct x86_init_timers {
87 void (*setup_percpu_clockev)(void);
88};
89
90/**
Thomas Gleixner57844a82009-08-19 14:48:38 +020091 * struct x86_init_ops - functions for platform specific setup
92 *
93 */
94struct x86_init_ops {
Thomas Gleixnerf4848472009-08-20 12:05:01 +020095 struct x86_init_resources resources;
96 struct x86_init_mpparse mpparse;
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020097 struct x86_init_irqs irqs;
Thomas Gleixner42bbdb42009-08-20 13:04:10 +020098 struct x86_init_oem oem;
Thomas Gleixner030cb6c2009-08-20 14:30:02 +020099 struct x86_init_paging paging;
Thomas Gleixner736deca2009-08-19 12:35:53 +0200100 struct x86_init_timers timers;
101};
102
103/**
104 * struct x86_cpuinit_ops - platform specific cpu hotplug setups
105 * @setup_percpu_clockev: set up the per cpu clock event device
106 */
107struct x86_cpuinit_ops {
108 void (*setup_percpu_clockev)(void);
Thomas Gleixner57844a82009-08-19 14:48:38 +0200109};
110
111extern struct x86_init_ops x86_init;
Thomas Gleixner736deca2009-08-19 12:35:53 +0200112extern struct x86_cpuinit_ops x86_cpuinit;
Thomas Gleixner57844a82009-08-19 14:48:38 +0200113
114extern void x86_init_noop(void);
Thomas Gleixnerf4848472009-08-20 12:05:01 +0200115extern void x86_init_uint_noop(unsigned int unused);
Thomas Gleixner57844a82009-08-19 14:48:38 +0200116
117#endif