Skip to content

CMOs (Cache Management Operations)

AndyGlew edited this page Jun 22, 2020 · 27 revisions

Recent

Soon: RISC-V Foundation Working Group TBD

Ri5-CMOs-proposal

History

This history section it is very much out of date, see instead that within Ri5-CMOs-proposal.

Wednesday, May 6, 2020-05-06:

Finished stuff? - to be converted to asciidoc / draft

Terminology

Briefly: this document, at this time, uses the term "CMO" (Cache Management Operation) generically for operations that have mandatory semantics (like cache flushes for purposes of software managed consistency or security timing channel mitigation) but also operations that have optional semantics (such as prefetch instructions as well as hints that a cache line is no longer needed). See Terminology for instructions that manage microarchitecture state such as caches, prefetchers and predictors.

Converging on Proposals

It is eventually necessary to converge on a single proposal. While this proposal may not be final, and different parts may be at different stages of maturity, the links here are to what I believe are the latest and greatest.

CMO Instruction Formats

The section and linked pages above discusses the CMO instruction formats

The page Actual CMO Operations discusses the actual cache management operations such as:

  • CLEAN: write back dirty data, but leave clean data behind in structure
  • FLUSH: writeback dirty data, and invalidate all data in structure
  • Invalidate Branch Predictors and Prefetchers: e.g. for timing channel mitigation

Actual proposal: Privilege for CMOs

Further discussion and/or rationale * I am frustrated that we are going around in circles with respect to modulation of CMOs - I hope the new subproposal Privilege for CMOs breaks us out of this nonproductivee spin loop * interception and modulation of CMOs

TBD: transcribed to wiki from the OneNote notebook and email where this was written up.

Overview:

  • most abstract: the operations a user wishes to perform
  • implementation dependent: the operations that HW provides. including, e.g., arbitrary numbers and levels of caches
  • intermediate level of abstraction between the above: abstract HW CMO operations
    • restricting levels of the memory hierarchy ...

Stuff along the way

Some of this stuff along the way will be rejected alternatives, nevertheless preserved, e.g. in case they need to be revived. Other of this stuff along the way constitutes rationales and explanations, which may be used, rewritten, or reorganized in support of the converged proposal.

TBD: eliminate obviously dated and obsolete stuff, which can always be obtained from the get history, or at least tag it as dated and obsolete with references to the up-to-date stuff. TBD: separate final or near final from historical stuff.

Overview of CMO operations - why needed, goals, etc.

Quick and Dirty Proposal for RISC-V CMOs

Clone this wiki locally