Kernel: Replace PIC with APIC
If APIC/IOAPIC is not found, we fallback to PIC Interrupts don't seem to work on real hardware (?)
This commit is contained in:
13
kernel/include/kernel/APIC.h
Normal file
13
kernel/include/kernel/APIC.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace APIC
|
||||
{
|
||||
|
||||
void Initialize();
|
||||
void EOI();
|
||||
void GetISR(uint32_t[8]);
|
||||
void EnableIRQ(uint8_t irq);
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
constexpr uint8_t IRQ_VECTOR_BASE = 0x50;
|
||||
constexpr uint8_t IRQ_VECTOR_BASE = 0x20;
|
||||
|
||||
namespace IDT
|
||||
{
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
namespace PIC
|
||||
{
|
||||
|
||||
void initialize();
|
||||
void eoi(uint8_t);
|
||||
void unmask(uint8_t);
|
||||
void mask(uint8_t);
|
||||
void Remap();
|
||||
void MaskAll();
|
||||
void EOI(uint8_t);
|
||||
void Unmask(uint8_t);
|
||||
void Mask(uint8_t);
|
||||
|
||||
uint16_t get_isr();
|
||||
uint16_t GetISR();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user