mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Syscall args
This commit is contained in:
parent
999f41f3c2
commit
bc2e1f80d3
@ -35,7 +35,8 @@ extern error_t KeSyscall(ulong code);
|
||||
|
||||
extern void KeJumpToUserspace(ulong args, void *entryPoint, void *stackAddr);
|
||||
|
||||
error_t _KeSyscallHandler(ulong code, ISRFrame_t *regs);
|
||||
error_t _KeSyscallHandler( ulong code, void *arg0, void *arg1, void *arg2,
|
||||
ISRFrame_t *regs );
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
|
@ -68,7 +68,7 @@ isrPreHandler:
|
||||
add rsp, 48
|
||||
; pop registers
|
||||
popAll
|
||||
; pop the error code and interrupt id
|
||||
; pop the error code, interrupt id + crx
|
||||
add rsp, 16
|
||||
|
||||
iretq
|
||||
|
@ -41,13 +41,13 @@ syscallPreHandler:
|
||||
push r13
|
||||
push r12
|
||||
push r11
|
||||
push 0
|
||||
push 0 ; r10
|
||||
push r9
|
||||
push r8
|
||||
push rbp
|
||||
push 0
|
||||
push 0
|
||||
push 0
|
||||
push 0 ; rdi
|
||||
push 0 ; rsi
|
||||
push 0 ; rdx
|
||||
push rcx
|
||||
push rbx
|
||||
push rax
|
||||
@ -76,21 +76,21 @@ syscallPreHandler:
|
||||
add rsp, 48
|
||||
; pop registers except return value
|
||||
pop rbx
|
||||
pop rbx ; 2x rbx to discard rax
|
||||
pop rbx ; 2x rbx to discard old rax
|
||||
pop rcx
|
||||
pop rdx
|
||||
pop rsi
|
||||
pop rdi
|
||||
pop rdx ; 0
|
||||
pop rsi ; 0
|
||||
pop rdi ; 0
|
||||
pop rbp
|
||||
pop r8
|
||||
pop r9
|
||||
pop r10
|
||||
pop r10 ; 0
|
||||
pop r11
|
||||
pop r12
|
||||
pop r13
|
||||
pop r14
|
||||
pop r15
|
||||
; pop the error code and interrupt id
|
||||
; pop the error code, interrupt id + crx
|
||||
add rsp, 16
|
||||
|
||||
iretq
|
||||
|
@ -27,7 +27,8 @@
|
||||
#include <ke/idt.h>
|
||||
#include <io/vga.h>
|
||||
|
||||
error_t _KeSyscallHandler(ulong code, ISRFrame_t *regs)
|
||||
error_t _KeSyscallHandler( ulong code, void *arg0, void *arg1, void *arg2,
|
||||
ISRFrame_t *regs )
|
||||
{
|
||||
DebugLog("Got a system call code %ld from cs %#x\n", code, regs->cs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user