freebsd-dev/sys/riscv/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
asm.h Add .cfi_{start,end}proc for RISC-V assembly functions 2020-11-26 17:37:22 +00:00
atomic.h riscv: fix errors in some atomic type aliases 2021-03-04 16:59:58 -04:00
bus_dma_impl.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
bus_dma.h
bus.h Add missing assignment forgotten in r365899 2020-09-20 15:11:52 +00:00
clock.h
counter.h riscv: small counter(9) improvements 2020-12-11 20:01:45 +00:00
cpu.h arm64, riscv: Fix TRAF_PC() to return the PC, not the return address. 2021-10-01 11:53:12 -07:00
cpufunc.h
db_machdep.h riscv: improve exception code naming 2020-10-24 20:57:13 +00:00
dump.h minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
efi.h
elf.h
encoding.h
endian.h Consolidate machine/endian.h definitions 2021-03-26 19:00:22 -03:00
exec.h
float.h
floatingpoint.h
fpe.h
frame.h
ieeefp.h libc: Provide sub fp(s|g)etmask() implementations for RISC-V 2020-08-03 12:48:51 +00:00
in_cksum.h
intr.h
kdb.h Introduce kdb-level watchpoint functions 2021-03-29 12:05:43 -03:00
machdep.h
md_var.h minidump: Parameterize minidumpsys() 2021-11-19 15:05:52 -04:00
memdev.h riscv: Add memmmap so we can mmap /dev/mem 2020-10-01 15:04:55 +00:00
metadata.h RISC-V boot1.efi and loader.efi support 2020-07-06 18:19:42 +00:00
minidump.h Sparsify the vm_page_dump bitmap 2020-09-21 22:21:59 +00:00
ofw_machdep.h
param.h riscv: Define __PCI_REROUTE_INTERRUPT 2020-09-30 02:21:38 +00:00
pcb.h
pcpu_aux.h Correct padding length for RISC-V PCPU data. 2020-08-12 18:45:36 +00:00
pcpu.h Remove PCPU_INC 2021-03-20 19:23:59 -07:00
pmap.h riscv: Implement pmap_mapdev_attr 2021-10-17 15:31:35 +01:00
pmc_mdep.h
proc.h Make struct syscall_args machine independent 2021-12-08 18:45:33 +00:00
procctl.h
profile.h riscv: fix uintfptr_t 2020-08-05 22:09:40 +00:00
psl.h
pte.h
ptrace.h
reg.h riscv: Make machine/regs.h self-contained 2021-11-23 21:21:17 -07:00
reloc.h
resource.h
riscvreg.h riscv: improve exception code naming 2020-10-24 20:57:13 +00:00
runq.h
sbi.h riscv: add SBI system reset extension 2021-01-27 19:19:54 -04:00
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h
stack.h Stack unwinding robustness fixes for RISC-V. 2020-12-08 17:57:18 +00:00
stdarg.h
sysarch.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 riscv: Implement non-stub __vdso_gettc and __vdso_gettimekeep 2021-07-05 16:16:53 +01:00
vm.h
vmparam.h riscv: handle page faults in the unmappable region 2021-10-07 18:12:17 -03:00