feat(idt): change selector to use segment_selector struct

This commit is contained in:
Malo Lecomte 2021-07-14 21:31:58 +02:00
parent 1e0e16d290
commit 8162cb5011

@ -2,6 +2,7 @@
#define IDT_H
#include <stdint.h>
#include "gdt.h"
#define IDT_NB_ENTRIES 32
#define IDT_SIZE (IDT_NB_ENTRIES * sizeof(struct idt_entry))
@ -9,9 +10,9 @@
struct idt_entry
{
uint16_t offset_1 : 16;
uint16_t selector : 16;
struct segment_selector selector;
uint8_t zero : 8; // unused, set to 0
uint8_t zero_1 : 8; // unused, set to 0
uint8_t type : 3; // gate type
uint8_t size : 1;
uint8_t zero_2 : 1; // set to 0 for interrupt and trap gates