kernel-dev/include/kernel/arch/x86_64/syscall.h

55 lines
983 B
C
Raw Normal View History

#ifndef X86_64_SYSCALL
#define X86_64_SYSCALL 1
#include <types.h>
extern void *system_calls_table[256];
/**
* @brief
* @addindex x86_64
*
* 使
* rax -
* rbx -
* rcx - rip寄存器缓存
* rdi -
* rdx - 1
* r8 - 2
* r9 - 3
* r10 - 4
* r11 - rflags寄存器缓存
* r12 - 5
* r13 - 6
* r14 - 7
* r15 - 8
*
* 使
*/
/**
* @name set_kernel_stack_cache
* @addindex x86_64
*
* ```c
* void set_kernel_stack_cache(usize stack);
* ```
*
* `stack`
*/
extern void set_kernel_stack_cache(usize stack);
/**
* @name return_from_systemcall
* @addindex x86_64
*
* ```c
* void return_from_systemcall();
* ```
*
* `sysret`
*/
extern void return_from_systemcall();
#endif