summaryrefslogtreecommitdiff
path: root/src/libc/intr.s
diff options
context:
space:
mode:
authordzwdz2024-07-25 22:17:27 +0200
committerdzwdz2024-07-25 22:17:27 +0200
commit69fd0dd9fda47aa52cccdbef6ca388cea38e693b (patch)
tree9e0e80e0380f2f39dea8f3a76ecb629918ff187a /src/libc/intr.s
parent24934406d5d39e013e22a9e6f4138c4169460d71 (diff)
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).
Diffstat (limited to 'src/libc/intr.s')
-rw-r--r--src/libc/intr.s13
1 files changed, 3 insertions, 10 deletions
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