xref: /openbmc/linux/arch/x86/include/asm/x86_init.h (revision 4338e40d)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
257844a8fSThomas Gleixner #ifndef _ASM_X86_PLATFORM_H
357844a8fSThomas Gleixner #define _ASM_X86_PLATFORM_H
457844a8fSThomas Gleixner 
547a3d5daSThomas Gleixner #include <asm/bootparam.h>
6030cb6c0SThomas Gleixner 
7f6a9f8a4SJoerg Roedel struct ghcb;
852fdb568SThomas Gleixner struct mpc_bus;
9fd6c6661SThomas Gleixner struct mpc_cpu;
10f6a9f8a4SJoerg Roedel struct pt_regs;
1172302142SThomas Gleixner struct mpc_table;
1264be4c1cSDaniel J Blueman struct cpuinfo_x86;
136b15ffa0SThomas Gleixner struct irq_domain;
14fd6c6661SThomas Gleixner 
1557844a8fSThomas Gleixner /**
16f4848472SThomas Gleixner  * struct x86_init_mpparse - platform specific mpparse ops
17de934103SThomas Gleixner  * @setup_ioapic_ids:		platform specific ioapic id override
18b3f1b617SThomas Gleixner  * @find_smp_config:		find the smp configuration
19b3f1b617SThomas Gleixner  * @get_smp_config:		get the smp configuration
20f4848472SThomas Gleixner  */
21f4848472SThomas Gleixner struct x86_init_mpparse {
22de934103SThomas Gleixner 	void (*setup_ioapic_ids)(void);
23b24c2a92SYinghai Lu 	void (*find_smp_config)(void);
24b3f1b617SThomas Gleixner 	void (*get_smp_config)(unsigned int early);
25f4848472SThomas Gleixner };
26f4848472SThomas Gleixner 
27f4848472SThomas Gleixner /**
28f7cf5a5bSThomas Gleixner  * struct x86_init_resources - platform specific resource related ops
29f7cf5a5bSThomas Gleixner  * @probe_roms:			probe BIOS roms
308fee697dSThomas Gleixner  * @reserve_resources:		reserve the standard resources for the
318fee697dSThomas Gleixner  *				platform
326b18ae3eSThomas Gleixner  * @memory_setup:		platform specific memory setup
334338e40dSKevin Loughlin  * @dmi_setup:			platform specific DMI setup
34f7cf5a5bSThomas Gleixner  */
35f7cf5a5bSThomas Gleixner struct x86_init_resources {
36f7cf5a5bSThomas Gleixner 	void (*probe_roms)(void);
378fee697dSThomas Gleixner 	void (*reserve_resources)(void);
386b18ae3eSThomas Gleixner 	char *(*memory_setup)(void);
394338e40dSKevin Loughlin 	void (*dmi_setup)(void);
40f7cf5a5bSThomas Gleixner };
41f7cf5a5bSThomas Gleixner 
42f7cf5a5bSThomas Gleixner /**
43d9112f43SThomas Gleixner  * struct x86_init_irqs - platform specific interrupt setup
44d9112f43SThomas Gleixner  * @pre_vector_init:		init code to run before interrupt vectors
45d9112f43SThomas Gleixner  *				are set up.
4666bcaf0bSThomas Gleixner  * @intr_init:			interrupt init code
4797992387SThomas Gleixner  * @intr_mode_select:		interrupt delivery mode selection
4834fba3e6SDou Liyang  * @intr_mode_init:		interrupt delivery mode setup
496b15ffa0SThomas Gleixner  * @create_pci_msi_domain:	Create the PCI/MSI interrupt domain
50d9112f43SThomas Gleixner  */
51d9112f43SThomas Gleixner struct x86_init_irqs {
52d9112f43SThomas Gleixner 	void (*pre_vector_init)(void);
5366bcaf0bSThomas Gleixner 	void (*intr_init)(void);
5497992387SThomas Gleixner 	void (*intr_mode_select)(void);
5534fba3e6SDou Liyang 	void (*intr_mode_init)(void);
566b15ffa0SThomas Gleixner 	struct irq_domain *(*create_pci_msi_domain)(void);
57d9112f43SThomas Gleixner };
58d9112f43SThomas Gleixner 
59d9112f43SThomas Gleixner /**
6042bbdb43SThomas Gleixner  * struct x86_init_oem - oem platform specific customizing functions
6122d3c0d6SDmitry Torokhov  * @arch_setup:			platform specific architecture setup
626f30c1acSThomas Gleixner  * @banner:			print a platform specific banner
6342bbdb43SThomas Gleixner  */
6442bbdb43SThomas Gleixner struct x86_init_oem {
6542bbdb43SThomas Gleixner 	void (*arch_setup)(void);
666f30c1acSThomas Gleixner 	void (*banner)(void);
6742bbdb43SThomas Gleixner };
6842bbdb43SThomas Gleixner 
6942bbdb43SThomas Gleixner /**
70030cb6c0SThomas Gleixner  * struct x86_init_paging - platform specific paging functions
7164282278SAttilio Rao  * @pagetable_init:	platform specific paging initialization call to setup
7264282278SAttilio Rao  *			the kernel pagetables and prepare accessors functions.
7364282278SAttilio Rao  *			Callback must call paging_init(). Called once after the
7464282278SAttilio Rao  *			direct mapping for phys memory is available.
75030cb6c0SThomas Gleixner  */
76030cb6c0SThomas Gleixner struct x86_init_paging {
777737b215SAttilio Rao 	void (*pagetable_init)(void);
78030cb6c0SThomas Gleixner };
79030cb6c0SThomas Gleixner 
80030cb6c0SThomas Gleixner /**
81736decacSThomas Gleixner  * struct x86_init_timers - platform specific timer setup
82736decacSThomas Gleixner  * @setup_perpcu_clockev:	set up the per cpu clock event device for the
83736decacSThomas Gleixner  *				boot cpu
84845b3944SThomas Gleixner  * @timer_init:			initialize the platform timer (default PIT/HPET)
856b617e22SFeng Tang  * @wallclock_init:		init the wallclock device
86736decacSThomas Gleixner  */
87736decacSThomas Gleixner struct x86_init_timers {
88736decacSThomas Gleixner 	void (*setup_percpu_clockev)(void);
89845b3944SThomas Gleixner 	void (*timer_init)(void);
906b617e22SFeng Tang 	void (*wallclock_init)(void);
91736decacSThomas Gleixner };
92736decacSThomas Gleixner 
93736decacSThomas Gleixner /**
94d07c1be0SFUJITA Tomonori  * struct x86_init_iommu - platform specific iommu setup
95d07c1be0SFUJITA Tomonori  * @iommu_init:			platform specific iommu setup
96d07c1be0SFUJITA Tomonori  */
97d07c1be0SFUJITA Tomonori struct x86_init_iommu {
98d07c1be0SFUJITA Tomonori 	int (*iommu_init)(void);
99d07c1be0SFUJITA Tomonori };
100d07c1be0SFUJITA Tomonori 
101d07c1be0SFUJITA Tomonori /**
102b72d0db9SThomas Gleixner  * struct x86_init_pci - platform specific pci init functions
1034fb6088aSThomas Gleixner  * @arch_init:			platform specific pci arch init call
1044fb6088aSThomas Gleixner  * @init:			platform specific pci subsystem init
105ab3b3793SThomas Gleixner  * @init_irq:			platform specific pci irq init
1069325a28cSThomas Gleixner  * @fixup_irqs:			platform specific pci irq fixup
107b72d0db9SThomas Gleixner  */
108b72d0db9SThomas Gleixner struct x86_init_pci {
1094fb6088aSThomas Gleixner 	int (*arch_init)(void);
110b72d0db9SThomas Gleixner 	int (*init)(void);
111ab3b3793SThomas Gleixner 	void (*init_irq)(void);
1129325a28cSThomas Gleixner 	void (*fixup_irqs)(void);
113b72d0db9SThomas Gleixner };
114b72d0db9SThomas Gleixner 
11557844a8fSThomas Gleixner /**
116f72e38e8SJuergen Gross  * struct x86_hyper_init - x86 hypervisor init functions
117f72e38e8SJuergen Gross  * @init_platform:		platform setup
118f3614646SJuergen Gross  * @guest_late_init:		guest late init
119f72e38e8SJuergen Gross  * @x2apic_available:		X2APIC detection
120ab0f59c6SDavid Woodhouse  * @msi_ext_dest_id:		MSI supports 15-bit APIC IDs
121f72e38e8SJuergen Gross  * @init_mem_mapping:		setup early mappings during init_mem_mapping()
1226f84f8d1SPavel Tatashin  * @init_after_bootmem:		guest init after boot allocator is finished
123f72e38e8SJuergen Gross  */
124f72e38e8SJuergen Gross struct x86_hyper_init {
125f72e38e8SJuergen Gross 	void (*init_platform)(void);
126f3614646SJuergen Gross 	void (*guest_late_init)(void);
127f72e38e8SJuergen Gross 	bool (*x2apic_available)(void);
128ab0f59c6SDavid Woodhouse 	bool (*msi_ext_dest_id)(void);
129f72e38e8SJuergen Gross 	void (*init_mem_mapping)(void);
1306f84f8d1SPavel Tatashin 	void (*init_after_bootmem)(void);
131f72e38e8SJuergen Gross };
132f72e38e8SJuergen Gross 
133f72e38e8SJuergen Gross /**
134038bac2bSJuergen Gross  * struct x86_init_acpi - x86 ACPI init functions
13541fa1ee9SJosh Boyer  * @set_root_poitner:		set RSDP address
136038bac2bSJuergen Gross  * @get_root_pointer:		get RSDP address
13781b53e5fSAndy Shevchenko  * @reduced_hw_early_init:	hardware reduced platform early init
138038bac2bSJuergen Gross  */
139038bac2bSJuergen Gross struct x86_init_acpi {
14041fa1ee9SJosh Boyer 	void (*set_root_pointer)(u64 addr);
141038bac2bSJuergen Gross 	u64 (*get_root_pointer)(void);
14281b53e5fSAndy Shevchenko 	void (*reduced_hw_early_init)(void);
143038bac2bSJuergen Gross };
144038bac2bSJuergen Gross 
145038bac2bSJuergen Gross /**
1461e8c5971SBrijesh Singh  * struct x86_guest - Functions used by misc guest incarnations like SEV, TDX, etc.
1471e8c5971SBrijesh Singh  *
1481e8c5971SBrijesh Singh  * @enc_status_change_prepare	Notify HV before the encryption status of a range is changed
1491e8c5971SBrijesh Singh  * @enc_status_change_finish	Notify HV after the encryption status of a range is changed
1501e8c5971SBrijesh Singh  * @enc_tlb_flush_required	Returns true if a TLB flush is needed before changing page encryption status
1511e8c5971SBrijesh Singh  * @enc_cache_flush_required	Returns true if a cache flush is needed before changing page encryption status
1521e8c5971SBrijesh Singh  */
1531e8c5971SBrijesh Singh struct x86_guest {
1543f6819ddSKirill A. Shutemov 	bool (*enc_status_change_prepare)(unsigned long vaddr, int npages, bool enc);
1551e8c5971SBrijesh Singh 	bool (*enc_status_change_finish)(unsigned long vaddr, int npages, bool enc);
1561e8c5971SBrijesh Singh 	bool (*enc_tlb_flush_required)(bool enc);
1571e8c5971SBrijesh Singh 	bool (*enc_cache_flush_required)(void);
1581e8c5971SBrijesh Singh };
1591e8c5971SBrijesh Singh 
1601e8c5971SBrijesh Singh /**
16157844a8fSThomas Gleixner  * struct x86_init_ops - functions for platform specific setup
16257844a8fSThomas Gleixner  *
16357844a8fSThomas Gleixner  */
16457844a8fSThomas Gleixner struct x86_init_ops {
165f7cf5a5bSThomas Gleixner 	struct x86_init_resources	resources;
166f4848472SThomas Gleixner 	struct x86_init_mpparse		mpparse;
167d9112f43SThomas Gleixner 	struct x86_init_irqs		irqs;
16842bbdb43SThomas Gleixner 	struct x86_init_oem		oem;
169030cb6c0SThomas Gleixner 	struct x86_init_paging		paging;
170736decacSThomas Gleixner 	struct x86_init_timers		timers;
171d07c1be0SFUJITA Tomonori 	struct x86_init_iommu		iommu;
172b72d0db9SThomas Gleixner 	struct x86_init_pci		pci;
173f72e38e8SJuergen Gross 	struct x86_hyper_init		hyper;
174038bac2bSJuergen Gross 	struct x86_init_acpi		acpi;
175736decacSThomas Gleixner };
176736decacSThomas Gleixner 
177736decacSThomas Gleixner /**
178736decacSThomas Gleixner  * struct x86_cpuinit_ops - platform specific cpu hotplug setups
179736decacSThomas Gleixner  * @setup_percpu_clockev:	set up the per cpu clock event device
180df156f90SIgor Mammedov  * @early_percpu_clock_init:	early init of the per cpu clock event device
181ff3cfcb0SThomas Gleixner  * @fixup_cpu_id:		fixup function for cpuinfo_x86::phys_proc_id
182ff3cfcb0SThomas Gleixner  * @parallel_bringup:		Parallel bringup control
183736decacSThomas Gleixner  */
184736decacSThomas Gleixner struct x86_cpuinit_ops {
185736decacSThomas Gleixner 	void (*setup_percpu_clockev)(void);
186df156f90SIgor Mammedov 	void (*early_percpu_clock_init)(void);
18764be4c1cSDaniel J Blueman 	void (*fixup_cpu_id)(struct cpuinfo_x86 *c, int node);
188ff3cfcb0SThomas Gleixner 	bool parallel_bringup;
18957844a8fSThomas Gleixner };
19057844a8fSThomas Gleixner 
191e27c4929SArnd Bergmann struct timespec64;
1923565184eSDavid Vrabel 
1932d826404SThomas Gleixner /**
19480dfd83dSLuis R. Rodriguez  * struct x86_legacy_devices - legacy x86 devices
19580dfd83dSLuis R. Rodriguez  *
19680dfd83dSLuis R. Rodriguez  * @pnpbios: this platform can have a PNPBIOS. If this is disabled the platform
19780dfd83dSLuis R. Rodriguez  * 	is known to never have a PNPBIOS.
19880dfd83dSLuis R. Rodriguez  *
19980dfd83dSLuis R. Rodriguez  * These are devices known to require LPC or ISA bus. The definition of legacy
20080dfd83dSLuis R. Rodriguez  * devices adheres to the ACPI 5.2.9.3 IA-PC Boot Architecture flag
20180dfd83dSLuis R. Rodriguez  * ACPI_FADT_LEGACY_DEVICES. These devices consist of user visible devices on
20280dfd83dSLuis R. Rodriguez  * the LPC or ISA bus. User visible devices are devices that have end-user
20380dfd83dSLuis R. Rodriguez  * accessible connectors (for example, LPT parallel port). Legacy devices on
20480dfd83dSLuis R. Rodriguez  * the LPC bus consist for example of serial and parallel ports, PS/2 keyboard
20580dfd83dSLuis R. Rodriguez  * / mouse, and the floppy disk controller. A system that lacks all known
20680dfd83dSLuis R. Rodriguez  * legacy devices can assume all devices can be detected exclusively via
20780dfd83dSLuis R. Rodriguez  * standard device enumeration mechanisms including the ACPI namespace.
20880dfd83dSLuis R. Rodriguez  *
20980dfd83dSLuis R. Rodriguez  * A system which has does not have ACPI_FADT_LEGACY_DEVICES enabled must not
21080dfd83dSLuis R. Rodriguez  * have any of the legacy devices enumerated below present.
21180dfd83dSLuis R. Rodriguez  */
21280dfd83dSLuis R. Rodriguez struct x86_legacy_devices {
21380dfd83dSLuis R. Rodriguez 	int pnpbios;
21480dfd83dSLuis R. Rodriguez };
21580dfd83dSLuis R. Rodriguez 
21680dfd83dSLuis R. Rodriguez /**
21793ffa9a4SDmitry Torokhov  * enum x86_legacy_i8042_state - i8042 keyboard controller state
21893ffa9a4SDmitry Torokhov  * @X86_LEGACY_I8042_PLATFORM_ABSENT: the controller is always absent on
21993ffa9a4SDmitry Torokhov  *	given platform/subarch.
22093ffa9a4SDmitry Torokhov  * @X86_LEGACY_I8042_FIRMWARE_ABSENT: firmware reports that the controller
22193ffa9a4SDmitry Torokhov  *	is absent.
22293ffa9a4SDmitry Torokhov  * @X86_LEGACY_i8042_EXPECTED_PRESENT: the controller is likely to be
22393ffa9a4SDmitry Torokhov  *	present, the i8042 driver should probe for controller existence.
22493ffa9a4SDmitry Torokhov  */
22593ffa9a4SDmitry Torokhov enum x86_legacy_i8042_state {
22693ffa9a4SDmitry Torokhov 	X86_LEGACY_I8042_PLATFORM_ABSENT,
22793ffa9a4SDmitry Torokhov 	X86_LEGACY_I8042_FIRMWARE_ABSENT,
22893ffa9a4SDmitry Torokhov 	X86_LEGACY_I8042_EXPECTED_PRESENT,
22993ffa9a4SDmitry Torokhov };
23093ffa9a4SDmitry Torokhov 
23193ffa9a4SDmitry Torokhov /**
2328d152e7aSLuis R. Rodriguez  * struct x86_legacy_features - legacy x86 features
2338d152e7aSLuis R. Rodriguez  *
23493ffa9a4SDmitry Torokhov  * @i8042: indicated if we expect the device to have i8042 controller
23593ffa9a4SDmitry Torokhov  *	present.
2368d152e7aSLuis R. Rodriguez  * @rtc: this device has a CMOS real-time clock present
23730f02739SAndy Lutomirski  * @reserve_bios_regions: boot code will search for the EBDA address and the
23830f02739SAndy Lutomirski  * 	start of the 640k - 1M BIOS region.  If false, the platform must
23930f02739SAndy Lutomirski  * 	ensure that its memory map correctly reserves sub-1MB regions as needed.
24080dfd83dSLuis R. Rodriguez  * @devices: legacy x86 devices, refer to struct x86_legacy_devices
24180dfd83dSLuis R. Rodriguez  * 	documentation for further details.
2428d152e7aSLuis R. Rodriguez  */
2438d152e7aSLuis R. Rodriguez struct x86_legacy_features {
24493ffa9a4SDmitry Torokhov 	enum x86_legacy_i8042_state i8042;
2458d152e7aSLuis R. Rodriguez 	int rtc;
246e348caefSJan Kiszka 	int warm_reset;
2476d730525SJuergen Gross 	int no_vga;
248edce2121SIngo Molnar 	int reserve_bios_regions;
24980dfd83dSLuis R. Rodriguez 	struct x86_legacy_devices devices;
2508d152e7aSLuis R. Rodriguez };
2518d152e7aSLuis R. Rodriguez 
2528d152e7aSLuis R. Rodriguez /**
253f72e38e8SJuergen Gross  * struct x86_hyper_runtime - x86 hypervisor specific runtime callbacks
254f72e38e8SJuergen Gross  *
255f6a9f8a4SJoerg Roedel  * @pin_vcpu:			pin current vcpu to specified physical
256f6a9f8a4SJoerg Roedel  *				cpu (run rarely)
257f6a9f8a4SJoerg Roedel  * @sev_es_hcall_prepare:	Load additional hypervisor-specific
258f6a9f8a4SJoerg Roedel  *				state into the GHCB when doing a VMMCALL under
259f6a9f8a4SJoerg Roedel  *				SEV-ES. Called from the #VC exception handler.
260f6a9f8a4SJoerg Roedel  * @sev_es_hcall_finish:	Copies state from the GHCB back into the
261f6a9f8a4SJoerg Roedel  *				processor (or pt_regs). Also runs checks on the
262f6a9f8a4SJoerg Roedel  *				state returned from the hypervisor after a
263f6a9f8a4SJoerg Roedel  *				VMMCALL under SEV-ES.  Needs to return 'false'
264f6a9f8a4SJoerg Roedel  *				if the checks fail.  Called from the #VC
265f6a9f8a4SJoerg Roedel  *				exception handler.
26688e378d4SMichael Kelley  * @is_private_mmio:		For CoCo VMs, must map MMIO address as private.
26788e378d4SMichael Kelley  *				Used when device is emulated by a paravisor
26888e378d4SMichael Kelley  *				layer in the VM context.
269f72e38e8SJuergen Gross  */
270f72e38e8SJuergen Gross struct x86_hyper_runtime {
271f72e38e8SJuergen Gross 	void (*pin_vcpu)(int cpu);
272f6a9f8a4SJoerg Roedel 	void (*sev_es_hcall_prepare)(struct ghcb *ghcb, struct pt_regs *regs);
273f6a9f8a4SJoerg Roedel 	bool (*sev_es_hcall_finish)(struct ghcb *ghcb, struct pt_regs *regs);
27488e378d4SMichael Kelley 	bool (*is_private_mmio)(u64 addr);
275f72e38e8SJuergen Gross };
276f72e38e8SJuergen Gross 
277f72e38e8SJuergen Gross /**
2782d826404SThomas Gleixner  * struct x86_platform_ops - platform specific runtime functions
279aa297292SLen Brown  * @calibrate_cpu:		calibrate CPU
280aa297292SLen Brown  * @calibrate_tsc:		calibrate TSC, if different from CPU
2817bd867dfSFeng Tang  * @get_wallclock:		get time from HW clock like RTC etc.
2827bd867dfSFeng Tang  * @set_wallclock:		set time back to HW clock
283eb41c8beSH. Peter Anvin  * @is_untracked_pat_range	exclude from PAT logic
28478c06176SRuss Anderson  * @nmi_init			enable NMI on cpus
285b74f05d6SMarcelo Tosatti  * @save_sched_clock_state:	save state for sched_clock() on suspend
286b74f05d6SMarcelo Tosatti  * @restore_sched_clock_state:	restore state for sched_clock() on resume
28722d3c0d6SDmitry Torokhov  * @apic_post_init:		adjust apic if needed
2888d152e7aSLuis R. Rodriguez  * @legacy:			legacy features
2898d152e7aSLuis R. Rodriguez  * @set_legacy_features:	override legacy features. Use of this callback
2908d152e7aSLuis R. Rodriguez  * 				is highly discouraged. You should only need
2918d152e7aSLuis R. Rodriguez  * 				this if your hardware platform requires further
29222d3c0d6SDmitry Torokhov  * 				custom fine tuning far beyond what may be
2938d152e7aSLuis R. Rodriguez  * 				possible in x86_early_init_platform_quirks() by
2948d152e7aSLuis R. Rodriguez  * 				only using the current x86_hardware_subarch
2958d152e7aSLuis R. Rodriguez  * 				semantics.
296f1e52500SJuergen Gross  * @realmode_reserve:		reserve memory for realmode trampoline
297f1e52500SJuergen Gross  * @realmode_init:		initialize realmode trampoline
298f72e38e8SJuergen Gross  * @hyper:			x86 hypervisor specific runtime callbacks
2992d826404SThomas Gleixner  */
3002d826404SThomas Gleixner struct x86_platform_ops {
301aa297292SLen Brown 	unsigned long (*calibrate_cpu)(void);
3022d826404SThomas Gleixner 	unsigned long (*calibrate_tsc)(void);
303e27c4929SArnd Bergmann 	void (*get_wallclock)(struct timespec64 *ts);
304e27c4929SArnd Bergmann 	int (*set_wallclock)(const struct timespec64 *ts);
305338bac52SFUJITA Tomonori 	void (*iommu_shutdown)(void);
306eb41c8beSH. Peter Anvin 	bool (*is_untracked_pat_range)(u64 start, u64 end);
30778c06176SRuss Anderson 	void (*nmi_init)(void);
308064a59b6SJacob Pan 	unsigned char (*get_nmi_reason)(void);
309b74f05d6SMarcelo Tosatti 	void (*save_sched_clock_state)(void);
310b74f05d6SMarcelo Tosatti 	void (*restore_sched_clock_state)(void);
3117db971b2SIdo Yariv 	void (*apic_post_init)(void);
3128d152e7aSLuis R. Rodriguez 	struct x86_legacy_features legacy;
3138d152e7aSLuis R. Rodriguez 	void (*set_legacy_features)(void);
314f1e52500SJuergen Gross 	void (*realmode_reserve)(void);
315f1e52500SJuergen Gross 	void (*realmode_init)(void);
316f72e38e8SJuergen Gross 	struct x86_hyper_runtime hyper;
3171e8c5971SBrijesh Singh 	struct x86_guest guest;
3182d826404SThomas Gleixner };
3192d826404SThomas Gleixner 
32051b146c5SBaoquan He struct x86_apic_ops {
32151b146c5SBaoquan He 	unsigned int	(*io_apic_read)   (unsigned int apic, unsigned int reg);
32251b146c5SBaoquan He 	void		(*restore)(void);
3234a8e2a31SKonrad Rzeszutek Wilk };
3244a8e2a31SKonrad Rzeszutek Wilk 
32557844a8fSThomas Gleixner extern struct x86_init_ops x86_init;
326736decacSThomas Gleixner extern struct x86_cpuinit_ops x86_cpuinit;
3272d826404SThomas Gleixner extern struct x86_platform_ops x86_platform;
328294ee6f8SStefano Stabellini extern struct x86_msi_ops x86_msi;
32951b146c5SBaoquan He extern struct x86_apic_ops x86_apic_ops;
3308d152e7aSLuis R. Rodriguez 
3318d152e7aSLuis R. Rodriguez extern void x86_early_init_platform_quirks(void);
33257844a8fSThomas Gleixner extern void x86_init_noop(void);
333f4848472SThomas Gleixner extern void x86_init_uint_noop(unsigned int unused);
334bef6e0aeSZhenzhong Duan extern bool bool_x86_init_noop(void);
335bef6e0aeSZhenzhong Duan extern void x86_op_int_noop(int cpu);
336f79b1c57SRajneesh Bhardwaj extern bool x86_pnpbios_disabled(void);
337d21a19e1SSaurabh Sengar extern int set_rtc_noop(const struct timespec64 *now);
338d21a19e1SSaurabh Sengar extern void get_rtc_noop(struct timespec64 *now);
33957844a8fSThomas Gleixner 
34057844a8fSThomas Gleixner #endif
341