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/libk/include/camellia/types.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/libk') diff --git a/src/libk/include/camellia/types.h b/src/libk/include/camellia/types.h index 3117877..9cbd386 100644 --- a/src/libk/include/camellia/types.h +++ b/src/libk/include/camellia/types.h @@ -33,8 +33,17 @@ struct ufs_request { }; struct intr_data { - void __user *ip; - void __user *sp; /* last for pop %rsp */ + /* same order as CpuRegs. + * notable omissions: + * - SSE registers (usually there's no need to save them, userland can do + * that itself if it wants) + * - FLAGS (so the kernel doesn't need to care about sanitizing it) */ + uint64_t r15, r14, r13, r12, r11, r10, r9, r8; + uint64_t rdi, rsi; + userptr_t rbp, rsp; + uint64_t rbx, rdx, rcx, rax, rip; + + char msg[]; /* variable size, NUL terminated */ }; struct sys_wait2 { -- cgit v1.2.3