Skip to content

Commit

Permalink
fix init_Xsatp macro
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Jan 1, 2024
1 parent c955abf commit d70cc9d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions riscv-test-suite/env/arch_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,13 @@ init_\__MODE__\()edeleg:
init_\__MODE__\()satp:
.ifnc \__MODE__ , M // if S or VS mode **FIXME: fixed offset frm trapreg_sv?
LA( T4, rvtest_\__MODE__\()root_pg_tbl) // rplc xsatp w/ identity-mapped pg table
srli T4, T4, 12
#if (XLEN==32)
LI(T3, SATP32_MODE)
#else
LI(T3, (SATP64_MODE) & (SATP_MODE_SV39 << 60))
#endif
or T4, T4, T3
csrrw T4, CSR_XSATP, T4
SREG T4, xsatp_sv_off(T1)
.endif
Expand Down

0 comments on commit d70cc9d

Please sign in to comment.