4 #include "arch_proto.h" /* K_STACK_SIZE */
6 #define MAX_NR_INTERRUPT_ENTRIES 128
10 /* returns the current cpu id */
11 #define cpuid (((u32_t *)(((u32_t)get_stack_frame() + (K_STACK_SIZE - 1)) \
12 & ~(K_STACK_SIZE - 1)))[-1])
14 * in case apic or smp is disabled in boot monitor, we need to finish single cpu
15 * boot using the legacy PIC
17 #define smp_single_cpu_fallback() do { \
18 tss_init(0, get_k_stack_top(0)); \
21 bsp_finish_booting(); \
24 extern unsigned char cpuid2apicid
[CONFIG_MAX_CPUS
];
26 #define barrier() do { mfence(); } while(0)
30 #endif /* __SMP_X86_H__ */