mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
initialise the APs
This commit is contained in:
+12
-2
@@ -145,10 +145,10 @@ void arch_mmu_unmap(arch_mmu_tableptr context, void* vaddr){
|
||||
|
||||
}
|
||||
|
||||
static arch_mmu_tableptr context; //boostrap context
|
||||
|
||||
void arch_mmu_init(){
|
||||
|
||||
arch_mmu_tableptr context;
|
||||
|
||||
context = pmm_alloc(1);
|
||||
if(!context) _panic ("Out of memory", 0);
|
||||
memset(context, 0, PAGE_SIZE);
|
||||
@@ -242,3 +242,13 @@ void arch_mmu_init(){
|
||||
printf("In bootstrap context\n");
|
||||
|
||||
}
|
||||
|
||||
void arch_mmu_apinit(){
|
||||
|
||||
switchcontext(context);
|
||||
|
||||
arch_getcls()->context = pmm_hhdmalloc(1);
|
||||
|
||||
arch_getcls()->context->context = context;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user