Added stub syscall handler
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
#include "../interrupts.hpp"
|
||||
#include "idt.hpp"
|
||||
#include "inthandlers.hpp"
|
||||
|
||||
kernel::Interrupts::Interrupts()
|
||||
{
|
||||
idt[0] = InterruptDescriptor((void*) &divisionByZero, InterruptDescriptor::INT32, 0);
|
||||
idt[8] = InterruptDescriptor((void*) &doubleFaultHandler, InterruptDescriptor::INT32, 0);
|
||||
idt[0x80] = InterruptDescriptor((void*) &syscallHandler, InterruptDescriptor::INT32, 0);
|
||||
// Load interrupt handlers
|
||||
// Configure PIC
|
||||
_lidt();
|
||||
|
||||
@@ -13,20 +13,27 @@ __attribute__ ((interrupt))
|
||||
void gpFaultHandler(void* frame, unsigned int error)
|
||||
{
|
||||
*display = 'a';
|
||||
asm("hlt");
|
||||
display += 2;
|
||||
}
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void pageFaultHandler(void* frame, unsigned int error)
|
||||
{
|
||||
*display = '0';
|
||||
//asm("hlt");
|
||||
display += 2;
|
||||
}
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void doubleFaultHandler(void* frame, unsigned int error)
|
||||
{
|
||||
*display = '#';
|
||||
//asm("hlt");
|
||||
asm("hlt");
|
||||
}
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void syscallHandler(void* frame)
|
||||
{
|
||||
*display = 'z';
|
||||
display += 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,4 +13,7 @@ void pageFaultHandler(void* frame, unsigned int error);
|
||||
__attribute__ ((interrupt))
|
||||
void doubleFaultHandler(void* frame, unsigned int error);
|
||||
|
||||
__attribute__ ((interrupt))
|
||||
void syscallHandler(void* frame);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user