Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: Add Openocd.set_available() #508

Merged
merged 1 commit into from
Oct 3, 2023
Merged

debug: Add Openocd.set_available() #508

merged 1 commit into from
Oct 3, 2023

Conversation

timsifive
Copy link
Collaborator

This helper uses dmi_write commands to mark harts
available/unavailable.

available_mask = 0
for hart in harts:
available_mask |= 1 << hart.id
self.command(f"riscv dmi_write 0x1f 0x{available_mask:x}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

So, 0x1F in this context isn't a JTAG IR value (bypass), it's a DMI address ("custom"), which Spike implements "unavailable" control.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. I should probably add a comment explaining that.

This helper uses dmi_write commands to mark harts
available/unavailable.
@timsifive timsifive merged commit 9905a43 into master Oct 3, 2023
2 checks passed
@timsifive timsifive deleted the set_available branch October 3, 2023 16:08
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