Page MenuHomeFreeBSD

ddb: Add 'show gic <name>' and 'show all gics' commands.
ClosedPublic

Authored by jhb on Mar 2 2022, 11:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 16, 12:30 PM
Unknown Object (File)
Fri, Sep 6, 6:59 PM
Unknown Object (File)
Wed, Sep 4, 11:57 AM
Unknown Object (File)
Sep 2 2024, 1:43 PM
Unknown Object (File)
Aug 8 2024, 8:04 PM
Unknown Object (File)
Aug 7 2024, 10:28 AM
Unknown Object (File)
Jul 30 2024, 5:03 AM
Unknown Object (File)
Jul 29 2024, 10:48 AM
Subscribers

Details

Summary

To handle the different register layouts for different versions, add a
GIC_DB_SHOW() method. Currently this hook is only implemented for
versions 1 and 2.

Sponsored by: University of Cambridge, Google, Inc.

Diff Detail

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

Event Timeline

jhb requested review of this revision.Mar 2 2022, 11:00 PM
jhb created this revision.

Note that I did not implement this for GIC version 3 (left as an exercise to the reader). This was possibly useful debugging an issue with a 32-bit ARM core on an FPGA running FreeBSD. I also tested this to at least make sure the output was sane in QEMU.

db> show gic gic0
gic0 CPU registers:
 CTLR: 00000001   PMR: 000000ff   BPR: 00000007   RPR: 000000ff
HPPIR: 0000001b  IIDR: 00000000
gic0 Distributor registers:
 CTLR: 00000001 TYPER: 00000008  IIDR: 00000000
SGI  0  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  1  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  2  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  3  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  4  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  5  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  6  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  7  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  8  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI  9  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI 10  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI 11  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI 12  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI 13  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI 14  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
SGI 15  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO ED
PPI  0  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  1  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  2  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  3  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  4  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  5  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  6  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  7  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO LV
PPI  8  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI  9  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI 10  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI 11  grp:0 enable:1 pend:1 active:0 pri:0 trg:0 LO LV
PPI 12  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI 13  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI 14  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
PPI 15  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  0  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  1  grp:0 enable:1 pend:0 active:0 pri:0 trg:0 LO LV
SPI  2  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  3  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  4  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  5  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  6  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  7  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  8  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI  9  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI 10  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI 11  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI 12  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI 13  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
SPI 14  grp:0 enable:0 pend:0 active:0 pri:0 trg:0 LO LV
...
jrtc27 added inline comments.
sys/arm/arm/gic.c
1188–1194

Precedence is the right way round for >> and binary * but for me this is one of the cases that I always need to look up, so maybe best to add the redundant clarifying parentheses?

sys/arm/arm/gic_if.m
71

Should this be guarded by ifdef DDB too (with all the CODE/HEADER gunk that requires)?

This revision was not accepted when it landed; it landed in state Needs Review.Mar 10 2022, 11:41 PM
This revision was automatically updated to reflect the committed changes.
sys/arm/arm/gic_if.m
71

(Oops, missed your review). I don't think we need the gunk just for the interface. It only costs a single global var in the foo_if.c file.