Open
Conversation
remexre
commented
Mar 26, 2026
| /** | ||
| * The current task. | ||
| */ | ||
| struct task *task; |
Member
Author
There was a problem hiding this comment.
should this be in this pr?
remexre
commented
Mar 26, 2026
| * A hart device. | ||
| * | ||
| * Currently, these devices are for "normal" SMP systems, where each hart runs | ||
| * its own copy of the kernel, makes its own scheduling decisions, etc. When we |
Member
Author
There was a problem hiding this comment.
copy is not good wording
remexre
commented
Mar 26, 2026
| * 1024-bit vector registers. This would result in two hart groups, one for the | ||
| * X100 cores and one for the A100 cores. | ||
| */ | ||
| struct hart_group { |
Member
Author
There was a problem hiding this comment.
does this need a refcount?
remexre
commented
Mar 26, 2026
| } else { | ||
| print("Devicetree device {cstr} did not have the thead,vlenb property", | ||
| node->name); | ||
| vlen = VLEN_1024; |
Member
Author
There was a problem hiding this comment.
should this be VLEN_UNKNOWN?
remexre
commented
Mar 26, 2026
| run_selftests(); | ||
|
|
||
| struct hart_locals *hart_locals = get_hart_locals(); | ||
| print("{uptr}", hart_locals->hart); |
60f3888 to
9e10d53
Compare
4755e12 to
b417917
Compare
We need to ensure that tasks are only scheduled on harts with the same register_save_area size, meaning we need to track which harts have which size. It's easiest to keep track of this if we hook that tracking into ordinary device detection, so this device class exists for that purpose. Because init_boothart_hart_locals_late panics if it cannot find the hart device for the boothart, this will not boot at the moment, though it will build. The next patch fixes this. Signed-off-by: Amy Ringo <me@remexre.com>
This restores the ability to boot, since the hart will now be properly detected. Signed-off-by: Amy Ringo <me@remexre.com>
b417917 to
8a2d52f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need to ensure that tasks are only scheduled on harts with the same
register_save_area size, meaning we need to track which harts have which
size.
It's easiest to keep track of this if we hook that tracking into
ordinary device detection, so this device class exists for that purpose.