From 2dadbfc899df4179ca70c4ea04f74a5e190c2ae7 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Fri, 26 Sep 2025 13:17:41 -0400 Subject: fix usermode interrupts. add ability to define custom interrupt handlers --- include/arch/x86_64/processor.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/arch/x86_64/processor.h') diff --git a/include/arch/x86_64/processor.h b/include/arch/x86_64/processor.h index 7363c41..5e878b9 100644 --- a/include/arch/x86_64/processor.h +++ b/include/arch/x86_64/processor.h @@ -51,6 +51,7 @@ enum #define GDT_OFFSET_KERNEL_CODE (GDT_ENTRY_KERNEL_CODE * sizeof(segment_descriptor_t)) #define GDT_OFFSET_KERNEL_DATA (GDT_ENTRY_KERNEL_DATA * sizeof(segment_descriptor_t)) +#define GDT_OFFSET_USER_NULL (GDT_ENTRY_USER_NULL * sizeof(segment_descriptor_t)) #define GDT_OFFSET_USER_DATA (GDT_ENTRY_USER_DATA * sizeof(segment_descriptor_t)) #define GDT_OFFSET_USER_CODE (GDT_ENTRY_USER_CODE * sizeof(segment_descriptor_t)) #define GDT_OFFSET_TSS (GDT_ENTRY_TSS_LOW * sizeof(segment_descriptor_t)) @@ -60,7 +61,9 @@ typedef struct jove_Processor physptr_t pdir; struct jove_ObjectDirectory *odir; + __attribute__((aligned(0x10))) segment_descriptor_t gdt[GDT_ENTRY_COUNT]; + struct { uint16_t length; uint64_t base; @@ -70,7 +73,9 @@ typedef struct jove_Processor uint64_t base; } __attribute__((packed)) idtr; + __attribute__((aligned(0x10))) tss_t tss; + tcb_t *tcb; } processor_t; -- cgit v1.2.1