fix: get pd phys addr
This commit is contained in:
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user