Lines Matching refs:current_pcb
216 current_pcb->mm->code_addr_start = ehdr.e_entry; in process_load_elf_file()
266 … mm_create_vma(current_pcb->mm, virt_base, PAGE_2M_SIZE, VM_USER | VM_ACCESS_FLAGS, NULL, &vma); in process_load_elf_file()
272 mm_map(current_pcb->mm, virt_base, PAGE_2M_SIZE, pa); in process_load_elf_file()
288 … int val = mm_create_vma(current_pcb->mm, virt_base + off, PAGE_4K_SIZE, VM_USER | VM_ACCESS_FLAGS, in process_load_elf_file()
294 mm_map(current_pcb->mm, virt_base + off, PAGE_4K_SIZE, paddr); in process_load_elf_file()
319 regs->rsp = current_pcb->mm->stack_start; in process_load_elf_file()
320 regs->rbp = current_pcb->mm->stack_start; in process_load_elf_file()
325 …int val = mm_create_vma(current_pcb->mm, current_pcb->mm->stack_start - PAGE_2M_SIZE, PAGE_2M_SIZE, in process_load_elf_file()
334 memset((void *)(current_pcb->mm->stack_start - PAGE_2M_SIZE), 0, PAGE_2M_SIZE); in process_load_elf_file()
359 if (current_pcb->flags & PF_VFORK) in do_execve()
365 current_pcb->mm = new_mms; in do_execve()
381 process_switch_mm(current_pcb); in do_execve()
384 if (!(current_pcb->flags & PF_KTHREAD)) in do_execve()
385 current_pcb->addr_limit = USER_MAX_LINEAR_ADDR; in do_execve()
387 current_pcb->mm->code_addr_end = 0; in do_execve()
388 current_pcb->mm->data_addr_start = 0; in do_execve()
389 current_pcb->mm->data_addr_end = 0; in do_execve()
390 current_pcb->mm->rodata_addr_start = 0; in do_execve()
391 current_pcb->mm->rodata_addr_end = 0; in do_execve()
392 current_pcb->mm->bss_start = 0; in do_execve()
393 current_pcb->mm->bss_end = 0; in do_execve()
394 current_pcb->mm->brk_start = brk_start_addr; in do_execve()
395 current_pcb->mm->brk_end = brk_start_addr; in do_execve()
396 current_pcb->mm->stack_start = stack_start_addr; in do_execve()
399 process_exit_files(current_pcb); in do_execve()
402 current_pcb->flags &= ~PF_VFORK; in do_execve()
435 current_pcb->mm->stack_start = stack_start_addr; in do_execve()
468 kinfo("initial proc running...\targ:%#018lx, vruntime=%d", arg, current_pcb->virtual_runtime); in initial_kernel_thread()
502 current_pcb->thread->rip = (ul)ret_from_system_call; in initial_kernel_thread()
503 current_pcb->thread->rsp = (ul)current_pcb + STACK_SIZE - sizeof(struct pt_regs); in initial_kernel_thread()
504 current_pcb->thread->fs = USER_DS | 0x3; in initial_kernel_thread()
506 current_pcb->thread->gs = USER_DS | 0x3; in initial_kernel_thread()
509 current_pcb->flags &= (~PF_KTHREAD); in initial_kernel_thread()
510 kdebug("in initial_kernel_thread: flags=%ld", current_pcb->flags); in initial_kernel_thread()
512 regs = (struct pt_regs *)current_pcb->thread->rsp; in initial_kernel_thread()
514 current_pcb->flags = 0; in initial_kernel_thread()
519 "jmp do_execve \n\t" ::"D"(current_pcb->thread->rsp), in initial_kernel_thread()
520 … "m"(current_pcb->thread->rsp), "m"(current_pcb->thread->rip), "S"("/bin/shell.elf"), "c"(NULL), in initial_kernel_thread()
534 wait_queue_wakeup(¤t_pcb->parent_pcb->wait_child_proc_exit, PROC_INTERRUPTIBLE); in process_exit_notify()
546 struct process_control_block *pcb = current_pcb; in process_do_exit()
629 initial_proc_init_signal(current_pcb); in process_init()
631 current_pcb->virtual_runtime = 0; in process_init()
642 current_pcb->virtual_runtime = (1UL << 60); in process_init()
703 current_pcb->flags |= PF_NEED_SCHED; in process_wakeup_immediately()
833 struct vfs_file_t **f = current_pcb->fds; in process_fd_alloc()