Skip to content

Commit 15f5892

Browse files
authored
src/mte_tag: define bit ranges as per priv spec convention (#51)
priv spec uses b <end_pos>:<start_pos> to define bit ranges in CSR, registers. Use the same convention to define MTE_MODE bit fields in *envcfg CSR. Assign bit field number to MY_ASYNC as well. Signed-off-by: Deepak Gupta <debug@rivosinc.com>
1 parent 5563fbb commit 15f5892

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/mte_tag.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ In M-mode, enable for memory tagging is controlled via `mseccfg` CSR.
378378
Enablement for privilege modes less than M-mode is controlled through
379379
`__x__envcfg` CSR. Zimte adds two bits termed as `MTE_MODE` to `__x__envcfg`
380380
CSR which controls enabling of memory tagging and `pointer_tag_width` for the
381-
next privilege mode. A `MT_ASYNC` bit is added to `__x__envcfg` CSR and if set,
382-
software check exceptions due to tag mismatches on store operations can be
383-
reported asynchronously (see <<ASYNC_SW_CHECK>>).
381+
next privilege mode. A `MT_ASYNC` bit (bit 36) is added to `__x__envcfg` CSR
382+
and if set, software check exceptions due to tag mismatches on store operations
383+
can be reported asynchronously (see <<ASYNC_SW_CHECK>>).
384384

385385
[[MEM_TAG_EN]]
386386
==== Memory tagging enable and pointer_tag_width
@@ -431,7 +431,7 @@ configuration
431431
], config:{lanes: 4, hspace:1024}}
432432
....
433433

434-
The Zimte extension adds the `MTE_MODE` field (bit 34:2) to `mseccfg`. When the
434+
The Zimte extension adds the `MTE_MODE` field (bit 35:34) to `mseccfg`. When the
435435
`MTE_MODE` field is set to `0b10` or `0b11`, memory tagging is enabled for
436436
M-mode.
437437

@@ -463,7 +463,7 @@ When `MTE_MODE` is `0b00`, the following rules apply to M-mode:
463463
], config:{lanes: 4, hspace:1024}}
464464
....
465465

466-
The Zimte extension adds the `MTE_MODE` field (bit 34:2) to `menvcfg`. When the
466+
The Zimte extension adds the `MTE_MODE` field (bit 35:34) to `menvcfg`. When the
467467
`MTE_MODE` field is set to `0b10` or `0b11`, memory tagging is enabled for
468468
HS/S-mode.
469469

@@ -491,7 +491,7 @@ When `MTE_MODE` is `0b00`, the following rules apply to HS/S-mode:
491491
], config:{lanes: 4, hspace:1024}}
492492
....
493493

494-
The Zimte extension adds the `MTE_MODE` field (bit 34:2) to `senvcfg`. When the
494+
The Zimte extension adds the `MTE_MODE` field (bit 35:34) to `senvcfg`. When the
495495
`MTE_MODE` field is set to `0b10` or `0b11`, memory tagging is enabled for
496496
VU/U-mode.
497497

@@ -523,7 +523,7 @@ When `MTE_MODE` is `0b00`, the following rules apply to VU/U-mode:
523523
], config:{lanes: 4, hspace:1024}}
524524
....
525525

526-
The Zimte extension adds the `MTE_MODE` field (bit 34:2) to `henvcfg`. When the
526+
The Zimte extension adds the `MTE_MODE` field (bit 35:34) to `henvcfg`. When the
527527
`MTE_MODE` field is set to `0b10` or `0b11`, memory tagging is enabled for
528528
VS-mode.
529529

0 commit comments

Comments
 (0)