Page MenuHomeFreeBSD

Add a kdb show command to print arbitrary SPRs on PowerPC
ClosedPublic

Authored by jhibbits on Aug 3 2016, 1:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 13 2023, 12:37 AM
Unknown Object (File)
Nov 30 2023, 7:16 AM
Unknown Object (File)
Nov 14 2023, 4:02 PM
Unknown Object (File)
Nov 9 2023, 12:23 PM
Unknown Object (File)
Nov 7 2023, 4:28 PM
Unknown Object (File)
Nov 6 2023, 7:27 PM
Unknown Object (File)
Oct 13 2023, 3:01 PM
Unknown Object (File)
Oct 8 2023, 11:21 AM
Subscribers

Details

Summary

There is often a need at the debugger to print arbitrary special
purpose registers (SPRs) on PowerPC. Using a rewritable asm stub, print any SPR
provided on the command line.

Note, as there is no checking in this, attempting to print a nonexistent SPR
may cause a Program exception (illegal instruction, or boundedly undefined).

Note also that this relies on the kernel text pages being writable. If in the
future this is made not the case, this will need to be reworked.

Test Plan

Printing the Processor Version Register (PVR, SPR 287):

db> show spr 11f
SPR 287(11f): 80240012

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4692
Build 4746: arc lint + arc unit

Event Timeline

jhibbits retitled this revision from to Add a kdb show command to print arbitrary SPRs on PowerPC.
jhibbits updated this object.
jhibbits edited the test plan for this revision. (Show Details)
jhibbits added reviewers: PowerPC, nwhitehorn.
This revision was automatically updated to reflect the committed changes.