feat(pic): add pic functions to idt

This commit is contained in:
aliamelo committed 2021-07-15 16:53:58 +02:00
1 parent d5a8623acd
commit f636fcbadf
2 files changed
+13 -2

No files matched your search

+9 -1
View File
@@ -4,6 +4,7 @@
static struct idt idt = { 0 };
static struct idt_entry_info infos[] = {
// Intel-defined (0-20)
{int_de, INTERRUPT_TYPE}, {int_db, INTERRUPT_TYPE},
{int_nmi, INTERRUPT_TYPE}, {int_bp, TRAP_TYPE},
{int_of, TRAP_TYPE}, {int_br, INTERRUPT_TYPE},
@@ -14,7 +15,14 @@ static struct idt_entry_info infos[] = {
{int_pf, INTERRUPT_TYPE}, {0, INTERRUPT_TYPE},
{int_mf, INTERRUPT_TYPE}, {int_ac, INTERRUPT_TYPE},
{int_mc, INTERRUPT_TYPE}, {int_xm, INTERRUPT_TYPE},
{int_ve, INTERRUPT_TYPE}
{int_ve, INTERRUPT_TYPE},
// Intel-reserved (21-31)
{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0},
// user-defined (32-255)
{0, INTERRUPT_TYPE}, {pic_keyboard, INTERRUPT_TYPE}
};
void handle_interrupt(struct int_args *args)
+4 -1
View File
@@ -5,9 +5,12 @@
#include "gdt.h"
#include "isr.h"
#define IDT_NB_ENTRIES 21
#define IDT_NB_ENTRIES 34
#define IDT_SIZE (IDT_NB_ENTRIES * sizeof(struct idt_entry))
#define INTEL_DEFINED 21
#define INTEL_UNUSED 31
#define INTERRUPT_TYPE 0x6
#define TRAP_TYPE 0x7
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.