Skip to content

Make haltsum0 optional if there is only one hart.#505

Merged
timsifive merged 2 commits into
masterfrom
haltsum0
Dec 4, 2019
Merged

Make haltsum0 optional if there is only one hart.#505
timsifive merged 2 commits into
masterfrom
haltsum0

Conversation

@timsifive
Copy link
Copy Markdown
Contributor

This is not forwards compatible. Debuggers that rely on haltsum0 would
break with this change. But it makes the debug interface on tiny 1-hart
systems smaller, especially because it allows the number of address bits
in the DMI to be 1 less. (Haltsum0 at 0x40 due to other efforts to
maintain backwards compatibility.)

Fixes #389.

This is not forwards compatible. Debuggers that rely on haltsum0 would
break with this change. But it makes the debug interface on tiny 1-hart
systems smaller, especially because it allows the number of address bits
in the DMI to be 1 less. (Haltsum0 at 0x40 due to other efforts to
maintain backwards compatibility.)

Fixes #389.
@timsifive
Copy link
Copy Markdown
Contributor Author

@markuslauterbach, can you comment?

Comment thread xml/dm_registers.xml Outdated
is halted or not. Unavailable/nonexistent harts are not considered to
be halted.

This register may not be present in systems with fewer than 2 harts.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"May not" is ambiguous, possibly meaning "shall not" and possibly meaning "may." How about something like:
This register must be present in systems with 2 or more harts and may be in systems with 1 hart.

Also, is this statement related to the number of harts in the system or the number of harts attached to this DM?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Does "might not" instead of "may not" work?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That sounds good.

My other question still applies. Should it be something like "This register might not be present if fewer than 2 harts are attached to the DM." or do you think it's correct as written?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are right on that point. I've pushed a change to reflect all this.

@markuslauterbach
Copy link
Copy Markdown

I can't really comment on whether it's justified to make a backwards-incompatible change here, but I agree that the change itself would be reasonable. So far my debug driver does not use haltsum at all.

@timsifive
Copy link
Copy Markdown
Contributor Author

Thank you, @markuslauterbach. Knowing it won't be a problem for you either makes me more confident that this change is OK.

Copy link
Copy Markdown
Collaborator

@ernie-sifive ernie-sifive left a comment

Choose a reason for hiding this comment

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

That wording sounds good to me.

Copy link
Copy Markdown
Collaborator

@pdonahue-ventana pdonahue-ventana left a comment

Choose a reason for hiding this comment

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

Looks great.

@timsifive timsifive merged commit a310a37 into master Dec 4, 2019
@timsifive timsifive deleted the haltsum0 branch December 4, 2019 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

haltsum0 should not be required for single hart systems

4 participants