xref: /openbmc/linux/arch/x86/include/asm/x86_init.h (revision 42bbdb43)
1 #ifndef _ASM_X86_PLATFORM_H
2 #define _ASM_X86_PLATFORM_H
3 
4 struct mpc_bus;
5 struct mpc_cpu;
6 struct mpc_table;
7 
8 /**
9  * struct x86_init_mpparse - platform specific mpparse ops
10  * @mpc_record:			platform specific mpc record accounting
11  * @setup_ioapic_ids:		platform specific ioapic id override
12  * @mpc_apic_id:		platform specific mpc apic id assignment
13  * @smp_read_mpc_oem:		platform specific oem mpc table setup
14  * @mpc_oem_pci_bus:		platform specific pci bus setup (default NULL)
15  * @mpc_oem_bus_info:		platform specific mpc bus info
16  * @find_smp_config:		find the smp configuration
17  * @get_smp_config:		get the smp configuration
18  */
19 struct x86_init_mpparse {
20 	void (*mpc_record)(unsigned int mode);
21 	void (*setup_ioapic_ids)(void);
22 	int (*mpc_apic_id)(struct mpc_cpu *m);
23 	void (*smp_read_mpc_oem)(struct mpc_table *mpc);
24 	void (*mpc_oem_pci_bus)(struct mpc_bus *m);
25 	void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
26 	void (*find_smp_config)(unsigned int reserve);
27 	void (*get_smp_config)(unsigned int early);
28 };
29 
30 /**
31  * struct x86_init_resources - platform specific resource related ops
32  * @probe_roms:			probe BIOS roms
33  * @reserve_resources:		reserve the standard resources for the
34  *				platform
35  * @reserve_ebda_region:	reserve the extended bios data area
36  * @memory_setup:		platform specific memory setup
37  *
38  */
39 struct x86_init_resources {
40 	void (*probe_roms)(void);
41 	void (*reserve_resources)(void);
42 	void (*reserve_ebda_region)(void);
43 	char *(*memory_setup)(void);
44 };
45 
46 /**
47  * struct x86_init_irqs - platform specific interrupt setup
48  * @pre_vector_init:		init code to run before interrupt vectors
49  *				are set up.
50  * @intr_init:			interrupt init code
51  * @trap_init:			platform specific trap setup
52  */
53 struct x86_init_irqs {
54 	void (*pre_vector_init)(void);
55 	void (*intr_init)(void);
56 	void (*trap_init)(void);
57 };
58 
59 /**
60  * struct x86_init_oem - oem platform specific customizing functions
61  * @arch_setup:			platform specific architecure setup
62  */
63 struct x86_init_oem {
64 	void (*arch_setup)(void);
65 };
66 
67 /**
68  * struct x86_init_ops - functions for platform specific setup
69  *
70  */
71 struct x86_init_ops {
72 	struct x86_init_resources	resources;
73 	struct x86_init_mpparse		mpparse;
74 	struct x86_init_irqs		irqs;
75 	struct x86_init_oem		oem;
76 };
77 
78 extern struct x86_init_ops x86_init;
79 
80 extern void x86_init_noop(void);
81 extern void x86_init_uint_noop(unsigned int unused);
82 
83 #endif
84