-
Notifications
You must be signed in to change notification settings - Fork 640
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
Add support for Star64 SBC #1019
Conversation
53b73d7
to
864534f
Compare
afa1d85
to
933a197
Compare
So, is the plan now to merge this? With a few changes this is also usable with the VisionFive board then, that has the same SOC. |
Is there any good reason not to update to OpenSBI 1.3 actually? We have been at 0.8 for ages and just recently (#383) switched to 0.9 finally. If 1.3 works on all the (new) hardware and QEMU, then let's just use this by default. |
0.9 is actually not working, sel4bench has been failing for RISC-V since we merged that PR. If 1.3 does work everywhere I would be for using it and figuring out what exactly the problem is on 1.3 instead of 0.9. So, how do we check that 1.3 works for everything? Is everything we care about in CI already? |
Well, things should be there. However, trying to use OpenSBI v1.2 in seL4/sel4bench-manifest#12 failed either due to an outdated workflow or I lack some rights: https://github.com/seL4/sel4bench-manifest/actions/runs/4826147244/jobs/8597908000 |
Just to note in order to get seL4/sel4test working, compiling OpenSBI is not required, so updating OpenSBI will not have an effect for this particular platform, unless someone was to change the default booting process. So, I (think) there is nothing blocking this PR. |
Could you explain in detail at seL4/docs#181 how you currently set up things? Seems - for quite practical development reasons - you are not building a "OpenSBI+sel4"-package that SPL loads. But instead have SPL boot OpenSBI and then U-Boot from some Flash, so a sel4 system can be loaded via TFTP then. Question is, if we want both way to work, so also how that U-Boot is not needed there at all except for convenience. |
tools/dts/star64.dts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have tools/dts/update-dts.sh
, is there a trivial way to extend this so it can grab this DTS from the linux sources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As is tradition with software, the script is broken so I will have to fix that first then I should be able to add RISC-V device trees to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the boot process is sorted out, this looks good to go from my side. It'll be nice to have another RISC-V board in CI and a potential future verification option with actual ASID support.
# The value for TIMER_FREQUENCY is from the "timebase-frequency" field on | ||
# the "cpus" node in the Star64 device tree. | ||
# The value for PLIC_MAX_NUM_INT comes from the DTS "plic" node which says | ||
# "riscv,ndev = <0x88>". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for documenting those.
Happy to adjust this PR (or make a new one once this is merged) to adhere to #1036 |
I've successfully tested this commit with sel4test with mcs and smp enabled, in combination with seL4/util_libs#167, seL4/seL4_libs#78, and seL4/seL4_tools#174, on pinetab-v hardware, which is based on the same SoC as the star64. I configured sel4test with these option: ./init-build.sh -DPLATFORM=star64 -DKernelRiscvExtD=true -DUseRiscVOpenSBI=false -DSIMULATION=false -DMCS=true -DSMP=true -DNUM_NODES=4 This is the sel4test console output: sel4test-mcs-smp-success.log |
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Similarly to the U54-MC, the U74-MC has a S-core that does not run in supervisor mode. Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
1e80eb4
to
e4953e1
Compare
Adding When trying to load the value of |
It seems that I am missing something, as I would have thought that OpenSBI is doing the exact same access when we use |
I get the same behavior on the pinetab-v. |
I see this information printed by OpenSBI when I boot:
Does |
I tried accessing
|
Yes, that looks like what is happening. I don't know what |
Nevermind, they have documentation on it https://github.com/riscv-software-src/opensbi/blob/master/docs/domain_support.md. |
The only place I can see in OpenSBI where it's setting the domain regions is here, https://github.com/riscv-software-src/opensbi/blob/ee1f83ca848d3639b808e52719bc7111f5a1be7c/lib/utils/fdt/fdt_domain.c#L355. This indicates that the previous booting stage (either U-Boot SPL or the firmware) has decided that the CLINT should only be M-Mode accessible. |
There doesn't seem to be anything in the U-Boot source code that is setting the domain regions (which makes sense). I assume then the firmware has decided to mark it as M-Mode only? In either case, this issue is not blocking this PR and I think there are no other comments to address |
Can this be merged? |
Yes, I think this is good to go when the checks have passed again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good to merge, assuming this boots on your board. Maybe mention in the commit comment that this needs OpenSBI 1.3, so we have a reference there.
This PR adds initial support for the Pine64 Star64 SBC. This is a draft as there are still a couple things to sort out before this is ready for mainlining, however, I thought I would make the changes public in case anyone else is experimenting with the Star64.
The interesting thing about the Star64 is it has SiFive U74 cores which have ASID support unlike the HiFive so hopefully the sel4bench results will be much better on this board, but I am yet to test that.
Couple points for reviewers to consider: