wip: allocate user process stack on the right PD
This commit is contained in:
@ -24,8 +24,9 @@ struct pcb *create_process(uid_t uid)
|
||||
}
|
||||
new_pcb->cr3 =
|
||||
(void *)((uint32_t)VA2PTE((uint32_t)new_pcb->heap) & PAGE_MASK);
|
||||
memcpy(new_pcb->heap, PD, 4096);
|
||||
new_pcb->heap[1023] = (uint32_t) new_pcb->cr3 | INIT_FLAGS;
|
||||
memcpy(new_pcb->heap, PD,
|
||||
4096); // TODO optimize to copy only used bytes
|
||||
new_pcb->heap[1023] = (uint32_t)new_pcb->cr3 | INIT_FLAGS;
|
||||
|
||||
new_pcb->daddy = NULL;
|
||||
new_pcb->children = NULL;
|
||||
|
||||
Reference in New Issue
Block a user