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

src/mte_vatag: define lowest and highest virtual addresses for U and S #13

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Changes from all 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
18 changes: 18 additions & 0 deletions src/mte_vatag.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,21 @@ spanning VITT range. VITT range is defined as below
tag_memory_region_end = mc_tag_va(HIGHEST_VADDR_CURR_PRIV)
LOWEST_VADDR_CURR_PRIV: Lowest virtual address in current privilege.
HIGHEST_VADDR_CURR_PRIV: Highest virtual address in current privilege.

.Lowest and highest virtual addresses
[width=100%]
[%header, cols="^4,^12"]
|===
|Privilege level | LOWEST_VADDR_CURR_PRIV | HIGHEST_VADDR_CURR_PRIV
| U | 0 | 2 ^ (VADDR_BITS) - 1
| S / HS / VS | 2 ^ (VADDR_BITS) | 2 ^ (VADDR_BITS) OR (2 ^ (VADDR_BITS) - 1)
| M | `Impl. defined` | `Impl. defined`
|===

VADDR_BITS is virtual addressing bits. VADDR_BITS can be 39, 48 or 57
depending on Sv39, Sv48 or Sv57 virtual addressing mode in `satp` CSR.

`Svatag` assumes an even split in address space between user and supervisor
with user address space spanning from zero to maxium positive address while
supervisor address space spanning from minimum negative value to maximum
negative value.
Loading