1 /*
2  * Copyright (c) 2019 Intel Corporation
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #ifndef ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_
7 #define ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_
8 
9 #include <zephyr/kernel_structs.h>
10 
11 #include <zephyr/platform/hooks.h>
12 
13 #ifndef _ASMLANGUAGE
14 
15 extern void z_x86_switch(void *switch_to, void **switched_from);
16 
arch_switch(void * switch_to,void ** switched_from)17 static inline void arch_switch(void *switch_to, void **switched_from)
18 {
19 	z_x86_switch(switch_to, switched_from);
20 }
21 
22 /**
23  * @brief Initialize scheduler IPI vector.
24  *
25  * Called in early BSP boot to set up scheduler IPI handling.
26  */
27 
28 extern void z_x86_ipi_setup(void);
29 
arch_kernel_init(void)30 static inline void arch_kernel_init(void)
31 {
32 #ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
33 	soc_per_core_init_hook();
34 #endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
35 }
36 
37 FUNC_NORETURN void z_x86_cpu_init(struct x86_cpuboot *cpuboot);
38 
39 void x86_sse_init(struct k_thread *thread);
40 
41 void z_x86_syscall_entry_stub(void);
42 
43 bool z_x86_do_kernel_nmi(const struct arch_esf *esf);
44 
45 #endif /* _ASMLANGUAGE */
46 
47 #endif /* ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_ */
48