Tiberiu Chibici
e3b3584734
==================================================== Mainly changed: Tasking + Implemented multitasking
43 lines
1.0 KiB
C
43 lines
1.0 KiB
C
// HARDWARE ABSTRACTION LAYER
|
|
#include "cpu/gdt.h"
|
|
#include "cpu/idt.h"
|
|
#include "cpu/isrs.h"
|
|
#include "cpu/irq.h"
|
|
|
|
#include "clock/clock.h"
|
|
#include "keyboard/keyboard.h"
|
|
#include "mouse/mouse.h"
|
|
|
|
//#include "filesys/fat/fat.h"
|
|
|
|
#include <fileio.h>
|
|
#include <debugio.h>
|
|
|
|
void HalInitialize()
|
|
{
|
|
// Initialize cpu
|
|
GdtInstall(); Log("HAL", "Installed GDT\n");
|
|
IdtInstall(); Log("HAL", "Installed IDT\n");
|
|
IsrsInstall(); Log("HAL", "Installed ISRs\n");
|
|
IrqInstall(); Log("HAL", "Installed IRQs\n");
|
|
|
|
// Start interrupts
|
|
asm volatile ("sti");
|
|
Log("HAL", "%#Interrupts are started...\n", ColorLightMagenta);
|
|
|
|
// Install keyboard
|
|
IrqInstallHandler(0, TimeHandler);
|
|
IrqInstallHandler(1, KeyboardHandler);
|
|
IrqInstallHandler(12, MouseHandler);
|
|
|
|
KeyboardInstallA(); Log("HAL", "Installing keyboard... %#[1/2] ", ColorLightGreen);
|
|
KeyboardInstallB(); Log("HAL", "%#[2/2]\n", ColorLightGreen);
|
|
|
|
// Install mouse driver
|
|
//MouseInstall(); Log("HAL", "Installed mouse driver\n");
|
|
|
|
// Install VFS
|
|
VfsInstall();
|
|
//FatInstall();
|
|
}
|