Added APIC & SMP stub

This commit is contained in:
Alex
2022-10-11 02:43:23 +03:00
parent f2f26c70a3
commit ad9817a2db
10 changed files with 953 additions and 11 deletions

View File

@ -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
}
}