Page MenuHomeFreeBSD

sifive: handle sfence.vma errata
Needs ReviewPublic

Authored by mhorne on Thu, Aug 20, 3:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 21, 11:03 AM
Unknown Object (File)
Fri, Aug 21, 11:02 AM
Subscribers

Details

Reviewers
markj
bnovkov
jrtc27
br
Group Reviewers
riscv
Summary

CIP-1200 on the SiFive FU740 (HiFive Unmatched) states that an I-TLB
refill concurrent with an sfence.vma instruction may erroneously refill
stale mappings. The recommended workaround is to issue a global
sfence.vma in all cases.

Thus, add an errata variable and tweak the pmap functions to use the
global sfence in all cases.

The exact CPU identification IDs were verified against Linux.

Test Plan

Reference document: https://www.sifive.com/document-file/freedom-u740-c000-errata1

To be booted on Unmatched board; I have replaced everything except sfence_vma() with .unimp directive, to ensure that only the global fence is executed.

Diff Detail

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