File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -3035,23 +3035,6 @@ static int riscv_mmu(struct target *target, int *enabled)
3035
3035
unsigned int xlen = riscv_xlen (target );
3036
3036
3037
3037
if (v_mode ) {
3038
- /* vsatp and hgatp registers are considered active for the
3039
- * purposes of the address-translation algorithm unless the
3040
- * effective privilege mode is U and hstatus.HU=0. */
3041
- if (effective_mode == PRV_U ) {
3042
- riscv_reg_t hstatus ;
3043
- if (riscv_reg_get (target , & hstatus , GDB_REGNO_HSTATUS ) != ERROR_OK ) {
3044
- LOG_TARGET_ERROR (target , "Failed to read hstatus register." );
3045
- return ERROR_FAIL ;
3046
- }
3047
-
3048
- if (get_field (hstatus , HSTATUS_HU ) == 0 )
3049
- /* In hypervisor mode regular satp translation
3050
- * doesn't happen. */
3051
- return ERROR_OK ;
3052
-
3053
- }
3054
-
3055
3038
riscv_reg_t vsatp ;
3056
3039
if (riscv_reg_get (target , & vsatp , GDB_REGNO_VSATP ) != ERROR_OK ) {
3057
3040
LOG_TARGET_ERROR (target , "Failed to read vsatp register; priv=0x%" PRIx64 ,
You can’t perform that action at this time.
0 commit comments