opnsense-src/sys/arm64/include
Andrew Turner 7023544aec Workaround Spectre Variant 2 on arm64.
We need to handle two cases:

1. One process attacking another process.
2. A process attacking the kernel.

For the first case we clear the branch predictor state on context switch
between different processes. For the second we do this when taking an
instruction abort on a non-userspace address.

To clear the branch predictor state a per-CPU function pointer has been
added. This is set by the new cpu errata code based on if the CPU is
known to be affected.

On Cortex-A57, A72, A73, and A75 we call into the PSCI firmware as newer
versions of this will clear the branch predictor state for us.

It has been reported the ThunderX is unaffected, however the ThunderX2 is
vulnerable. The Qualcomm Falkor core is also affected. As FreeBSD doesn't
yet run on the ThunderX2 or Falkor no workaround is included for these CPUs.

MFC after:	3 days
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D13812
2018-01-12 14:01:38 +00:00
..
_align.h
_bus.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h Define the vm_ooffset_t and vm_pindex_t types as machine-independend. 2017-02-04 12:26:38 +00:00
acpica_machdep.h Add support to find the arm64 serial using the ACPI tables. This uses the 2016-11-21 19:26:58 +00:00
armreg.h Add a Saved Process Status Register bit for AArch32 execution mode. 2017-11-26 14:56:23 +00:00
asm.h In ARMv8.1 ARM has added a process state bit to disable access to userspace 2017-04-13 13:46:01 +00:00
atomic.h Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
bus.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
bus_dma.h Clean up MD pollution of bus_dma.h: 2017-07-01 05:35:29 +00:00
bus_dma_impl.h Clean up MD pollution of bus_dma.h: 2017-07-01 05:35:29 +00:00
clock.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
counter.h Remove trailing whitespace from r317061 2017-04-17 18:57:26 +00:00
cpu.h Add a framework to install CPU errata on arm64. Each erratum can encode 2018-01-09 14:33:05 +00:00
cpufunc.h In ARMv8.1 ARM has added a process state bit to disable access to userspace 2017-04-13 13:46:01 +00:00
db_machdep.h Fix printing of negative offsets (typically from frame pointers) again. 2017-03-26 18:46:35 +00:00
debug_monitor.h Fix the arm64 kernel build when DDB is disabled, debug_monitor.c depends on 2016-09-13 15:45:22 +00:00
disassem.h Framework for ARM64 instruction disassembler 2016-01-29 13:06:30 +00:00
dump.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
efi.h Support the EFI Runtime Services on arm64. As with amd64 we use the 1:1 2017-10-10 13:05:26 +00:00
elf.h Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32. 2017-11-24 13:50:53 +00:00
endian.h Add parentheses missed in r320388 2017-06-27 16:30:01 +00:00
exec.h
float.h Rationalize BSD license on sys/*/include/float.h 2015-08-05 17:05:35 +00:00
floatingpoint.h add floatingpoint.h for arm64 2015-06-24 14:51:53 +00:00
fpu.h Add machine/fpu.h on arm64 for compatibility with amd64. 2017-10-10 13:02:58 +00:00
frame.h Push reading of ESR_EL1 to assembly. Among other uses this will allow us 2017-02-07 18:19:11 +00:00
hypervisor.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
ieeefp.h Fix the floating-point exception values to line up with the hardware 2015-06-24 12:19:49 +00:00
in_cksum.h Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
intr.h Finish removing the non-INTRNG support from sys/arm64. 2016-07-14 17:31:29 +00:00
iodev.h Add basic support for ACPI. It splits out the nexus driver to two new 2015-06-11 15:45:33 +00:00
kdb.h Implement kdb_cpu_sync_icache on arm64. 2016-02-05 15:38:28 +00:00
machdep.h Reliably enable debug exceptions on all CPUs. 2017-08-12 18:42:54 +00:00
md_var.h Implement userspace gettimeofday(2) with HPET timecounter. 2016-08-17 09:52:09 +00:00
memdev.h Add memmmap on arm64 so we can mmap /dev/mem and /dev/kmem. 2016-07-13 23:03:34 +00:00
metadata.h loader.efi: Make framebuffer commands available for arm64 2017-10-25 18:55:04 +00:00
minidump.h Add the arm64 minidump header. This was missed from r286953. 2015-08-20 11:26:26 +00:00
ofw_machdep.h Make using the #address-cells property on the interrupt parent in device 2016-01-02 19:28:35 +00:00
param.h Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32. 2017-11-24 13:50:53 +00:00
pcb.h Move the l0 pagetable address to struct mdproc. It is a property of the 2017-08-22 13:16:14 +00:00
pci_cfgreg.h Implement stubs for ACPI PCI routines 2015-07-12 17:28:31 +00:00
pcpu.h Workaround Spectre Variant 2 on arm64. 2018-01-12 14:01:38 +00:00
pmap.h Move some of the common thread switching code into C. This will help with 2018-01-08 10:23:31 +00:00
pmc_mdep.h Add Performance Monitoring Counters support for AArch64. 2015-05-19 15:25:47 +00:00
proc.h Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32. 2017-11-24 13:50:53 +00:00
profile.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
psl.h Add support for arm64 to loader.efi and boot1.efi 2015-04-14 13:55:01 +00:00
pte.h Move the pmap_l0_index, etc. macros to pte.h. These will be used by the 2017-10-10 12:54:36 +00:00
ptrace.h Add more arm64 machine dependent headers. With this we now have the minimum 2015-03-26 21:10:42 +00:00
reg.h Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32. 2017-11-24 13:50:53 +00:00
reloc.h
resource.h Define PCI_RES_BUS for NEW_PCIB 2016-05-19 14:00:18 +00:00
runq.h
setjmp.h Move the stored signal mask later in the jump buf. It was being clobbered 2016-12-06 13:46:12 +00:00
sf_buf.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
signal.h
smp.h Rename COUNT_IPI to INTR_IPI_COUNT to reduce the diff with intrng. 2016-03-18 16:29:58 +00:00
stack.h Split out db_unwind_frame() so it can be used by DTrace. 2015-06-11 12:47:13 +00:00
stdarg.h Introduce an architecture-agnostic <sys/_stdarg.h> to reduce 2017-12-25 20:54:00 +00:00
sysarch.h Add more arm64 machine dependent headers. With this we now have the minimum 2015-03-26 21:10:42 +00:00
trap.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
ucontext.h Clean up the types used in <machine/ucontext.h> on arm64. As some ports 2015-07-09 12:51:50 +00:00
undefined.h Add support for handling undefined instructions in userspace and the 2017-09-14 17:29:51 +00:00
vdso.h Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32. 2017-11-24 13:50:53 +00:00
vfp.h Add support for passing FPU_KERN_NOCTX to fpu_kern_enter on arm64. This 2017-07-18 16:36:32 +00:00
vm.h Add the VM_MEMATTR_WRITE_THROUGH memory type to arm64 and use it to support 2017-05-13 13:01:15 +00:00
vmparam.h ARM64: fix DMAP calculation 2016-06-30 04:58:19 +00:00