Skip to content

Commit

Permalink
Discuss DDC-base vs DDC-address offsetting (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterRugg authored Aug 4, 2023
1 parent d09f91c commit 8ae8a62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions chap-cheri-riscv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1199,8 +1199,12 @@ \subsection{\DDC{} and \PCC{} Relocation}
CHERI-RISC-V originally specified that legacy memory accesses using
integer pointers were relocated by \DDC{} and \PCC{} in addition to
being constrained. In this model, integer pointers were treated as
offsets relative to the base of \DDC{} and \PCC{} rather than
addresses.
offsets relative to the address of \DDC{} or base of \PCC{}\footnote{%
While offsetting with respect to \DDC{}'s address avoids unnecessary
alignment requirements, the base of \PCC{} must be used since its
address must change as the program runs, so cannot be used for
offsetting.}
rather than addresses.

The current version of CHERI-RISC-V does not relocate integer
pointers. However, it may be desirable to provide optional relocation
Expand Down
4 changes: 3 additions & 1 deletion chap-rationale.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,9 @@ \section{\DDC{} and \PCC{} Offsetting}
Originally, CHERI always treated integer pointers used for legacy
memory accesses as offsets. For example, loads and stores using an
integer pointer treated integer address as an offset relative to the
base of \DDC{}. Similarly, branch instructions which targeted an
base of \DDC{}\footnote{Some CHERI instantiations performed offsetting
with respect to the address of DDC, rather than the base.}.
Similarly, branch instructions which targeted an
absolute integer pointer set the offset of \PCC{} to the value of the
integer pointer.

Expand Down

0 comments on commit 8ae8a62

Please sign in to comment.