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);
|
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
|
add rsp, 48
|
||||||
; pop registers
|
; pop registers
|
||||||
popAll
|
popAll
|
||||||
; pop the error code and interrupt id
|
; pop the error code, interrupt id + crx
|
||||||
add rsp, 16
|
add rsp, 16
|
||||||
|
|
||||||
iretq
|
iretq
|
||||||
|
@ -41,13 +41,13 @@ syscallPreHandler:
|
|||||||
push r13
|
push r13
|
||||||
push r12
|
push r12
|
||||||
push r11
|
push r11
|
||||||
push 0
|
push 0 ; r10
|
||||||
push r9
|
push r9
|
||||||
push r8
|
push r8
|
||||||
push rbp
|
push rbp
|
||||||
push 0
|
push 0 ; rdi
|
||||||
push 0
|
push 0 ; rsi
|
||||||
push 0
|
push 0 ; rdx
|
||||||
push rcx
|
push rcx
|
||||||
push rbx
|
push rbx
|
||||||
push rax
|
push rax
|
||||||
@ -76,21 +76,21 @@ syscallPreHandler:
|
|||||||
add rsp, 48
|
add rsp, 48
|
||||||
; pop registers except return value
|
; pop registers except return value
|
||||||
pop rbx
|
pop rbx
|
||||||
pop rbx ; 2x rbx to discard rax
|
pop rbx ; 2x rbx to discard old rax
|
||||||
pop rcx
|
pop rcx
|
||||||
pop rdx
|
pop rdx ; 0
|
||||||
pop rsi
|
pop rsi ; 0
|
||||||
pop rdi
|
pop rdi ; 0
|
||||||
pop rbp
|
pop rbp
|
||||||
pop r8
|
pop r8
|
||||||
pop r9
|
pop r9
|
||||||
pop r10
|
pop r10 ; 0
|
||||||
pop r11
|
pop r11
|
||||||
pop r12
|
pop r12
|
||||||
pop r13
|
pop r13
|
||||||
pop r14
|
pop r14
|
||||||
pop r15
|
pop r15
|
||||||
; pop the error code and interrupt id
|
; pop the error code, interrupt id + crx
|
||||||
add rsp, 16
|
add rsp, 16
|
||||||
|
|
||||||
iretq
|
iretq
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
#include <ke/idt.h>
|
#include <ke/idt.h>
|
||||||
#include <io/vga.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);
|
DebugLog("Got a system call code %ld from cs %#x\n", code, regs->cs);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user