opnsense-src/sys/amd64/include
John Baldwin 2329393c61 amd64: Use __seg_gs to implement per-CPU data accesses.
This makes use of the alternate address space support in both GCC and
clang to access per-CPU data as accesses relative to GS:.  The
original motivation for this is that it quiets verbose warnings from
GCC 12.  However, this version is also much easier to read and
allows the compiler to generate better code (e.g. the compiler can
use a GS: memory operand directly in other instructions such as IMUL
and CMP rather than always MOVing to a temporary register).

The one caveat is that the current approach is very inefficient at -O0
since the compiler expects to load the 0 base offset from a global
variable instead of assuming it is 0 (even with the const).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D40647
2023-07-07 13:06:55 -07:00
..
pc spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
xen xen/intr: introduce dev/xen/bus/intr-internal.h 2023-04-14 15:58:53 +02:00
_align.h
_bus.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
_inttypes.h
_limits.h
_pmap.h amd64: move definition of the struct pmap_pcids into _pmap.h 2023-05-02 14:32:20 +03:00
_stdint.h
_types.h
acpica_machdep.h
apm_bios.h
asan.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
asm.h amd64: -m32 support for machine/asm(macros).h 2022-06-13 18:35:39 +01:00
asmacros.h elfnote: place note in a PT_NOTE program header 2022-06-28 09:51:57 +02:00
atomic.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
bus.h
bus_dma.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
clock.h x86: Deduplicate clock.h 2021-12-06 10:39:08 -05:00
counter.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
cpu.h Simplify swi for bus_dma. 2021-12-28 13:51:25 -08:00
cpufunc.h Consistently provide ffs/fls using builtins 2023-07-06 14:46:41 -03:00
cputypes.h Remove 'cpu' and 'cpu_class' on amd64. 2016-09-15 17:05:54 +00:00
csan.h Limit when we call DELAY from KCSAN on amd64 2021-02-25 12:38:05 +00:00
db_machdep.h Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
dump.h
efi.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
elf.h
endian.h
exec.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
fdt.h
float.h
floatingpoint.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
fpu.h Add domain policy allocation for amd64 fpu_kern_ctx 2020-07-03 14:54:46 +00:00
frame.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
gdb_machdep.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
ieeefp.h Remove checks for __GNUCLIKE_ASM assuming it is always true. 2022-04-12 10:05:45 -07:00
in_cksum.h machine/in_cksum.h: don't include sys/cdefs.h 2022-04-18 21:02:19 +01:00
intr_machdep.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
iodev.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
iommu.h o Add machine/iommu.h and include MD iommu headers from it, 2020-08-05 19:11:31 +00:00
kdb.h smp: Dynamically allocate the stoppcbs array 2023-05-25 18:09:55 -04:00
limits.h Remove checks for __CC_SUPPORTS_WARNING assuming it is always true. 2022-04-12 10:06:13 -07:00
md_var.h amd64: be more precise when enabling the AlderLake small core PCID workaround 2023-01-06 01:30:29 +02:00
memdev.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
metadata.h
minidump.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
msan.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
nexusvar.h
npx.h
ofw_machdep.h
param.h amd64: Populate the KMSAN shadow maps and integrate with the VM 2021-08-10 21:27:53 -04:00
pcb.h Fix for mis-interpretation of PCB_KERNFPU. 2020-10-14 23:01:41 +00:00
pci_cfgreg.h
pcpu.h amd64: Use __seg_gs to implement per-CPU data accesses. 2023-07-07 13:06:55 -07:00
pcpu_aux.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pmap.h amd64/arm64 pmap: Stop requiring the accessed bit for superpage promotion 2023-06-12 13:40:57 -05:00
pmc_mdep.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
proc.h Move kstack_contains() and GET_STACK_USAGE() to MD machine/stack.h 2023-02-02 00:59:26 +02:00
procctl.h amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
profile.h amd64: -m32 support for machine/profile.h 2022-06-13 18:35:39 +01:00
psl.h
ptrace.h
pvclock.h
reg.h
reloc.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
resource.h
runq.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
segments.h amd64: -m32 support for machine/segments.h 2022-06-13 18:35:39 +01:00
setjmp.h
sf_buf.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
sgx.h Add support for Intel Software Guard Extensions (Intel SGX). 2017-08-16 10:38:06 +00:00
sgxreg.h Add support for Intel Software Guard Extensions (Intel SGX). 2017-08-16 10:38:06 +00:00
sigframe.h
signal.h
smp.h amd64: rework AP startup 2021-07-27 20:11:15 +03:00
specialreg.h
stack.h Move kstack_contains() and GET_STACK_USAGE() to MD machine/stack.h 2023-02-02 00:59:26 +02: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
tss.h amd64: move common_tss into pcpu. 2019-11-10 09:28:18 +00:00
ucontext.h
vdso.h
vm.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vmm.h vmm: Avoid embedding cpuset_t ioctl ABIs 2023-05-23 21:15:59 -04:00
vmm_dev.h vmm: Avoid embedding cpuset_t ioctl ABIs 2023-05-23 21:15:59 -04:00
vmm_instruction_emul.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vmm_snapshot.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vmparam.h vm: centralize VM_BATCHQUEUE_SIZE definition 2023-01-21 14:30:00 -05:00