freebsd-dev/sys/arm64/include
Andrew Turner 2cb0e95f48 Support creating and using arm64 pmap at stage 2
Add minimal support for creating stage 2 IPA -> PA mappings. For this we
need to:

 - Create a new vmid set to allocate a vmid for each Virtual Machine
 - Add the missing stage 2 attributes
 - Use these in pmap_enter to create a new mapping
 - Handle stage 2 faults

The vmid set is based on the current asid set that was generalised in
r358328. It adds a function pointer for bhyve to use when the kernel needs
to reset the vmid set. This will need to call into EL2 and invalidate the
TLB.

The stage 2 attributes have been added. To simplify setting these fields
two new functions are added to get the memory type and protection fields.
These are slightly different on stage 1 and stage 2 tables. We then use
them in pmap_enter to set the new level 3 entry to be stored.

The D-cache on all entries is cleaned to the point of coherency. This is
to allow the data to be visible to the VM. To allow for userspace to load
code when creating a new executable entry an invalid entry is created. When
the VM tried to use it the I-cache is invalidated. As the D-cache has
already been cleaned this will ensure the I-cache is synchronised with the
D-cache.

When the hardware implements a VPIPT I-cache we need to either have the
correct VMID set or invalidate it from EL2. As the host kernel will have
the wrong VMID set we need to call into EL2 to clean it. For this a second
function pointer is added that is called when this invalidation is needed.

Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D23875
2020-05-27 08:00:38 +00:00
..
_align.h
_bus.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
acpica_machdep.h
armreg.h Add more are64 special register fields 2020-03-06 16:00:35 +00:00
asm.h Stop speculation past an eret instruction 2019-12-19 08:52:16 +00:00
atomic.h Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
bus_dma_impl.h Allow loading the same DMA address multiple times without any prior 2019-05-16 17:41:16 +00:00
bus_dma.h Allow loading the same DMA address multiple times without any prior 2019-05-16 17:41:16 +00:00
bus.h Add genet driver for Raspberry Pi 4B Ethernet 2020-04-22 00:42:10 +00:00
clock.h
counter.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
cpu.h Move the arm64 cache identification to identcpu.c 2020-03-03 15:25:01 +00:00
cpufunc.h Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +00:00
csan.h Add kcsan_md_unsupported from NetBSD. 2019-11-21 13:22:23 +00:00
db_machdep.h
debug_monitor.h Move the struct debug_monitor_state out of _KERNEL. 2019-11-03 22:17:49 +00:00
disassem.h
dump.h
efi.h Catch exceptions during EFI RT calls on amd64. 2018-09-02 21:37:05 +00:00
elf.h gcore: Add aarch64 32-bit core support 2019-10-11 14:15:50 +00:00
endian.h
exec.h
float.h
floatingpoint.h
fpu.h
frame.h Impleent COMPAT_FREEBSD32 for arm64. 2019-01-13 19:49:46 +00:00
hypervisor.h Update the hypervisor registers 2020-03-06 14:46:50 +00:00
ieeefp.h
ifunc.h Remove resolver_qual from DEFINE_IFUNC/DEFINE_UIFUNC macros. 2019-05-16 22:20:54 +00:00
in_cksum.h
intr.h Create macros for the ACPI interrupt cross references. This is considered a 2018-03-07 13:16:03 +00:00
iodev.h
kdb.h
machdep.h Mark the arm64 machdep.h as kernel only 2020-03-05 10:52:16 +00:00
md_var.h
memdev.h
metadata.h
minidump.h
ofw_machdep.h
param.h Define MAXCPU consistently between the kernel and KLDs. 2020-02-05 19:08:21 +00:00
pcb.h Add support for setting hardware breakpoints from ptrace on arm64. 2019-11-03 15:42:08 +00:00
pci_cfgreg.h
pcpu_aux.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
pcpu.h Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +00:00
pmap.h Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +00:00
pmc_mdep.h
proc.h Utilize ASIDs to reduce both the direct and indirect costs of context 2019-11-03 17:45:30 +00:00
procctl.h amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
profile.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
psl.h
pte.h Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +00:00
ptrace.h
reg.h Add support for setting hardware breakpoints from ptrace on arm64. 2019-11-03 15:42:08 +00:00
reloc.h
resource.h
runq.h
setjmp.h
sf_buf.h
sigframe.h Follow arm[32] and sparc64 KAPI and provide the FreeBSD standard spelling 2019-01-29 20:10:27 +00:00
signal.h
smp.h
stack.h
stdarg.h Introduce an architecture-agnostic <sys/_stdarg.h> to reduce 2017-12-25 20:54:00 +00:00
sysarch.h
trap.h
ucontext.h Impleent COMPAT_FREEBSD32 for arm64. 2019-01-13 19:49:46 +00:00
undefined.h Allow the userspace ID register fields to be read from the kernel 2019-10-30 13:45:40 +00:00
vdso.h Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32. 2017-11-24 13:50:53 +00:00
vfp.h Impleent COMPAT_FREEBSD32 for arm64. 2019-01-13 19:49:46 +00:00
vm.h
vmparam.h Eliminate an unused declaration. The variable in question is only defined 2019-10-07 04:22:03 +00:00