-
Notifications
You must be signed in to change notification settings - Fork 332
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
OpenOCD assumes hartid and hart index are the same #278
Comments
How does OpenOCD use hartid? I mean, how does this issue come up? |
Currently upon startup OpenOCD will eg. display:
That's really the hart index, though. And the source uses hartid everywhere, and that should be clarified. This is not high-priority, but I think it's worth tracking. |
@en-sc is it still the case? |
I don't think that this format of output occurs anymore.
I can't see that the per-hart info is logged at all other than the number of detected harts:
|
@aap-sc, I'm not sure what Tim meant by 'hart index' and 'hartid'. We have 4 similar concepts:
First of all, (3) and (4) are not related in any way. In fact, AFAIK, (4) is not used by OpenOCD in any meaningful way. User-specified (2) is used as (3). I think this is what Tim meant and it still holds true. riscv-openocd/src/target/riscv/riscv-013.c Line 2174 in 40cda81
This makes the relations between the first three a bit complicated :).
The cherry on top is, the whole TLDR:IMHO, while the issue is not clearly described, it is valid and should be left open. |
I'm pretty sure that by "index" he meant the index of the array/list that OpenOCD uses (or maybe used in the past?) internally to store hart info whereas the "hartid" is the actual Hart identifier and the two may not be the same number. For example the spec says that one hart must have the ID 0 but otherwise hart IDs just have to be unique and are not necessarily contiguous or monotonically incrementing:
Actually "at least" doesn't look correct if exactly one hart must have an ID of zero? |
No description provided.
The text was updated successfully, but these errors were encountered: