diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-07 19:06:14 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-07 19:08:07 +0200 |
| commit | d218537836af849ada9b8ad6ef695e5340ee469b (patch) | |
| tree | 9c250e0598b1814877dc6062d68a3ca941fc212e /DDK | |
| parent | eda81576c1241727085c2f62135cdf5dc118a1d0 (diff) | |
MHR-36: KernelDispatchCall.S: Add ARM64 support.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'DDK')
| -rw-r--r-- | DDK/KernelDispatchCall.S | 15 | ||||
| -rw-r--r-- | DDK/KernelStd.h | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/DDK/KernelDispatchCall.S b/DDK/KernelDispatchCall.S index 68423ab5..acdf3f13 100644 --- a/DDK/KernelDispatchCall.S +++ b/DDK/KernelDispatchCall.S @@ -1,3 +1,8 @@ +/** + lang: asm + compiler: gnu + */ + .globl __kernelDispatchCall .text @@ -7,15 +12,25 @@ #ifdef __DDK_AMD64__ +/* args rcx, rdx, r8, r9 */ __kernelDispatchCall: int $0x33 ret #elif defined(__DDK_POWER64__) +/* args r8, r9, r10, r11 */ __kernelDispatchCall: /* 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 */ +__kernelDispatchCall: + /* There is no specific interrupt request id for a system call in ARM64 as well. */ + mov x11, #0x33 + svc #0 + #endif diff --git a/DDK/KernelStd.h b/DDK/KernelStd.h index e483d10b..0befc7f9 100644 --- a/DDK/KernelStd.h +++ b/DDK/KernelStd.h @@ -13,7 +13,7 @@ #define nil nullptr #else #define DK_EXTERN extern -#define nil NULL +#define nil ((void*)0) #endif // defined(__cplusplus) #include <stdint.h> |
