diff options
| author | Amlal <amlal@zka.com> | 2024-07-12 01:03:21 +0200 |
|---|---|---|
| committer | Amlal <amlal@zka.com> | 2024-07-12 01:03:21 +0200 |
| commit | a268a7d3551523fb82b1495808f3ea2516b6fdaa (patch) | |
| tree | 0a7fab583aafca52bccf5bac143517f559b3a247 /DDK/DispatchKernelCall.S | |
| parent | 0a076b2bcc21d4fc94b83569e1b5198f9e4acd0b (diff) | |
[IMP && FIX] Various patches and implementations.
Most importantly:
- JSON parser.
Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'DDK/DispatchKernelCall.S')
| -rw-r--r-- | DDK/DispatchKernelCall.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/DDK/DispatchKernelCall.S b/DDK/DispatchKernelCall.S new file mode 100644 index 00000000..b6ce8004 --- /dev/null +++ b/DDK/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 |
