Kernel/include/syscalls.hpp
2022-10-12 04:34:37 +03:00

26 lines
717 B
C++

#ifndef __FENNIX_KERNEL_SYSCALLS_H__
#define __FENNIX_KERNEL_SYSCALLS_H__
#include <types.h>
typedef struct SyscallsRegs
{
#if defined(__amd64__)
uint64_t r15, r14, r13, r12, r11, r10, r9, r8;
uint64_t rbp, rdi, rsi, rdx, rcx, rbx, rax;
uint64_t int_num, error_code, rip, cs, rflags, rsp, ss;
#elif defined(__i386__)
uint64_t r15, r14, r13, r12, r11, r10, r9, r8;
uint64_t ebp, edi, esi, edx, ecx, ebx, eax;
uint64_t int_num, error_code, eip, cs, eflags, esp, ss;
#elif defined(__aarch64__)
#endif
} SyscallsRegs;
/**
* @brief Initialize syscalls for the current CPU. (Function is available on x32, x64 & aarch64)
*/
void InitializeSystemCalls();
#endif // !__FENNIX_KERNEL_SYSCALLS_H__