Starfive VisionFive 2 Board Support #467
Open
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.
This PR adds Starfive VisionFive 2 Board support to Keystone and addresses #339.
During our case study on secure peripheral access from keystone enclaves, we (@f1bu and I) also added VF2 board support to Keystone to allow for testing some prototypes on real hardware. We now want to contribute our changes to Keystone. We oriented on this previous PR (#386) and tried to be consistent with our changes (same directory structures and similar names, etc.) for easier reviews.
It's important to note that as secure boot is not implemented yet, this board support should only be used for testing and not for production.
We tested the PR on two different VF2 boards and were able to run all examples successfully. One exception is the
tests.ke
example which constantly displays a "[runtime] non-handable interrupt ..." message after some of the tests pass. It is triggered fortest-fib-bench
on the rdcycle operation. This is because we use Linux 6.7, and since Linux 6.6, the rdcycle operation is a privileged instruction (see [1]), which means it is no longer available for userland. One fix for this is to replace rdcycle with rdtime. After that change, thetests.ke
example runs successfully (this change is not included in this PR but this problem should be addressed in the future).To build the SD image, simply run the following script:
The sd image is located in build-starfive/visionfive264/buildroot.build/images/sdcard.img. To flash the image to a sd card you can use
make flash
(see mkutils/plat/starfive/visionfive2/run.mk).[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3