Skip to content

Commit

Permalink
fix invalid address handling definition to cover all bytes in the ran…
Browse files Browse the repository at this point in the history
…ge (#327)

fixes #326
  • Loading branch information
tariqkurd-repo authored Jul 16, 2024
1 parent a9f25ae commit 9c58d5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/riscv-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1173,12 +1173,12 @@ compatible with RISC-V harts provided that <<pcc>> and <<ddc>> are set to the
The following procedure must be used while loading or storing to memory with a
capability A when the implementation supports invalid address optimizations:

. Calculate the effective address T of the memory access as required by the
. Calculate the effective address range R of the memory access as required by the
instruction's behavior.
. If T is invalid and A does not have infinite bounds (see
. If any byte in R is invalid and A does not have infinite bounds (see
xref:section_cap_encoding[xrefstyle=short]), then the instruction gives rise to
a CHERI fault; the _CHERI data_ fault is reported in the TYPE field and invalid
address violation is reported in the CAUSE field of <<mtval>> or <<stval>>.
. If T is invalid and A has infinite bounds (see xref:section_cap_encoding[xrefstyle=short]),
. If any byte in R is invalid and A has infinite bounds (see xref:section_cap_encoding[xrefstyle=short]),
the hart will raise an access fault or page fault as is usual in RISC-V.
. Otherwise T is valid and the instruction behaves as normal.
. Otherwise all bytes in R are valid and the instruction behaves as normal.

0 comments on commit 9c58d5c

Please sign in to comment.