logging: make term and printf smp safe

This commit is contained in:
Matheus
2023-10-01 19:09:28 -03:00
parent 1bb152b446
commit ba16aa366f
7 changed files with 39 additions and 2 deletions
+3 -2
View File
@@ -339,10 +339,11 @@ bool vmm_pagefault(void *addr, bool user, int actions) {
} else {
// anonymous memory. map the zero'd page
status = arch_mmu_map(_cpu()->vmmctx->pagetable, zeropage, addr, range->mmuflags & ~ARCH_MMU_FLAGS_WRITE);
if (!status)
if (!status) {
printf("vmm: out of memory to map zero page into address space\n");
else
} else {
pmm_hold(zeropage);
}
}
} else if (arch_mmu_iswritable(_cpu()->vmmctx->pagetable, addr) == false){
// page present but not writeable in the page tables