/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef _ARCH_PROC_H_ #define _ARCH_PROC_H_ #include #include #include struct thread; struct cpu_local { struct thread *cur_thread; vaddr_t kernel_rsp; vaddr_t user_rsp; u32 cpu_id; struct tss tss; } PACKED; struct pt_regs { u64 rax; u64 rbx; u64 rcx; u64 rdx; u64 rdi; u64 rsi; u64 rbp; u64 r8; u64 r9; u64 r10; u64 r11; u64 r12; u64 r13; u64 r14; u64 r15; u64 rsp; } PACKED; struct cpu_local *tls_get(); struct proc *get_cur_proc(); struct thread *get_cur_thread(); void enter_userspace_init(struct thread *thread, uaddr_t entry); #endif /* _ARCH_PROC_H_ */