blob: 07c37bd879f8a630343ffa0579e0e94f3be1438e [file] [log] [blame]
Thomas Gleixner57844a82009-08-19 14:48:38 +02001#ifndef _ASM_X86_PLATFORM_H
2#define _ASM_X86_PLATFORM_H
3
Thomas Gleixner52fdb562009-08-20 12:45:33 +02004struct mpc_bus;
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +02005struct mpc_cpu;
Thomas Gleixner72302142009-08-20 12:18:32 +02006struct mpc_table;
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +02007
Thomas Gleixner57844a82009-08-19 14:48:38 +02008/**
Thomas Gleixnerf4848472009-08-20 12:05:01 +02009 * struct x86_init_mpparse - platform specific mpparse ops
10 * @mpc_record: platform specific mpc record accounting
Thomas Gleixnerde934102009-08-20 09:27:29 +020011 * @setup_ioapic_ids: platform specific ioapic id override
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +020012 * @mpc_apic_id: platform specific mpc apic id assignment
Thomas Gleixner72302142009-08-20 12:18:32 +020013 * @smp_read_mpc_oem: platform specific oem mpc table setup
Thomas Gleixner52fdb562009-08-20 12:45:33 +020014 * @mpc_oem_pci_bus: platform specific pci bus setup (default NULL)
Thomas Gleixner90e1c692009-08-20 12:34:47 +020015 * @mpc_oem_bus_info: platform specific mpc bus info
Thomas Gleixnerb3f1b612009-08-20 11:11:52 +020016 * @find_smp_config: find the smp configuration
17 * @get_smp_config: get the smp configuration
Thomas Gleixnerf4848472009-08-20 12:05:01 +020018 */
19struct x86_init_mpparse {
20 void (*mpc_record)(unsigned int mode);
Thomas Gleixnerde934102009-08-20 09:27:29 +020021 void (*setup_ioapic_ids)(void);
Thomas Gleixnerfd6c6662009-08-20 10:41:58 +020022 int (*mpc_apic_id)(struct mpc_cpu *m);
Thomas Gleixner72302142009-08-20 12:18:32 +020023 void (*smp_read_mpc_oem)(struct mpc_table *mpc);
Thomas Gleixner52fdb562009-08-20 12:45:33 +020024 void (*mpc_oem_pci_bus)(struct mpc_bus *m);
Thomas Gleixner90e1c692009-08-20 12:34:47 +020025 void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
Thomas Gleixnerb3f1b612009-08-20 11:11:52 +020026 void (*find_smp_config)(unsigned int reserve);
27 void (*get_smp_config)(unsigned int early);
Thomas Gleixnerf4848472009-08-20 12:05:01 +020028};
29
30/**
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020031 * struct x86_init_resources - platform specific resource related ops
32 * @probe_roms: probe BIOS roms
Thomas Gleixner8fee6972009-08-19 14:55:50 +020033 * @reserve_resources: reserve the standard resources for the
34 * platform
Thomas Gleixner816c25e2009-08-19 14:36:27 +020035 * @reserve_ebda_region: reserve the extended bios data area
Thomas Gleixner6b18ae32009-08-20 10:19:54 +020036 * @memory_setup: platform specific memory setup
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020037 *
38 */
39struct x86_init_resources {
40 void (*probe_roms)(void);
Thomas Gleixner8fee6972009-08-19 14:55:50 +020041 void (*reserve_resources)(void);
Thomas Gleixner816c25e2009-08-19 14:36:27 +020042 void (*reserve_ebda_region)(void);
Thomas Gleixner6b18ae32009-08-20 10:19:54 +020043 char *(*memory_setup)(void);
Thomas Gleixnerf7cf5a52009-08-19 14:43:56 +020044};
45
46/**
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020047 * struct x86_init_irqs - platform specific interrupt setup
48 * @pre_vector_init: init code to run before interrupt vectors
49 * are set up.
Thomas Gleixner66bcaf02009-08-20 09:59:09 +020050 * @intr_init: interrupt init code
Thomas Gleixner428cf902009-08-20 10:35:46 +020051 * @trap_init: platform specific trap setup
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020052 */
53struct x86_init_irqs {
54 void (*pre_vector_init)(void);
Thomas Gleixner66bcaf02009-08-20 09:59:09 +020055 void (*intr_init)(void);
Thomas Gleixner428cf902009-08-20 10:35:46 +020056 void (*trap_init)(void);
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020057};
58
59/**
Thomas Gleixner57844a82009-08-19 14:48:38 +020060 * struct x86_init_ops - functions for platform specific setup
61 *
62 */
63struct x86_init_ops {
Thomas Gleixnerf4848472009-08-20 12:05:01 +020064 struct x86_init_resources resources;
65 struct x86_init_mpparse mpparse;
Thomas Gleixnerd9112f42009-08-20 09:41:38 +020066 struct x86_init_irqs irqs;
Thomas Gleixner57844a82009-08-19 14:48:38 +020067};
68
69extern struct x86_init_ops x86_init;
70
71extern void x86_init_noop(void);
Thomas Gleixnerf4848472009-08-20 12:05:01 +020072extern void x86_init_uint_noop(unsigned int unused);
Thomas Gleixner57844a82009-08-19 14:48:38 +020073
74#endif