Page MenuHomeFreeBSD

riscv: Add support for the Svinval extension
AcceptedPublic

Authored by bnovkov on Wed, Jun 17, 9:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 8, 5:44 PM
Unknown Object (File)
Sun, Jul 5, 6:48 PM
Unknown Object (File)
Thu, Jul 2, 2:52 AM
Unknown Object (File)
Wed, Jul 1, 8:59 AM
Unknown Object (File)
Tue, Jun 30, 3:39 AM
Unknown Object (File)
Tue, Jun 30, 3:37 AM
Unknown Object (File)
Sat, Jun 27, 6:00 PM
Unknown Object (File)
Fri, Jun 26, 5:48 AM
Subscribers

Details

Reviewers
markj
mhorne
Group Reviewers
riscv
Summary

This change adds wrappers for the new fine-grained TLB invalidation
instructions and extends the capability detection logic to include
the Svinval extension, which is mandatory in the RVA23S64 profile.

Event: BSDCan 2026

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73948
Build 70831: arc lint + arc unit

Event Timeline

mhorne added a subscriber: mhorne.

Is this implemented on the Spacemit K1 ?

sys/riscv/include/cpufunc.h
151

I don't think you are using this yet. But I would suggest this signature instead.

This revision is now accepted and ready to land.Wed, Jun 24, 1:50 PM
sys/conf/kern.mk
169

Are there compilers which will reject this?

sys/riscv/include/cpufunc.h
151

+1

sys/conf/kern.mk
169

Looking at the gcc docs it seems that the syntax is the same.

sys/riscv/include/cpufunc.h
151

thank you for the suggestion, I'll work it into the patch before committing.

jrtc27 added inline comments.
sys/conf/kern.mk
169

Don't know what version it was added in for GCC, but for LLVM it was LLVM 16 https://github.com/llvm/llvm-project/commit/7d7940fd7761e21b68f915e948389b87835d1304

Probably safe to not gate this on such a version check; even CHERI LLVM is LLVM 17