mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-14 16:59:17 +00:00
implemented interrupts handler & stub crash screen
This commit is contained in:
@ -5,21 +5,8 @@
|
||||
|
||||
#include "gdt.hpp"
|
||||
|
||||
// TODO: IMPLEMENT "MainInterruptHandler"
|
||||
extern "C" void MainInterruptHandler(void *Data)
|
||||
{
|
||||
debug("Interrupt: %p", Data);
|
||||
asmv("cli");
|
||||
asmv("hlt");
|
||||
}
|
||||
|
||||
// TODO: IMPLEMENT "ExceptionHandler"
|
||||
extern "C" void ExceptionHandler(void *Data)
|
||||
{
|
||||
debug("Exception: %p", Data);
|
||||
asmv("cli");
|
||||
asmv("hlt");
|
||||
}
|
||||
extern "C" void MainInterruptHandler(void *Data);
|
||||
extern "C" void ExceptionHandler(void *Data);
|
||||
|
||||
namespace InterruptDescriptorTable
|
||||
{
|
||||
|
@ -70,6 +70,7 @@ extern "C" void StartCPU()
|
||||
|
||||
// Initialize GDT and IDT
|
||||
Interrupts::Initialize(CPU_ID);
|
||||
((APIC::APIC *)Interrupts::apic)->RedirectIRQs(CPU_ID);
|
||||
|
||||
CPU::Interrupts(CPU::Enable);
|
||||
KPrint("CPU %d is online", CPU_ID);
|
||||
|
@ -52,7 +52,6 @@ namespace APIC
|
||||
void RedirectIRQs(int CPU = 0);
|
||||
void IPI(uint8_t CPU, uint32_t InterruptNumber);
|
||||
void OneShot(uint32_t Vector, uint64_t Miliseconds);
|
||||
bool APICSupported();
|
||||
uint32_t IOGetMaxRedirect(uint32_t APICID);
|
||||
void RawRedirectIRQ(uint8_t Vector, uint32_t GSI, uint16_t Flags, int CPU, int Status);
|
||||
void RedirectIRQ(int CPU, uint8_t IRQ, int Status);
|
||||
|
Reference in New Issue
Block a user