diff options
| author | Amlal <amlal@el-mahrouss-logic.com> | 2024-09-24 06:57:42 +0200 |
|---|---|---|
| committer | Amlal <amlal@el-mahrouss-logic.com> | 2024-09-24 06:58:12 +0200 |
| commit | 4b4fe020a328e991ffd15ae475ad7a5d38f097a5 (patch) | |
| tree | 990a0f03c13bb0878c00e8ec1d6f9c259ecb64a0 /dev/ddk/src/KernelCallDispatch.S | |
| parent | 107b2b9cad2b2502c3eebc0a77013edde2551257 (diff) | |
IMP: Working on Paging API...
FIX: Fixed the path of filesystem's ESP.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/ddk/src/KernelCallDispatch.S')
| -rw-r--r-- | dev/ddk/src/KernelCallDispatch.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dev/ddk/src/KernelCallDispatch.S b/dev/ddk/src/KernelCallDispatch.S new file mode 100644 index 00000000..3a9a57b5 --- /dev/null +++ b/dev/ddk/src/KernelCallDispatch.S @@ -0,0 +1,36 @@ +/** + lang: asm + compiler: gnu + */ + +.globl __KernelCallDispatch + +.text + +/* Really simple function, takes our va-list, + and brings it to the trap handler in the Kernel. */ + +#ifdef __DDK_AMD64__ + +/* args rcx, rdx, r8, r9 */ +__KernelCallDispatch: + int $0x33 + ret + +#elif defined(__DDK_POWER64__) + +/* args r8, r9, r10, r11 */ +__KernelCallDispatch: + /* There is no specific interrupt request id for a system call in POWER. */ + sc + blr + +#elif defined(__DDK_ARM64__) + +/* args x0, x8, x9, x10, x11 is kept to tell that this is a Kernel call */ +__KernelCallDispatch: + /* There is no specific interrupt request id for a system call in ARM64 as well. */ + mov x9, #0x33 + svc #0 + +#endif |
