Moved interrupt handling to subdir
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
#include "memorymap.hpp"
|
||||
#include "buddyallocator.hpp"
|
||||
#include "addressspace.hpp"
|
||||
#include "interruptdescriptor.hpp"
|
||||
#include "inthandlers.hpp"
|
||||
#include "pio.hpp"
|
||||
#include "tty.h"
|
||||
|
||||
@@ -15,7 +13,6 @@ using namespace kernel;
|
||||
|
||||
extern SystemInfo system_info;
|
||||
extern MemoryMap::Region memory_map;
|
||||
extern InterruptDescriptor idt;
|
||||
|
||||
extern "C" void __cxa_pure_virtual()
|
||||
{
|
||||
@@ -39,14 +36,7 @@ void main(char* cmdline)
|
||||
BuddyAllocator alloc(memmap, (char*) 0xC0000000, system_info.getHighMemory() / 4 + 256, 6);
|
||||
AddressSpace vmem(alloc);
|
||||
vmem.mmap((void*) 0x80000000, 0x10000);
|
||||
InterruptDescriptor* interruptTable = &idt;
|
||||
interruptTable[0] = InterruptDescriptor((void*) &divisionByZero, InterruptDescriptor::INT32, 0);
|
||||
interruptTable[8] = InterruptDescriptor((void*) &doubleFaultHandler, InterruptDescriptor::INT32, 0);
|
||||
interruptTable[14] = InterruptDescriptor((void*) &pageFaultHandler, InterruptDescriptor::INT32, 0);
|
||||
//for(int i = 1; i < 32; i++)
|
||||
// interruptTable[i] = InterruptDescriptor((void*) &pageFaultHandler, InterruptDescriptor::INT32, 0);
|
||||
outb(0xa1, 0xff);
|
||||
outb(0x21, 0xff);
|
||||
asm("sti");
|
||||
tty << "Nothing left to do. Hanging.\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user