Commit | Line | Data |
---|---|---|
57844a8f TG |
1 | #ifndef _ASM_X86_PLATFORM_H |
2 | #define _ASM_X86_PLATFORM_H | |
3 | ||
030cb6c0 TG |
4 | #include <asm/pgtable_types.h> |
5 | ||
52fdb568 | 6 | struct mpc_bus; |
fd6c6661 | 7 | struct mpc_cpu; |
72302142 | 8 | struct mpc_table; |
fd6c6661 | 9 | |
f4848472 TG |
10 | /** |
11 | * struct x86_init_mpparse - platform specific mpparse ops | |
12 | * @mpc_record: platform specific mpc record accounting | |
de934103 | 13 | * @setup_ioapic_ids: platform specific ioapic id override |
fd6c6661 | 14 | * @mpc_apic_id: platform specific mpc apic id assignment |
72302142 | 15 | * @smp_read_mpc_oem: platform specific oem mpc table setup |
52fdb568 | 16 | * @mpc_oem_pci_bus: platform specific pci bus setup (default NULL) |
90e1c696 | 17 | * @mpc_oem_bus_info: platform specific mpc bus info |
b3f1b617 TG |
18 | * @find_smp_config: find the smp configuration |
19 | * @get_smp_config: get the smp configuration | |
f4848472 TG |
20 | */ |
21 | struct x86_init_mpparse { | |
22 | void (*mpc_record)(unsigned int mode); | |
de934103 | 23 | void (*setup_ioapic_ids)(void); |
fd6c6661 | 24 | int (*mpc_apic_id)(struct mpc_cpu *m); |
72302142 | 25 | void (*smp_read_mpc_oem)(struct mpc_table *mpc); |
52fdb568 | 26 | void (*mpc_oem_pci_bus)(struct mpc_bus *m); |
90e1c696 | 27 | void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); |
b3f1b617 TG |
28 | void (*find_smp_config)(unsigned int reserve); |
29 | void (*get_smp_config)(unsigned int early); | |
f4848472 TG |
30 | }; |
31 | ||
f7cf5a5b TG |
32 | /** |
33 | * struct x86_init_resources - platform specific resource related ops | |
34 | * @probe_roms: probe BIOS roms | |
8fee697d TG |
35 | * @reserve_resources: reserve the standard resources for the |
36 | * platform | |
816c25e7 | 37 | * @reserve_ebda_region: reserve the extended bios data area |
6b18ae3e | 38 | * @memory_setup: platform specific memory setup |
f7cf5a5b TG |
39 | * |
40 | */ | |
41 | struct x86_init_resources { | |
42 | void (*probe_roms)(void); | |
8fee697d | 43 | void (*reserve_resources)(void); |
816c25e7 | 44 | void (*reserve_ebda_region)(void); |
6b18ae3e | 45 | char *(*memory_setup)(void); |
f7cf5a5b TG |
46 | }; |
47 | ||
d9112f43 TG |
48 | /** |
49 | * struct x86_init_irqs - platform specific interrupt setup | |
50 | * @pre_vector_init: init code to run before interrupt vectors | |
51 | * are set up. | |
66bcaf0b | 52 | * @intr_init: interrupt init code |
428cf902 | 53 | * @trap_init: platform specific trap setup |
d9112f43 TG |
54 | */ |
55 | struct x86_init_irqs { | |
56 | void (*pre_vector_init)(void); | |
66bcaf0b | 57 | void (*intr_init)(void); |
428cf902 | 58 | void (*trap_init)(void); |
d9112f43 TG |
59 | }; |
60 | ||
42bbdb43 TG |
61 | /** |
62 | * struct x86_init_oem - oem platform specific customizing functions | |
63 | * @arch_setup: platform specific architecure setup | |
6f30c1ac | 64 | * @banner: print a platform specific banner |
42bbdb43 TG |
65 | */ |
66 | struct x86_init_oem { | |
67 | void (*arch_setup)(void); | |
6f30c1ac | 68 | void (*banner)(void); |
42bbdb43 TG |
69 | }; |
70 | ||
030cb6c0 TG |
71 | /** |
72 | * 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 | */ | |
76 | struct x86_init_paging { | |
77 | void (*pagetable_setup_start)(pgd_t *base); | |
78 | void (*pagetable_setup_done)(pgd_t *base); | |
79 | }; | |
80 | ||
736decac TG |
81 | /** |
82 | * 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 | |
845b3944 TG |
85 | * @tsc_pre_init: platform function called before TSC init |
86 | * @timer_init: initialize the platform timer (default PIT/HPET) | |
736decac TG |
87 | */ |
88 | struct x86_init_timers { | |
89 | void (*setup_percpu_clockev)(void); | |
845b3944 TG |
90 | void (*tsc_pre_init)(void); |
91 | void (*timer_init)(void); | |
736decac TG |
92 | }; |
93 | ||
57844a8f TG |
94 | /** |
95 | * struct x86_init_ops - functions for platform specific setup | |
96 | * | |
97 | */ | |
98 | struct x86_init_ops { | |
f4848472 TG |
99 | struct x86_init_resources resources; |
100 | struct x86_init_mpparse mpparse; | |
d9112f43 | 101 | struct x86_init_irqs irqs; |
42bbdb43 | 102 | struct x86_init_oem oem; |
030cb6c0 | 103 | struct x86_init_paging paging; |
736decac TG |
104 | struct x86_init_timers timers; |
105 | }; | |
106 | ||
107 | /** | |
108 | * struct x86_cpuinit_ops - platform specific cpu hotplug setups | |
109 | * @setup_percpu_clockev: set up the per cpu clock event device | |
110 | */ | |
111 | struct x86_cpuinit_ops { | |
112 | void (*setup_percpu_clockev)(void); | |
57844a8f TG |
113 | }; |
114 | ||
115 | extern struct x86_init_ops x86_init; | |
736decac | 116 | extern struct x86_cpuinit_ops x86_cpuinit; |
57844a8f TG |
117 | |
118 | extern void x86_init_noop(void); | |
f4848472 | 119 | extern void x86_init_uint_noop(unsigned int unused); |
57844a8f TG |
120 | |
121 | #endif |