Added sequence to remap PIC
Wrote GDT code in C Added routines to initialize GDT and IDT
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
#include "stdio.h"
|
||||
#include "apic.h"
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void isr_generic(void* frame)
|
||||
{
|
||||
printf("Generic interrupt.\n");
|
||||
}
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void isr_division_by_zero(void* frame)
|
||||
{
|
||||
@@ -11,18 +17,22 @@ void isr_division_by_zero(void* frame)
|
||||
__attribute__ ((interrupt))
|
||||
void isr_gp_fault(void* frame, unsigned int error)
|
||||
{
|
||||
|
||||
asm("cli");
|
||||
printf("Exception: GP fault, code %08x\n", error);
|
||||
asm("hlt");
|
||||
}
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void isr_page_fault(void* frame, unsigned int error)
|
||||
{
|
||||
|
||||
printf("Exception: Page fault\n");
|
||||
}
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void isr_double_fault(void* frame, unsigned int error)
|
||||
{
|
||||
asm("cli");
|
||||
printf("Exception: Double fault (!!), code %08x\n", error);
|
||||
asm("hlt");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user