From e818cab3f1fc4a3d4d0b8e2c9424fb2e7b1dff70 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 2 Aug 2024 01:20:40 +0200 Subject: *: use a generic UserRegs type everywhere I'm storing registers mostly inspired by Plan 9's Ureg, probably obvious from the name --- src/kernel/arch/amd64/sysenter.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/kernel/arch/amd64/sysenter.h') diff --git a/src/kernel/arch/amd64/sysenter.h b/src/kernel/arch/amd64/sysenter.h index 03a9f45..65c46f8 100644 --- a/src/kernel/arch/amd64/sysenter.h +++ b/src/kernel/arch/amd64/sysenter.h @@ -1,9 +1,14 @@ #pragma once #include -// sysenter.c -extern CpuRegs _sysexit_regs; +typedef struct SysexitRegs SysexitRegs; +struct SysexitRegs { + UserRegs u; + char sse[512]; +}; +_Static_assert(sizeof(SysexitRegs) == 18 * 8 + 512); + +extern SysexitRegs _sysexit_regs; _Noreturn void sysenter_stage2(void); -// sysenter.s _Noreturn void _sysexit_real(void); -- cgit v1.2.3