This commit is contained in:
Sriram Shanmuga 2023-09-21 11:42:06 -07:00 committed by GitHub
commit b8975b92fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,9 @@
#include "idt.h"
#include "../kernel/util.h"
idt_gate_t idt[IDT_ENTRIES];
idt_register_t idt_reg;
void set_idt_gate(int n, u32 handler) {
idt[n].low_offset = low_16(handler);
idt[n].sel = KERNEL_CS;

View File

@ -28,9 +28,8 @@ typedef struct {
} __attribute__((packed)) idt_register_t;
#define IDT_ENTRIES 256
idt_gate_t idt[IDT_ENTRIES];
idt_register_t idt_reg;
extern idt_gate_t idt[IDT_ENTRIES];
extern idt_register_t idt_reg;
/* Functions implemented in idt.c */
void set_idt_gate(int n, u32 handler);