1 /* 2 * Copyright (c) 2019 Intel Corp. 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6 #ifndef ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_DATA_H_ 7 #define ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_DATA_H_ 8 9 #include <arch/x86/mmustructs.h> 10 11 #ifndef _ASMLANGUAGE 12 13 /* linker symbols defining the bounds of the kernel part loaded in locore */ 14 15 extern char _locore_start[], _locore_end[]; 16 17 /* 18 * Per-CPU bootstrapping parameters. See locore.S and cpu.c. 19 */ 20 21 struct x86_cpuboot { 22 volatile int ready; /* CPU has started */ 23 uint16_t tr; /* selector for task register */ 24 struct x86_tss64 *gs_base; /* Base address for GS segment */ 25 uint64_t sp; /* initial stack pointer */ 26 size_t stack_size; /* size of stack */ 27 arch_cpustart_t fn; /* kernel entry function */ 28 void *arg; /* argument for above function */ 29 }; 30 31 typedef struct x86_cpuboot x86_cpuboot_t; 32 33 extern uint8_t x86_cpu_loapics[]; /* CPU logical ID -> local APIC ID */ 34 35 #endif /* _ASMLANGUAGE */ 36 37 #ifdef CONFIG_X86_KPTI 38 #define Z_X86_TRAMPOLINE_STACK_SIZE 128 39 #endif 40 41 #endif /* ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_DATA_H_ */ 42