commit | d935dd05da0cf959e9fd0140af913dc6fdaa0221 | [log] [tgz] |
---|---|---|
author | Kent McLeod <kent-mcleod@users.noreply.github.com> | Mon Nov 29 08:59:57 2021 +1100 |
committer | GitHub <noreply@github.com> | Mon Nov 29 08:59:57 2021 +1100 |
tree | b3556316b2c519b6f8740a6eb0a92e3db0cbce1e | |
parent | 6e1f8136e0627e1a349a6dc08879c2999fb9957d [diff] |
aarch32: Rename __aeabi_read_tp file (#15) The .S extension causes this file to be preprocessed before the assembler is invoked which matches up with the preprocessor arguments that CMake constructs for it's compilation step. When compiling with Clang this would previously generate warnings about unused preprocessor variables. Signed-off-by: Kent McLeod <kent@kry10.com>
This provides a minimal runtime for running a C or C-compatible process, i.e. one with a C-like main
, in a minimal seL4 environment.
This runtime provides mechanisms for accessing everything a standard process would expect to need at start and provides additional utilities for delegating the creation of processes and threads.
All processes (except for the root task) will use the entry-points provided here as normal and require the _start
entry-point provided in the architecture-dependant crt0.S
. This will then bootstrap into the runtime entry-point __sel4_start_c
which simply processes the stack to find the argument, environment, and auxiliary vectors.
The found vectors, along withmain
, are passed into __sel4_start_main
which configures the runtime before starting main
.
The root task requires an alternate entry-point _sel4_start
which assumes that the seL4_BootInfo
argument has been passed to it and that it has not been given a stack.
This entry-point moves onto a static 16 kilobyte stack before invoking __sel4_start_root
, which constructs the argument, environment, and auxiliary vectors. It then passes the constructed vectors, along with main
, into __sel4_start_main
which configures the runtime before starting main
.
There are two standard layouts for thread local storage commonly used. One where the TLS base address refers to the first address in memory of the region and one where it refers to the address that immediately follows the region. Intel's x86_64 and ia32 architectures use the latter method as it aligns with the segmentation view of memory presented by the processor. Most other platforms use former method, where the TLS can be said to be ‘above’ the thread pointer.
In order to store metadata for the current thread in the same memory allocation as the TLS, the run-time utilises memory on the other side of the thread pointer for it's thread structure.