Page MenuHomeFreeBSD

riscv: add custom T-HEAD dcache ops
Needs ReviewPublic

Authored by mhorne on Tue, Nov 5, 8:41 PM.
Tags
None
Referenced Files
F102083937: D47455.diff
Thu, Nov 7, 10:24 AM
F102044118: D47455.diff
Wed, Nov 6, 10:05 PM
F102021599: D47455.diff
Wed, Nov 6, 3:46 PM
Subscribers

Details

Reviewers
br
jrtc27
jhb
Group Reviewers
riscv
Summary

This is the first major errata we need to support in order to run on
current T-HEAD/XuanTie CPUs, e.g. the C906 or C910, found in several
existing RISC-V SBCs. With these custom dcache routines installed,
busdma can reliably communicate with devices which are not coherent
w.r.t. the CPU's data caches.

This patch introduces the first errata handling functions to identcpu.c,
and thus is forced to make some decisions about how this code is
structured. It will be amended with the changes that follow in the
series, yet I feel the final result is (unavoidably) somewhat clumsy. I
expect the CPU identification code will continue to evolve as more CPUs
and their errata are eventually supported.

T-HEAD specific code is added to a new file, and the custom instructions
can fortunately be enabled on a per-function basis.

Diff Detail

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