Files
mop3/kernel/amd64/syscallentry.S
kamkow1 217179c9a0
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m42s
Handle IRQs inside the kernel
2026-03-13 20:33:27 +01:00

46 lines
486 B
ArmAsm

#include <amd64/regsasm.h>
.extern syscall_dispatch
.global syscall_entry
syscall_entry:
cli
movq %rsp, %gs:0
movq %gs:8, %rsp
pushq $0x1b
pushq %gs:0
pushq %r11
pushq $0x23
pushq %rcx
pushq $0
pushq $0
push_regs
cld
movq %rsp, %rdi
movq %cr3, %rax
pushq %rax
movq %rsp, %rbp
andq $-16, %rsp
callq syscall_dispatch
movq %rbp, %rsp
popq %rbx
movq %rbx, %cr3
pop_regs_skip_rax
addq $56, %rsp
movq %gs:0, %rsp
sysretq