Added code to setup and build the IDT. Updated the Bochs' configuration file to allow break points to be set and did some general code clean-up.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef IDT_H
|
||||
#define IDT_H
|
||||
struct idt_entry
|
||||
{
|
||||
unsigned short base_lo;
|
||||
unsigned short sel; /* Our kernel segment goes here. */
|
||||
unsigned char always0;
|
||||
unsigned char flags;
|
||||
unsigned short base_hi;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct idt_ptr
|
||||
{
|
||||
unsigned short size;
|
||||
struct idt_entry* idt_entries_start;
|
||||
} __attribute__((packed));
|
||||
|
||||
void install_idt(void);
|
||||
void idt_set_gate(struct idt_entry*, unsigned long, unsigned short, unsigned char);
|
||||
void load_idt(struct idt_ptr*);
|
||||
#endif
|
||||
Reference in New Issue
Block a user