opnsense-src/sys/arm64/include
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
..
_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 arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
armreg.h Extract the logic from pmap_kextract 2021-01-15 19:08:01 +00:00
asm.h Move the literal pool to the end of asm functions 2020-12-23 13:57:25 +00:00
atomic.h arm64: fix mask in atomic_testand{set,clear}_64 2021-01-02 12:13:25 -08:00
bus.h Add NetBSD compatible bus_space_peek_N() and bus_space_poke_N() functions. 2020-09-19 11:06:41 +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_dma_impl.h o Add the domain member to the struct bus_dma_tag_common as required by 2020-10-27 15:29:53 +00:00
clock.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
counter.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
cpu.h arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
cpufunc.h Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +00:00
csan.h arm64: Improve DDB backtrace support 2021-02-01 14:15:57 +00:00
db_machdep.h arm64: remove pcb_pc 2021-01-08 14:53:44 -04:00
debug_monitor.h Move the struct debug_monitor_state out of _KERNEL. 2019-11-03 22:17:49 +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 Catch exceptions during EFI RT calls on amd64. 2018-09-02 21:37:05 +00:00
elf.h arm64: fix incorrect HWCAP definitions 2020-09-08 15:08:20 +00:00
endian.h arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +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 Impleent COMPAT_FREEBSD32 for arm64. 2019-01-13 19:49:46 +00:00
gdb_machdep.h arm64: gdb(4) machine-dependent bits 2021-01-08 14:53:44 -04:00
hypervisor.h Update the hypervisor registers 2020-03-06 14:46:50 +00:00
ieeefp.h arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
ifunc.h Remove resolver_qual from DEFINE_IFUNC/DEFINE_UIFUNC macros. 2019-05-16 22:20:54 +00:00
in_cksum.h Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
intr.h arm64: Increase NIRQ to 16k 2020-10-15 03:12:00 +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
iommu.h Introduce IOMMU support for arm64 platform. 2020-11-16 21:55:52 +00:00
kdb.h Implement kdb_cpu_sync_icache on arm64. 2016-02-05 15:38:28 +00:00
machdep.h Switch to an empty ttbr0 pagetable when the MMU is enabled 2020-09-03 10:11:12 +00:00
md_var.h Move vm_page_dump bitset array definition to MI code 2020-09-21 22:20:37 +00:00
memdev.h Add the MEM_EXTRACT_PADDR ioctl to /dev/mem. 2020-09-02 18:12:47 +00:00
metadata.h loader.efi: Make framebuffer commands available for arm64 2017-10-25 18:55:04 +00:00
minidump.h Sparsify the vm_page_dump bitmap 2020-09-21 22:21:59 +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 arm64: Stop setting VM_BCACHE_SIZE_MAX 2021-01-19 20:34:35 -05:00
pcb.h arm64: remove pcb_pc 2021-01-08 14:53:44 -04:00
pci_cfgreg.h Implement stubs for ACPI PCI routines 2015-07-12 17:28:31 +00:00
pcpu.h Switch the arm64 pcpu to a global register variable 2021-01-13 16:36:52 +00:00
pcpu_aux.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
pmap.h Extract the logic from pmap_kextract 2021-01-15 19:08:01 +00:00
pmc_mdep.h [hwpmc] Fix call chain capture for ARM64 2020-10-22 05:07:25 +00:00
proc.h Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
procctl.h amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
profile.h arm64: fix uintfptr_t 2020-08-05 22:09:57 +00:00
psl.h Add support for arm64 to loader.efi and boot1.efi 2015-04-14 13:55:01 +00:00
pte.h Support creating and using arm64 pmap at stage 2 2020-05-27 08:00:38 +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 support for setting hardware breakpoints from ptrace on arm64. 2019-11-03 15:42:08 +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
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 Rename COUNT_IPI to INTR_IPI_COUNT to reduce the diff with intrng. 2016-03-18 16:29:58 +00:00
stack.h arm64: Improve DDB backtrace support 2021-02-01 14:15:57 +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 arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
undefined.h Move ID reading signatures to a better header 2020-07-01 16:17: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 arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +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, riscv: Set VM_KMEM_SIZE_SCALE to 1 2021-01-19 20:34:36 -05:00