Skip to content

Conversation

@rivos-eblot
Copy link

@rivos-eblot rivos-eblot commented Nov 7, 2025

The SoC debug controller, which seems to be a Darjeeling-only device (although stored in hw/ip/soc_dbg_ctrl) has been heavily modified since its original version.

This PR rewrites the implementation based on current master implementation. There is unfortunately little to none way to test the implementation at the moment.

@rivos-eblot rivos-eblot changed the title `ot_soc_dbgctrl ot_soc_dbgctrl: rewrite SoC debug controller implementation Nov 7, 2025
@rivos-eblot rivos-eblot marked this pull request as draft November 7, 2025 13:09
@rivos-eblot rivos-eblot changed the title ot_soc_dbgctrl: rewrite SoC debug controller implementation ot_soc_dbg_ctrl: rewrite SoC debug controller implementation Nov 7, 2025
@rivos-eblot rivos-eblot marked this pull request as ready for review November 7, 2025 14:16
Copy link

@AlexJones0 AlexJones0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm completely unfamiliar with the SoC debug controller so I've generally reviewed the code for issues, and not any implementation specifics (outside of a couple of cases where the equivalent RTL was easy to cross-reference, or for common QEMU idioms). It generally LGTM outside of my comments though.

Aside: thanks for the very clear and isolated commits, it made this much easier to review!

Note: this signal is not available on EG 1.0.0 and should not be used
with this Top.

Also add missing ot_id in qemu_log messages.

Signed-off-by: Emmanuel Blot <[email protected]>
Avoid using single var name and match other handlers.

Signed-off-by: Emmanuel Blot <[email protected]>
also remove USB device clock from boot status to follow HW changes

Signed-off-by: Emmanuel Blot <[email protected]>
from `ot_socdbg_ctrl` to match new HW

Signed-off-by: Emmanuel Blot <[email protected]>
from `ot_socdbg_ctrl` to match new HW

Signed-off-by: Emmanuel Blot <[email protected]>
A0 signals are no longer defined in new HW

Signed-off-by: Emmanuel Blot <[email protected]>
…BLANK`

to match new HW

Signed-off-by: Emmanuel Blot <[email protected]>
this matches the HW definitions, although the actual bus is still DMI.

Signed-off-by: Emmanuel Blot <[email protected]>
there is no IRQ in new HW

Signed-off-by: Emmanuel Blot <[email protected]>
to match new HW: there are two alert channels (fatal and recoverable)

Signed-off-by: Emmanuel Blot <[email protected]>
- connect SoC debug controller to LC controller
- define alert signals
- tell the LC controller to decode signals for the SoC debug controller

Signed-off-by: Emmanuel Blot <[email protected]>
Copy link

@AlexJones0 AlexJones0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I haven't checked that the functionality matches the docs/RTL in most places.

@rivos-eblot rivos-eblot merged commit 46c09e2 into lowRISC:ot-9.2.0 Nov 12, 2025
10 checks passed
@rivos-eblot rivos-eblot deleted the dev/ebl/soc_dbg_ctrl branch November 12, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants