1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:37:47 +00:00

Kernel: Detect APs and boot them into protected mode

This isn't fully working, the APs pretend like they're
fully initialized and are just halted permanently for now.
This commit is contained in:
Tom 2020-06-04 09:10:16 -06:00 committed by Andreas Kling
parent 93b9832fac
commit 0bc92c259d
9 changed files with 463 additions and 108 deletions

View file

@ -41,6 +41,12 @@ class MemoryManager;
class PageDirectory;
class PageTableEntry;
struct [[gnu::packed]] DescriptorTablePointer
{
u16 limit;
void* address;
};
struct [[gnu::packed]] TSS32
{
u16 backlink, __blh;
@ -248,6 +254,8 @@ public:
class GenericInterruptHandler;
struct RegisterState;
const DescriptorTablePointer& get_gdtr();
const DescriptorTablePointer& get_idtr();
void gdt_init();
void idt_init();
void sse_init();
@ -477,8 +485,10 @@ inline FlatPtr offset_in_page(const void* address)
return offset_in_page((FlatPtr)address);
}
u32 read_cr0();
u32 read_cr3();
void write_cr3(u32);
u32 read_cr4();
u32 read_dr6();