diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-15 18:35:34 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-15 18:35:34 +0200 |
| commit | f3d931aa7cfaf96baef8383b59a8938779541ee7 (patch) | |
| tree | fdb9fc51badb3dbd03e46ab0766a49d9522e13e2 /dev/DDKit/DispatchKernelCall.S | |
| parent | 86640816e8b1d3595365f1fcc8a2a9e61fb40ff1 (diff) | |
[IMP] Moved source code into dev/ folder.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/DDKit/DispatchKernelCall.S')
| -rw-r--r-- | dev/DDKit/DispatchKernelCall.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dev/DDKit/DispatchKernelCall.S b/dev/DDKit/DispatchKernelCall.S new file mode 100644 index 00000000..b6ce8004 --- /dev/null +++ b/dev/DDKit/DispatchKernelCall.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 x11, #0x33 + svc #0 + +#endif |
