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

@ -0,0 +1,26 @@
#include <smp.hpp>
#include <cpu.hpp>
#include "../../../kernel.h"
extern "C" uint64_t _trampoline_start, _trampoline_end;
#define TRAMPOLINE_START 0x2000
enum SMPTrampolineAddress
{
PAGE_TABLE = 0x500,
START_ADDR = 0x520,
STACK = 0x570,
GDT = 0x580,
IDT = 0x590,
};
volatile bool CPUEnabled = false;
extern "C" void StartCPU()
{
CPUEnabled = true;
CPU::Stop();
}