summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-17 07:57:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-17 08:06:40 +0200
commit320faf8e68796bcea316accdfa75c1f64a73f6b7 (patch)
tree8fb29bb6756f095bd0f281faaf4189fec380e2af /doc
parentdoc: Typo (diff)
downloadrtems-320faf8e68796bcea316accdfa75c1f64a73f6b7.tar.bz2
score: Clarify TLS support
Diffstat (limited to 'doc')
-rw-r--r--doc/cpu_supplement/general.t21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/cpu_supplement/general.t b/doc/cpu_supplement/general.t
index 9c952a7e97..173f84fcc9 100644
--- a/doc/cpu_supplement/general.t
+++ b/doc/cpu_supplement/general.t
@@ -319,7 +319,26 @@ operations of the default CPU specific fatal error handler.
In order to support thread-local storage (TLS) the CPU port must implement the
facilities mandated by the application binary interface (ABI) of the CPU
architecture. The CPU port must initialize the TLS area in the
-@code{_CPU_Context_Initialize} function.
+@code{_CPU_Context_Initialize()} function. There are support functions available
+via @code{#include <rtems/score/tls.h>} which implement Variants I and II
+according to Ulrich Drepper, @cite{ELF Handling For Thread-Local Storage}.
+
+@table @code
+
+@item _TLS_TCB_at_area_begin_initialize()
+Uses Variant I, TLS offsets emitted by linker takes the TCB into account. For
+a reference implementation see @file{cpukit/score/cpu/arm/cpu.c}.
+
+@item _TLS_TCB_before_TLS_block_initialize()
+Uses Variant I, TLS offsets emitted by linker neglects the TCB. For a
+reference implementation see
+@file{c/src/lib/libcpu/powerpc/new-exceptions/cpu.c}.
+
+@item _TLS_TCB_after_TLS_block_initialize()
+Uses Variant II. For a reference implementation see
+@file{cpukit/score/cpu/sparc/cpu.c}.
+
+@end table
The board support package (BSP) must provide the following sections and symbols
in its linker command file: