History log of /freebsd-current/sys/arm64/include/undefined.h
Revision Date Author Comments
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# eeada922 01-Jul-2020 Andrew Turner <andrew@FreeBSD.org>

Move ID reading signatures to a better header

The functions to read the common user and kernel ID registers should be
in cpu.h rather than undefined.h as they are related to CPU details and
used by undefined instruction handlers.

Sponsored by: Innovate UK


# 45e999d9 29-Jun-2020 Andrew Turner <andrew@FreeBSD.org>

Create a kernel arm64 ID register view

In preparation for using ifuncs in the kernel is is useful to have a common
view of the arm64 ID registers across all CPUs. Add this and extract the
logic for finding the lower value of two fields to a new helper function.

Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D25463


# e68508e1 30-Oct-2019 Andrew Turner <andrew@FreeBSD.org>

Allow the userspace ID register fields to be read from the kernel

To allow consistent values to be used in both the kernel and userspace
create a function for these to be read from the kernel. They use a newly
created macro with the name of the ID register to read. For now there is
redundant information in the user_regs array as it still holds the CRm and
Op2 values, however this will be fixed in a later change.

This will be used by ptrace to allow hardware breakpoints in userspace.

Sponsored by: DARPA, AFRL


# cb5343c2 29-Oct-2019 Andrew Turner <andrew@FreeBSD.org>

Move the MRS instruction decode macros to armreg.h

These instructions are used to access the registers described in armreg.h,
and will be used in a future change to create a per-register identification
macro.

Sponsored by: DARPA, AFRL


# c7637c4d 27-Sep-2018 Andrew Turner <andrew@FreeBSD.org>

Move the undefined instruction handler to identcpu.c so we have access
to the registers from boot.

Approved by: re (kib)
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D17301


# bcf2b954 14-Sep-2017 Andrew Turner <andrew@FreeBSD.org>

Add support for handling undefined instructions in userspace and the
kernel. We can register callbacks to perform the required operation on the
saved registers before returning.

This is initially used to work around a bug in old versions of QEMU that
trigger such an exception when reading from an ID register when it should
load z zero value.

I expect this could be used with other exception types, e.g. to emulate
special register access from userland.

Sponsored by: DARPA, AFRL