History log of /freebsd-13.1/sys/arm64/arm64/debug_monitor.c (Results 1 – 14 of 14)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.4.0, release/13.1.0
# de87d940 26-Jan-2022 Andrew Turner <[email protected]>

Sort the names of the arm64 debug registers

While here clean up the names for the naming convention of the other
registers in this file.

Reviewed by: kib, mhorne (earlier version)
Sponsored by: The

Sort the names of the arm64 debug registers

While here clean up the names for the naming convention of the other
registers in this file.

Reviewed by: kib, mhorne (earlier version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34060

(cherry picked from commit 664640ba6ccd0c14b607e9babd101dc85ac9c28a)

show more ...


Revision tags: release/12.3.0
# 94e6d144 08-Aug-2021 Ed Maste <[email protected]>

Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder (in the associated license block).

S

Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder (in the associated license block).

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9feff969a01044c3083b552f06f7eb6416bc0524)

show more ...


Revision tags: release/13.0.0
# 123578f8 08-Mar-2021 Mitchell Horne <[email protected]>

gdb: allow setting/removing hardware watchpoints

Handle the 'z' and 'Z' remote packets for manipulating hardware
watchpoints.

This could be expanded quite easily to support hardware or software
bre

gdb: allow setting/removing hardware watchpoints

Handle the 'z' and 'Z' remote packets for manipulating hardware
watchpoints.

This could be expanded quite easily to support hardware or software
breakpoints as well.

https://sourceware.org/gdb/onlinedocs/gdb/Packets.html

Reviewed by: cem, markj
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
NetApp PR: 51

(cherry picked from commit 4beb385813c8b1014f8250a31b07fdc09a059713)

show more ...


# 08ce99c3 04-Mar-2021 Mitchell Horne <[email protected]>

arm64: implement kdb watchpoint functions

Add wrappers around the debug_monitor interface, to be consumed by MI
kernel debugger code. Update dbg_setup_watchpoint() and
dbg_remove_watchpoint() to re

arm64: implement kdb watchpoint functions

Add wrappers around the debug_monitor interface, to be consumed by MI
kernel debugger code. Update dbg_setup_watchpoint() and
dbg_remove_watchpoint() to return specific error codes, not just -1.

Reviewed by: jhb, kib, markj
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.

(cherry picked from commit 3ef68bc62c1e3ca9c452177f5cb9fd4de0df590d)

show more ...


# dbc54475 13-Apr-2021 Mitchell Horne <[email protected]>

arm64: adjust comments in dbg_monitor_exit()

These comments were copied from dbg_monitor_enter(), but the intended
modifications weren't made. Update them to reflect what this code
actually does.

S

arm64: adjust comments in dbg_monitor_exit()

These comments were copied from dbg_monitor_enter(), but the intended
modifications weren't made. Update them to reflect what this code
actually does.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 5742f2d89c03311e8b2d92422c0e2e4063cb2e1d)

show more ...


# 35435ee5 01-Mar-2021 Mitchell Horne <[email protected]>

arm64: fix hardware single-stepping from EL1

The main issue is that debug exceptions must to be disabled for the
entire duration that SS bit in MDSCR_EL1 is set. Otherwise, a
single-step exception w

arm64: fix hardware single-stepping from EL1

The main issue is that debug exceptions must to be disabled for the
entire duration that SS bit in MDSCR_EL1 is set. Otherwise, a
single-step exception will be generated immediately. This can occur
before returning from the debugger (when MDSCR is written to) or before
re-entering it after the single-step (when debug exceptions are unmasked
in the exception handler).

Solve this by delaying the unmask to C code for EL1, and avoid unmasking
at all while handling debug exceptions, thus avoiding any recursive
debug traps.

Reviewed by: markj, jhb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 874635e381731e1fbd5e2d0459ca87814f1e455c)

show more ...


Revision tags: release/12.2.0, release/11.4.0
# b0254d9a 24-Feb-2020 Olivier Houchard <[email protected]>

debug_monitor: Avoid setting the PSR_D flag for 32bits binaries.

In dbg_monitor_exit(), avoid setting the PSR_D bit if the process is
a 32bits binary. PSR_D is an aarch64-only flags, and for aarch32

debug_monitor: Avoid setting the PSR_D flag for 32bits binaries.

In dbg_monitor_exit(), avoid setting the PSR_D bit if the process is
a 32bits binary. PSR_D is an aarch64-only flags, and for aarch32 processes,
it means "run in big endian".
This should make COMPAT_FREEBSD32 run much better on arm64.

show more ...


# 05f39d1a 03-Nov-2019 Andrew Turner <[email protected]>

Add support for setting hardware breakpoints from ptrace on arm64.

Implement get/fill_dbregs on arm64. This is used by ptrace with the
PT_GETDBREGS and PT_SETDBREGS requests. It allows userspace to

Add support for setting hardware breakpoints from ptrace on arm64.

Implement get/fill_dbregs on arm64. This is used by ptrace with the
PT_GETDBREGS and PT_SETDBREGS requests. It allows userspace to set hardware
breakpoints.

The struct dbreg is based on Linux to ease adding hardware breakpoint
support to debuggers.

Reviewed by: jhb
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D22195

show more ...


Revision tags: release/12.1.0
# fc232b89 30-Oct-2019 Andrew Turner <[email protected]>

Use a lowercase name for arm64 special registers so they don't conflict
with macros of the same name.

Sponsored by: DARPA, AFRL


# a5d295e2 30-Oct-2019 Andrew Turner <[email protected]>

Update the debug monitor handling to work after userspace has started

The debug monitor register state is now stored in a struct and updated
when required. Currently there is only a kernel state, ho

Update the debug monitor handling to work after userspace has started

The debug monitor register state is now stored in a struct and updated
when required. Currently there is only a kernel state, however a
per-process state will be added in a future change.

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D22128

show more ...


Revision tags: release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0
# 992029ba 12-Aug-2017 John Baldwin <[email protected]>

Reliably enable debug exceptions on all CPUs.

Previously, debug exceptions were only enabled on the boot CPU if
DDB was enabled in the dbg_monitor_init() function. APs also called
this function, bu

Reliably enable debug exceptions on all CPUs.

Previously, debug exceptions were only enabled on the boot CPU if
DDB was enabled in the dbg_monitor_init() function. APs also called
this function, but since mp_machdep.c doesn't include opt_ddb.h, the
APs ended up calling an empty stub defined in <machine/debug_monitor.h>
instead of the real function. Also, if DDB was not enabled in the kernel,
the boot CPU would not enable debug exceptions.

Fix this by adding a new dbg_init() function that always clears the OS
lock to enable debug exceptions which the boot CPU and the APs call.
This function also calls dbg_monitor_init() to enable hardware breakpoints
from DDB on all CPUs if DDB is enabled. Eventually base support for
hardware breakpoints/watchpoints will need to move out of the DDB-only
debug_monitor.c for use by userland debuggers.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D12001

show more ...


Revision tags: release/11.1.0, release/11.0.1, release/11.0.0
# 6de3c415 13-Sep-2016 Andrew Turner <[email protected]>

Add a missing opt_ddb.h include from places that include debug_moditor.h
to fix the build.

Obtained from: ABT Systems Ltd
X-MFC with: r305771
Sponsored by: The FreeBSD Foundation


Revision tags: release/10.3.0
# d6849317 22-Feb-2016 Svatopluk Kraus <[email protected]>

As <machine/param.h> is included from <sys/param.h>, there is no need
to include it explicitly when <sys/param.h> is already included.

Reviewed by: alc, kib
Differential Revision: https://reviews.fr

As <machine/param.h> is included from <sys/param.h>, there is no need
to include it explicitly when <sys/param.h> is already included.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D5378

show more ...


Revision tags: release/10.2.0
# 988b7f60 27-Apr-2015 Zbigniew Bodek <[email protected]>

Introduce ddb(4) support for ARM64

Obtained from: Semihalf
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation