Explorar el Código

Add empty pagefault handler

simpleList
Mathieu Maret hace 1 año
padre
commit
56a16b9ea5
Se han modificado 3 ficheros con 9 adiciones y 0 borrados
  1. +7
    -0
      core/exception_handler.c
  2. +1
    -0
      core/interrupt.h
  3. +1
    -0
      core/main.c

+ 7
- 0
core/exception_handler.c Ver fichero

@@ -10,3 +10,10 @@ __attribute__((interrupt)) void print_handler(struct interrupt_frame *frame, ulo
(void)frame;
(void)error_code;
}

__attribute__((interrupt)) void pagefault_handler(struct interrupt_frame *frame, ulong error_code){
printStringDetails("PAGE FAULT", RED, BLACK, 0, VGA_HEIGHT - 1);
printIntDetails(error_code, RED, BLACK, 11, VGA_HEIGHT - 1);
(void)frame;
(void)error_code;
}

+ 1
- 0
core/interrupt.h Ver fichero

@@ -5,6 +5,7 @@ struct interrupt_frame;

//Exception
void print_handler(struct interrupt_frame *frame, ulong error_code);
void pagefault_handler(struct interrupt_frame *frame, ulong error_code);

//IRQ
void keyboard_handler(struct interrupt_frame *frame);


+ 1
- 0
core/main.c Ver fichero

@@ -73,6 +73,7 @@ void kmain(unsigned long magic, unsigned long addr)

printf("Enabling HW interrupts\n");
exceptionSetRoutine(EXCEPTION_DOUBLE_FAULT, print_handler);
exceptionSetRoutine(EXCEPTION_PAGE_FAULT, pagefault_handler);
// Enabling the HW interrupts
asm volatile("sti\n");



Cargando…
Cancelar
Guardar