i need a break

This commit is contained in:
2025-05-30 18:58:45 -04:00
parent f8c38d22b0
commit 013b5a557e
8 changed files with 73 additions and 26 deletions

View File

@ -58,8 +58,6 @@ uint64_t create_descriptor(uint32_t base, uint32_t limit, uint16_t flag);
void gdt_init(void);
void dump_gdt(void);
#endif

View File

@ -3,9 +3,32 @@
#ifndef ARCH_IDT_H
#define ARCH_IDT_H
#define IDT_MAX_DESCRIPTORS 32 // number of entries in the idt table, 32 i believe
#define IDT_MAX_DESCRIPTORS 48 // number of entries in the idt table
void exception_handler(void);
#define EXCEPT_DIV_ERR 0
#define EXCEPT_DEBUG 1
#define EXCEPT_NMI 2
#define EXCEPT_BREAKPOINT 3
#define EXCEPT_OVERFLOW 4
#define EXCEPT_BOUND_RANGE_EXCEEDED 5
#define EXCEPT_INVALID_OPCODE 6
#define EXCEPT_DEVICE_NOT_AVAILABLE 7
#define EXCEPT_DOUBLE_FAULT 8
#define EXCEPT_SEG_OVERRUN 9
#define EXCEPT_INVALID_TSS 10
#define EXCEPT_SEG_NOT_PRESENT 11
#define EXCEPT_STACK_SEG_FAULT 12
#define EXCEPT_GENERAL_PROTECTION 13
#define EXCEPT_PAGE_FAULT 14
#define EXCEPT_FLOATING_POINT_ERR_FPU 16
#define EXCEPT_ALIGNMENT_CHECK 17
#define EXCEPT_MACHINE_CHECK 18
#define EXCEPT_FLOATING_POINT_ERR_SIMD 19
#define EXCEPT_VIRT 20
#define EXCEPT_CTRL_PROT 21
void exception_handler(unsigned int i);
typedef struct {
uint16_t isr_low; // The lower 16 bits of the ISR's address