History log of /freebsd-current/sys/cddl/dev/dtrace/riscv/dtrace_isa.c
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/


# 7a8cf053 30-May-2023 Christos Margiolis <christos@FreeBSD.org>

dtrace: deduplicate some RISC-V functions

match_opcode() is defined in FBT, kinst, and dtrace_subr.c. The function
prologue-checking functions are defined in FBT and kinst.

Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40335


# 98ab9802 23-May-2023 Christos Margiolis <christos@FreeBSD.org>

dtrace: rename rp to frame in dtrace_getreg()

Reviewed by: mhorne, markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40231


# 1fef7abd 20-Apr-2023 Christos Margiolis <christos@FreeBSD.org>

dtrace: add register bindings for RISC-V

Reviewed by: mhorne, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39611


# c6943b44 06-Feb-2023 Mitchell Horne <mhorne@FreeBSD.org>

dtrace: implement riscv dtrace_getustackdepth()

Pretty trivial following other implementations. The existing
dtrace_getustack_common() does most of the work.

Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38303


# 38720107 06-Feb-2023 Jessica Clarke <jrtc27@FreeBSD.org>

dtrace: Fix RISC-V user stack unwinder

The unwind logic was copied from AArch64 which follows the peculiar
AACPS (where, unlike typical RISC architectures, its frame pointer
follows an x86/stack machine-like convention where the frame pointer
points at the bottom of the frame record, not the top). Delete the
pointless riscv_frame struct and fix this.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28054


# cdfa49f2 11-Jan-2023 Mitchell Horne <mhorne@FreeBSD.org>

dtrace: dtrace_getpcstack() tweaks for riscv

Backtraces for fbt probes are missing the caller's frame. Despite what
the inherited comment claims, we do need to insert this manually on
riscv. In fbt_invop(), set cpu_dtrace_caller to be the return address,
not addr.

We should not increment aframes within this function, since we begin the
main loop by unwinding past the current frame.

Plus some very small comment/style tweaks.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37661


# 2f2ec4bc 11-Jan-2023 Mitchell Horne <mhorne@FreeBSD.org>

dtrace: remove unused defines

Reviewed by: markj, emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37659


# b7924341 27-Aug-2021 Andrew Turner <andrew@FreeBSD.org>

Create sys/reg.h for the common code previously in machine/reg.h

Move the common kernel function signatures from machine/reg.h to a new
sys/reg.h. This is in preperation for adding PT_GETREGSET to ptrace(2).

Reviewed by: imp, markj
Sponsored by: DARPA, AFRL (original work)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19830


# 0b92d1dd 15-Jan-2021 Mitchell Horne <mhorne@FreeBSD.org>

riscv: fix kernel build

A more complete fix for this function is being worked on in D28054. Fix
the uninitialized variable error so that builds can at least proceed.

Reported by: several


# 9b9e7f4c 08-Dec-2020 John Baldwin <jhb@FreeBSD.org>

Stack unwinding robustness fixes for RISC-V.

- Push the kstack_contains check down into unwind_frame() so that it
is honored by DDB and DTrace.

- Check that the trapframe for an exception frame is contained in the
traced thread's kernel stack for DDB traces.

Reviewed by: markj
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27357


# fdd947e4 01-Dec-2020 John Baldwin <jhb@FreeBSD.org>

Use uintptr_t for pointers in stack frames.

This catches up to the changes made to struct unwind_state in r364180.

Reviewed by: mhorne
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27360


# fed1ca4b 24-May-2016 Ruslan Bukin <br@FreeBSD.org>

Add initial DTrace support for RISC-V.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5