freebsd-dev/sys/arm64
Jessica Clarke 05985a7f80 arm64: Improve DDB backtrace support
The existing implementation relies on each trap handler saving a normal
stack frame record, which is a waste of time and space when we're
already saving a trapframe to the stack. It's also wrong as it currently
saves LR not ELR.

Instead of patching it up, rewrite it based on the RISC-V implementation
with inspiration from the amd64 implementation for how to handle
vectored traps to provide an improved implementation. This includes
compressing the information down to one line like other architectures
rather than the highly-verbose old form that repeats itself by printing
LR and FP in one frame only to print them as PC and SP in the next. It
also includes printing out actually useful information about the traps
that occurred, though FAR is not saved in the trapframe so we cannot
print it (in general it can be clobbered between when the trap happened
and now), only ESR.

The AAPCS also allows the stack frame record to be located anywhere in
the frame, not just the top, so the caller's SP is not at a fixed offset
from the callee's FP like on almost all other architectures in
existence. This means there is no way to derive the caller's SP in the
unwinder, and so we have to drop that bit of (unused) state everywhere.

Reviewed by:	jhb, markj
Differential Revision:	https://reviews.freebsd.org/D28026
2021-02-01 14:15:57 +00:00
..
acpica arm64/acpi: Give the real PA limit to ACPI 2020-08-26 02:12:15 +00:00
arm64 arm64: Improve DDB backtrace support 2021-02-01 14:15:57 +00:00
broadcom arm64: genet: Add bcm2711-genet-v5 compatible 2021-01-05 20:50:43 +01:00
cavium arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
cloudabi32 Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
cloudabi64 Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
conf Enable KERN_TLS by default in ARM64 GENERIC 2021-01-28 20:48:37 +00:00
coresight arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
freescale/imx imx7gpc: Remove unused functions 2020-11-16 11:54:38 +00:00
include arm64: Improve DDB backtrace support 2021-02-01 14:15:57 +00:00
intel Add support for Intel Stratix 10 platform. 2019-09-13 16:50:57 +00:00
iommu Introduce IOMMU support for arm64 platform. 2020-11-16 21:55:52 +00:00
linux arm64: fix struct l_sigaction_t layout 2020-12-08 18:24:33 +00:00
nvidia/tegra210 arm64: Directly use #include <dt-binding/...> 2021-01-15 20:07:19 +01:00
qoriq arm64: QorIQ: gpio: return BUS_PROBE_DEFAULT 2021-01-06 22:37:38 +01:00
qualcomm Enable Qualcomm Debug Subsystem (QDSS) block on MSM8916 SoC. 2018-04-10 12:53:48 +00:00
rockchip arm64: Directly use #include <dt-binding/...> 2021-01-15 20:07:19 +01:00