History log of /freebsd-current/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
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/


# d69b94ba 17-May-2019 Justin Hibbits <jhibbits@FreeBSD.org>

powerpc/dtrace: Actually fix stack traces

Fix stack unwinding such that requesting N stack frames in lockstat will
actually give you N frames, not anywhere from 0-3 as had been before.

lockstat prints the mutex function instead of the caller as the reported
locker, but the stack frame is detailed enough to find the real caller.

MFC after: 2 weeks


# e9aae349 12-Apr-2019 Justin Hibbits <jhibbits@FreeBSD.org>

powerpc/dtrace: Fix dtrace powerpc asm, and simplify stack walking

Fix some execution bugs in the dtrace powerpc asm. addme pulls in the carry
flag which we don't want, and the result wasn't recorded anyways, so the
following beq to check for exit condition wasn't checking the right
condition.

Simplify the stack walking in dtrace_isa.c, so there's only a single walker
that handles both pc and sp. This should make it easier to follow, and any
bugfix that may be needed for walking only needs to be made in one place
instead of two now.

MFC after: 2 weeks


# 97a9d3b5 20-Oct-2018 Justin Hibbits <jhibbits@FreeBSD.org>

powerpc/dtrace: Use explicit bit numbers to mask out PSL_EE

There seems to be a race in CI, such that dtrace_asm.S might be assembled
before the genassym is completed. This causes a build failure when PSL_EE
doesn't exist, and is read as 0. Get around this by explicitly specifying
the bits in the mask instead.


# fc2a8776 20-Mar-2018 Ed Maste <emaste@FreeBSD.org>

Rename assym.s to assym.inc

assym is only to be included by other .s files, and should never
actually be assembled by itself.

Reviewed by: imp, bdrewery (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D14180


# 161c4151 06-Aug-2016 Justin Hibbits <jhibbits@FreeBSD.org>

Two fixups for dtrace

* Use the right incantation to get the next stack pointer. Since powerpc uses
special frames for traps, dereferencing the stack pointer straight up won't
get us the next stack pointer in every case.
* Clear EE using the correct instruction sequence. The PowerISA states that
'andi.' ANDs the register with 0||<imm>, instead of sign extending or filling
out the unavailable bits with 1. Even if it did sign extend, PSL_EE is
0x8000, so ~PSL_EE is 0x7fff, and the upper bits would be cleared. Use rlwinm
in the 32-bit case, and a two-rotate sequence in the 64-bit case, the latter
chosen to follow the output generated by gcc.

MFC after: 1 week


# 8241ee3b 23-Apr-2015 Mark Johnston <markj@FreeBSD.org>

Fix DTrace's panic() action.

It would previously call into some unfinished Solaris compatibility code and
return without actually calling panic(9). The compatibility code is
unneeded, however, so just remove it and have dtrace_panic() call vpanic(9)
directly.

Differential Revision: https://reviews.freebsd.org/D2349
Reviewed by: avg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# 7ccb72b3 21-Aug-2013 Justin Hibbits <jhibbits@FreeBSD.org>

Make dtrace_copy() actually work on PowerPC. Although unused currently,
it may be used in the future by dtrace.


# cc117e27 18-Aug-2013 Justin Hibbits <jhibbits@FreeBSD.org>

Fix some ppc64 dtrace bugs, and enable systrace_freebsd32 for ppc64.


# 80a5635c 17-Mar-2013 Justin Hibbits <jhibbits@FreeBSD.org>

Add FBT for PowerPC DTrace. Also, clean up the DTrace assembly code,
much of which is not necessary for PowerPC.

The FBT module can likely be factored into 3 separate files: common,
intel, and powerpc, rather than duplicating most of the code between
the x86 and PowerPC flavors.

All DTrace modules for PowerPC will be MFC'd together once Fasttrap is
completed.


# 7e7a9efd 02-Feb-2013 Justin Hibbits <jhibbits@FreeBSD.org>

Fix the PowerPC DTrace copy functions. The kernel doesn't hold the same view to
the user map, so use the md copy in/out functions provided by the kernel.

MFC with: r242723


# c7570492 07-Nov-2012 Justin Hibbits <jhibbits@FreeBSD.org>

Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.

There is one known issue: Some probes will display an error message along the
lines of: "Invalid address (0)"

I tested this with both a simple dtrace probe and dtruss on a few different
binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect
problems without the modules loaded. Volunteers are welcome.

MFC after: 1 month