freebsd-skq/sys/arm64
andrew fe961bddea 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
..
acpica Add support to find the arm64 serial using the ACPI tables. This uses the 2016-11-21 19:26:58 +00:00
arm64 Workaround Spectre Variant 2 on arm64. 2018-01-12 14:01:38 +00:00
cavium If ofw_bus_msimap fails don't try to use the invalid MSI/MSI-X parent node. 2017-03-16 17:49:37 +00:00
cloudabi32 Port cloudabi32.ko to FreeBSD/arm64. 2017-11-30 17:58:48 +00:00
cloudabi64 Correct some more places where TO_PTR() should be used. 2017-11-26 14:53:56 +00:00
conf if_awg: Use syscon prop if it exists 2018-01-04 22:37:15 +00:00
include Workaround Spectre Variant 2 on arm64. 2018-01-12 14:01:38 +00:00