initialise the APs

This commit is contained in:
Matheus
2022-08-06 14:56:31 -03:00
parent fa1b35bf18
commit dee3fe16db
13 changed files with 142 additions and 9 deletions
+12 -2
View File
@@ -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;
}