From 69fd0dd9fda47aa52cccdbef6ca388cea38e693b Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 25 Jul 2024 22:17:27 +0200 Subject: kernel: pass more information to user on interrupt This is meant to facilitate a syscall for returning from interrupts, which will actually work in the general case as opposed to the current hack, which only works if the interrupt occured during a syscall (which is correct... for now). --- src/libc/intr.s | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/libc/intr.s') diff --git a/src/libc/intr.s b/src/libc/intr.s index 008387d..dcc61fe 100644 --- a/src/libc/intr.s +++ b/src/libc/intr.s @@ -2,19 +2,12 @@ .global intr_trampoline .type intr_trampoline, @function intr_trampoline: - push %rax - push %rdx + mov %rsp, %rdi /* pass intr_data as the argument */ + and $~0xF, %rsp call *_intr(%rip) - pop %rdx - pop %rax - pop tmprip(%rip) - pop %rsp - jmp *tmprip(%rip) + int3 /* you weren't supposed to return */ .section .bss -tmprip: - .skip 8 - .global _intr _intr: .skip 8 -- cgit v1.2.3