Page MenuHomeFreeBSD

riscv: dcache flush hooks
ClosedPublic

Authored by mhorne on Nov 5 2024, 8:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 11:06 PM
Unknown Object (File)
Thu, Dec 12, 6:47 PM
Unknown Object (File)
Sun, Dec 8, 11:50 PM
Unknown Object (File)
Wed, Dec 4, 10:31 PM
Unknown Object (File)
Wed, Dec 4, 8:30 AM
Unknown Object (File)
Sun, Dec 1, 11:53 AM
Unknown Object (File)
Thu, Nov 28, 4:55 PM
Unknown Object (File)
Wed, Nov 27, 12:31 PM
Subscribers

Details

Summary

Cache management operations were, for a long time, unspecified by the
RISC-V ISA, and thus these functions have been no-ops. To cope, hardware
with non-coherent I/O has implemented custom cache flush mechanisms,
either in the form of custom instructions or special device registers.
Additionally, the RISC-V CMO extension is ratified and these official
instructions will start to show up in hardware eventually. Therefore, a
method is needed to select the dcache management routines at runtime.

Add a simple set of function hooks, as well as a routine to install them
and specify the minimum dcache line size. The first consumer will be the
non-standard cache management instructions for T-HEAD CPUs.

The unused I-cache variables and macros are removed.

Diff Detail

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

Event Timeline

mhorne requested review of this revision.Nov 5 2024, 8:41 PM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 25 2024, 9:09 PM
This revision was automatically updated to reflect the committed changes.