Page MenuHomeFreeBSD

Implement single stepping on arm64
ClosedPublic

Authored by andrew on Dec 29 2015, 9:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 24, 5:12 PM
Unknown Object (File)
Sun, May 19, 6:01 AM
Unknown Object (File)
Sat, May 11, 1:46 AM
Unknown Object (File)
Sat, May 4, 1:25 PM
Unknown Object (File)
Apr 26 2024, 6:39 AM
Unknown Object (File)
Apr 26 2024, 6:22 AM
Unknown Object (File)
Apr 13 2024, 11:46 PM
Unknown Object (File)
Feb 19 2024, 4:56 PM
Subscribers

Details

Summary

Implement single stepping on arm64 by setting the single step bits on the processor and debug state registers. We set mdscr on each context switch, this should be replaced by a flag to mark when this bit needs to be set.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Implement single stepping on arm64.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: kib, arm64.
andrew set the repository for this revision to rS FreeBSD src repository - subversion.
andrew added a subscriber: emaste.

Move to a flag to mark when to enable single stepping in mdscr_el1

sys/arm64/arm64/swtch.S
72 ↗(On Diff #11816)

I didn't mean to update this comment, it was part of a previous iteration & will be reverted.

kib edited edge metadata.

The implementation looks fine WRT to my limited amount of understanding of the spec.

My real questions are about the specification:

  1. Why is the single-stepping state is recorded in the global CPU (PE) control register instead of the context-switched registers, e.g. cpsr/spsr ? We have to add special register accesses to context switch.
  2. What does the PSTATE.SS bit designates ? Or rather, what is supposed the OS to do differently when exception handler is entered and sprs.ss == 0 or 1 ?
This revision is now accepted and ready to land.Dec 31 2015, 5:34 PM
This revision was automatically updated to reflect the committed changes.