freebsd-src/sys/mips/include
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
..
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
abi.h
asm.h
atomic.h
bootinfo.h
bus.h Add missing assignment forgotten in r365899 2020-09-20 15:11:52 +00:00
bus_dma.h
cache.h
cache_mipsNN.h
cache_r4k.h
cca.h
cdefs.h
clock.h
counter.h
cpu.h
cpufunc.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
cpuinfo.h
cpuregs.h Fix a common typo in source code comments 2021-08-14 14:08:46 +02:00
db_machdep.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
dump.h minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
efi.h
elf.h Check for the only 32-bit MIPS ABIs we support, rather than !n64 2020-09-26 21:47:11 +00:00
endian.h Consolidate machine/endian.h definitions 2021-03-26 19:00:22 -03:00
exec.h
fdt.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
float.h
floatingpoint.h
fls64.h
fpu.h
frame.h
gdb_machdep.h gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
hwfunc.h
ieee.h
ieeefp.h
in_cksum.h netinet: Remove in_cksum_update() 2021-11-24 13:31:15 -05:00
intr.h
intr_machdep.h
kdb.h Introduce kdb-level watchpoint functions 2021-03-29 12:05:43 -03:00
limits.h
locore.h
md_var.h minidump: Parameterize minidumpsys() 2021-11-19 15:05:52 -04:00
memdev.h Add the MEM_EXTRACT_PADDR ioctl to /dev/mem. 2020-09-02 18:12:47 +00:00
metadata.h
minidump.h Sparsify the vm_page_dump bitmap 2020-09-21 22:21:59 +00:00
mips_opcode.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
octeon_cop2.h
ofw_machdep.h
param.h
pcb.h
pcpu.h Remove PCPU_INC 2021-03-20 19:23:59 -07:00
pcpu_aux.h
pmap.h Add pmap_vm_page_alloc_check() 2021-07-31 16:53:42 +03:00
pmc_mdep.h
proc.h Make struct syscall_args machine independent 2021-12-08 18:45:33 +00:00
procctl.h
profile.h
pte.h
ptrace.h
reg.h Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
regdef.h
regnum.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
reloc.h
resource.h
runq.h
sc_machdep.h
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h
stdarg.h
sysarch.h
tlb.h
tls.h Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
trap.h
ucontext.h
vdso.h
vm.h Create VM_MEMATTR_DEVICE on all architectures 2021-04-12 06:15:31 +00:00
vmparam.h Add a vmparam.h constant indicating pmap support for large pages. 2020-09-23 19:34:21 +00:00