mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-05 04:19:19 +00:00
Added APIC & SMP stub
This commit is contained in:
@ -3,14 +3,24 @@
|
||||
#if defined(__amd64__)
|
||||
#include "../Architecture/amd64/cpu/gdt.hpp"
|
||||
#include "../Architecture/amd64/cpu/idt.hpp"
|
||||
#include "../Architecture/amd64/acpi.hpp"
|
||||
#include "../Architecture/amd64/cpu/apic.hpp"
|
||||
#elif defined(__i386__)
|
||||
#include "../Architecture/i686/cpu/gdt.hpp"
|
||||
#include "../Architecture/i686/cpu/idt.hpp"
|
||||
#elif defined(__aarch64__)
|
||||
#endif
|
||||
|
||||
#include "../kernel.h"
|
||||
|
||||
namespace Interrupts
|
||||
{
|
||||
#if defined(__amd64__)
|
||||
APIC::APIC *apic = nullptr;
|
||||
#elif defined(__i386__)
|
||||
#elif defined(__aarch64__)
|
||||
#endif
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
#if defined(__amd64__)
|
||||
@ -23,6 +33,16 @@ namespace Interrupts
|
||||
|
||||
void Enable()
|
||||
{
|
||||
|
||||
#if defined(__amd64__)
|
||||
if (((ACPI::MADT *)PowerManager->GetMADT())->LAPICAddress != nullptr)
|
||||
apic = new APIC::APIC;
|
||||
else
|
||||
{
|
||||
error("LAPIC not found");
|
||||
// PIC
|
||||
}
|
||||
#elif defined(__i386__)
|
||||
#elif defined(__aarch64__)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user