|
AquilaOS documentation
How it works, and its code
|
x86: where a new program starts, for execve(). More...
Go to the source code of this file.
Functions | |
| void | arch_exec_start (struct thread *thread, uintptr_t entry, uintptr_t sp) |
| Sets up a thread to start a new program when it next returns to user mode: at its entry point, with its stack pointer at its initial stack, which the kernel has built already (argc, argv, envp and the auxiliary vector, as the System V ABI has them: sys/execve.c). | |
x86: where a new program starts, for execve().
The kernel has built its initial stack already (sys/execve.c); the thread only needs its instruction and stack pointers set.
Definition in file execve.c.
Sets up a thread to start a new program when it next returns to user mode: at its entry point, with its stack pointer at its initial stack, which the kernel has built already (argc, argv, envp and the auxiliary vector, as the System V ABI has them: sys/execve.c).
The other registers start as zeros, and so does the FPU's state.
| thread | the thread, which hasn't run since execve() (or ever) |
| entry | the program's entry point |
| sp | the initial stack pointer, 16-byte aligned |
Definition at line 14 of file execve.c.
References thread::arch, arch_exec_start(), x86_thread::rflags, x86_thread::rip, x86_thread::rsp, and X86_EFLAGS.