Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated MFENCE.VMA description #89

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions chapter3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,21 @@ respective sections in this specification.
The `MFENCE.SPA` fence instruction is used to synchronize updates to supervisor
domain access-permissions with current execution.
`MFENCE.SPA` is only valid in M-mode. If operand rs1≠x0, it
specifies a single physical address, and if rs2≠x0, it specifies
a single SDID. Executing a `MFENCE.SPA` guarantees that any previous stores
specifies a single physical address, and if rs2≠x0, it specifies a single SDID.
rsahita marked this conversation as resolved.
Show resolved Hide resolved
rsahita marked this conversation as resolved.
Show resolved Hide resolved
The behavior of `MFENCE.SPA` depends on rs1 and rs2 as follows:

* If rs1=x0 and rs2=x0, the fence orders all reads and writes to the MTT for
all supervisor domain address spaces.
* If rs1=x0 and rs2≠x0, the fence orders all reads and writes to the MTT for
the supervisor domain address space identified by the SDID in rs2.
* If rs1≠x0 and rs2=x0, the fence orders all reads and writes made to the MTT
that correspond to the physical address in rs1, for all supervisor domain
address spaces.
* If rs1≠x0 and rs2≠x0, the fence orders all reads and writes made to the MTT
that correspond to the physical address in rs1, for the supervisor domain
address space identified by the SDID in rs2.

Executing a `MFENCE.SPA` guarantees that any previous stores
already visible to the current hart are ordered before all implicit reads by
that hart done for supervisor domain access-permission structures for
non-M-mode instructions that follow the `MFENCE.SPA`.
Expand Down
Loading