From c83d7bdcb60859f232e0fa6994ffba01509aba2e Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sat, 15 Jan 2022 16:11:30 -0600 Subject: arch: i386: simplify IDT setup Simplify the interrupt descriptor table setup and frame assembly. Signed-off-by: Danny Holman --- arch/i386/include/kernel/idt.h | 1 + arch/i386/include/kernel/isr.h | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/i386/include') diff --git a/arch/i386/include/kernel/idt.h b/arch/i386/include/kernel/idt.h index 699eb96..190e15e 100644 --- a/arch/i386/include/kernel/idt.h +++ b/arch/i386/include/kernel/idt.h @@ -10,6 +10,7 @@ #define SEGMENT_STORAGE 0x00 #define SEGMENT_INTERRUPT 0x0E #define IDT_EXCEPTION (SEGMENT_PRESENT | SEGMENT_INTERRUPT) +#define IDT_INTERRUPT (SEGMENT_PRESENT | SEGMENT_INTERRUPT) #define IDT_MAX_DESCRIPTORS 256 diff --git a/arch/i386/include/kernel/isr.h b/arch/i386/include/kernel/isr.h index 61fe22f..9d88958 100644 --- a/arch/i386/include/kernel/isr.h +++ b/arch/i386/include/kernel/isr.h @@ -11,19 +11,18 @@ struct isr_frame { uint32_t edi; uint32_t esi; + uint32_t ebp; + uint32_t esp; uint32_t edx; uint32_t ecx; uint32_t ebx; uint32_t eax; - uint32_t ebp; uint32_t vector; uint32_t errno; uint32_t eip; uint32_t cs; uint32_t eflags; - uint32_t esp; - uint32_t dss; } __attribute__((packed)); extern void isr_stub_0(void); -- cgit v1.2.3