AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
execve.c
Go to the documentation of this file.
1
6
7
#include <
core/system.h
>
8
#include <
core/arch.h
>
9
#include <
sys/proc.h
>
10
11
/* aarch64: sets the thread's saved program counter and stack pointer,
12
* which it starts from when it next returns to user mode, and drops its
13
* FP/SIMD state: the new program's registers are zeros at their first
14
* use. The C library's start code finds `argc` at the stack pointer. */
15
void
arch_exec_start
(
struct
thread
*
thread
,
uintptr_t
entry,
uintptr_t
sp
)
16
{
17
struct
aarch64_thread
*arch =
thread
->
arch
;
18
19
aarch64_fpsimd_drop
(
thread
);
20
21
arch->
pc
= entry;
22
arch->
sp
=
sp
;
23
}
arch_exec_start
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,...
Definition
execve.c:15
aarch64_fpsimd_drop
void aarch64_fpsimd_drop(struct thread *thread)
Throws away a thread's FP/SIMD state, when it goes or execs a new program, and the registers' values ...
Definition
fpsimd.c:106
arch.h
system.h
proc.h
uintptr_t
__SIZE_TYPE__ uintptr_t
Definition
stddef.h:12
aarch64_thread
A thread's aarch64 state (thread->arch).
Definition
arch.h:25
aarch64_thread::sp
uint64_t sp
Definition
arch.h:37
aarch64_thread::pc
uint64_t pc
Definition
arch.h:37
thread
A thread.
Definition
thread.h:23
thread::arch
void * arch
the architecture's own data: its registers, its kernel stack
Definition
thread.h:84
kernel
arch
aarch64
sys
execve.c
Generated by
1.18.0