-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The RISC-V Vector Extension adds a vcsr CSR since version 0.8, which does not appear in version 0.7.1. I confirmed this on Sipeed Lichee Pi 4A, which has T-Head C910 cores inside, and the version of RVV is 0.7.1, Checking the existence of the vlenb CSR will be a way to probe RVV but not v0p7. For some concerns that some older kernels do not enable vector support for userspace, this solution will also work to treat it as the vector extension does not exist. This can be confirmed on T-Head Vendor Kernel working on TH1520. As the RISC-V Vector Extension Specification said: "Attempts to execute any vector instruction, or to access the vector CSRs, raise an illegal-instruction exception when mstatus.VS is set to Off." Signed-off-by: Yangyu Chen <[email protected]>
- Loading branch information
Showing
3 changed files
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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