diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-27 17:24:21 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-27 17:24:21 +0100 |
| commit | b8f7ef086d1d1b1cd686fff04d0a587f8fd39d81 (patch) | |
| tree | b6c2eb3ca2c51dc87ddd81b6170d5f63eabb9090 /dev/ddk/src/ddk_kernel_call_dispatch.S | |
| parent | eb86df50ec5afb392998e2e171de54e1f26d8e7a (diff) | |
add: new driver device kit API. (DDK)
refactor: rename SCIKit -> user (then libuser.dylib)
boot/modules/netboot: fixed compilation for amd64.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/ddk/src/ddk_kernel_call_dispatch.S')
| -rw-r--r-- | dev/ddk/src/ddk_kernel_call_dispatch.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dev/ddk/src/ddk_kernel_call_dispatch.S b/dev/ddk/src/ddk_kernel_call_dispatch.S new file mode 100644 index 00000000..9b32d0c2 --- /dev/null +++ b/dev/ddk/src/ddk_kernel_call_dispatch.S @@ -0,0 +1,36 @@ +/** + lang: asm + compiler: gnu + */ + +.globl ke_call_dispatch + +.text + +/* Really simple function, takes our va-list, + and brings it to the trap handler in the Kernel. */ + +#if defined(__DDK_AMD64__) + +/* args rcx, rdx, r8, r9 */ +ke_call_dispatch: + int $0x33 + ret + +#elif defined(__DDK_POWER64__) + +/* args r8, r9, r10, r11 */ +ke_call_dispatch: + /* 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 */ +ke_call_dispatch: + /* There is no specific interrupt request id for a system call in ARM64 as well. */ + mov x9, #0x33 + svc #0 + +#endif |
