Skip to content

Commit e128976

Browse files
authored
src/mte_tag: clarify MTAG for code fetches and accesses crossing memory chunk (#65)
Signed-off-by: Deepak Gupta <[email protected]>
1 parent 73803c5 commit e128976

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/mte_tag.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,13 @@ locating tag is unaligned. Tag storage memory must be idempotent memory else
251251
[[TAG_CHECKS]]
252252
=== tag checks and privilege modes
253253

254+
If memory tagging is enabled for the execution environment, then memory tagging
255+
checks are performed by extracting `pointer_tag` from the input pointer and
256+
comparing `pointer_tag` against `mc_tag` associated with memory chunk for the
257+
respective address. If the effective address range of a load/store spans
258+
multiple memory chunks, the applicability of memory tag checks is determined
259+
separately for each memory chunk.
260+
254261
==== M-mode
255262
If memory tagging is enabled in M-mode (see <<MEM_TAG_EN>>), all regular loads
256263
and regular stores are subject to memory tagging checks.
@@ -319,8 +326,8 @@ following rules apply:
319326

320327
3. If both rule 2 and rule 1 are applying, rule 2 takes precedence.
321328

322-
4. An instruction crossing a page boundary with differing `MTAG` value,
323-
common denominator of `MTAG=0` applies for such instruction.
329+
4. An instruction crossing a page boundary with differing `MTAG` value, the
330+
instruction behaves as if it was fetched from a page with MTAG=0.
324331

325332
`MTAG` bit in page table entry remains a reserved bit if `XWR == 111` or
326333
`XWR == 010` and if set, will raise a page fault of original access type.

0 commit comments

Comments
 (0)