fix: get pd phys addr

This commit is contained in:
2025-11-28 20:22:19 +01:00
parent 700864cbf2
commit 6ff044c07a

View File

@ -23,7 +23,7 @@ struct pcb *create_process(uid_t uid)
return NULL; return NULL;
} }
new_pcb->cr3 = new_pcb->cr3 =
(void *)((uint32_t)VA2PTE((uint32_t)new_pcb->heap) & PAGE_MASK); (void *)((uint32_t)*VA2PTE((uint32_t)new_pcb->heap) & PAGE_MASK);
memcpy(new_pcb->heap, PD, memcpy(new_pcb->heap, PD,
4096); // TODO optimize to copy only used bytes 4096); // TODO optimize to copy only used bytes
new_pcb->heap[1023] = (uint32_t)new_pcb->cr3 | INIT_FLAGS; new_pcb->heap[1023] = (uint32_t)new_pcb->cr3 | INIT_FLAGS;