freebsd-dev/sys/arm
John Baldwin 1a62e9bc00 Add <machine/tls.h> header to hold MD constants and helpers for TLS.
The header exports the following:

- Definition of struct tcb.
- Helpers to get/set the tcb for the current thread.
- TLS_TCB_SIZE (size of TCB)
- TLS_TCB_ALIGN (alignment of TCB)
- TLS_VARIANT_I or TLS_VARIANT_II
- TLS_DTV_OFFSET (bias of pointers in dtv[])
- TLS_TP_OFFSET (bias of "thread pointer" relative to TCB)

Note that TLS_TP_OFFSET does not account for if the unbiased thread
pointer points to the start of the TCB (arm and x86) or the end of the
TCB (MIPS, PowerPC, and RISC-V).

Note also that for amd64, the struct tcb does not include the unused
tcb_spare field included in the current structure in libthr.  libthr
does not use this field, and the existing calls in libc and rtld that
allocate a TCB for amd64 assume it is the size of 3 Elf_Addr's (and
thus do not allocate room for tcb_spare).

A <sys/_tls_variant_i.h> header is used by architectures using
Variant I TLS which uses a common struct tcb.

Reviewed by:	kib (older version of x86/tls.h), jrtc27
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33351
2021-12-09 13:17:13 -08:00
..
allwinner mmc: switch mmc_helper to device_ api 2021-09-20 17:18:02 +02:00
altera/socfpga arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
annapurna/alpine Remove versatile support 2021-04-12 06:16:31 +00:00
arm netinet: Deduplicate most in_cksum() implementations 2021-11-24 13:31:16 -05:00
broadcom/bcm2835 vt: export RGB offsets with FBIO_GETRGBOFFS 2021-11-25 16:39:25 -03:00
conf Add a COMPAT_FREEBSD13 kernel option 2021-11-17 03:08:40 +01:00
freescale arm/freescale: remove FBIOSCURSOR 2021-12-09 17:00:43 +00:00
include Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
mv arm/mv: Don't rely on firmware MSI mapping in ICU 2021-07-20 23:24:42 +02:00
nvidia arm: fix a typo in nvidia/drm2/tegra_bo.c 2021-10-25 18:42:10 +00:00
qemu arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
qualcomm ipq4018: add qcom-gcc-ipq4018 and dependencies into the build 2021-11-04 09:02:43 -07:00
rockchip Add support for RK3288 SoC. 2020-12-04 16:24:44 +00:00
ti omap4: Fix a few typos in source code comments 2021-12-04 12:13:27 +01:00
xilinx arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00