Page MenuHomeFreeBSD

riscv: dcache flush hooks
Needs ReviewPublic

Authored by mhorne on Tue, Nov 5, 8:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 3:16 PM
Unknown Object (File)
Fri, Nov 15, 9:20 AM
Unknown Object (File)
Fri, Nov 15, 8:29 AM
Unknown Object (File)
Tue, Nov 12, 12:04 AM
Unknown Object (File)
Sun, Nov 10, 1:40 PM
Unknown Object (File)
Sun, Nov 10, 10:54 AM
Unknown Object (File)
Sat, Nov 9, 3:52 PM
Unknown Object (File)
Sat, Nov 9, 10:42 AM
Subscribers

Details

Reviewers
br
jrtc27
jhb
Group Reviewers
riscv
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