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)
30353035 unsigned int xlen = riscv_xlen (target );
30363036
30373037 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-
30553038 riscv_reg_t vsatp ;
30563039 if (riscv_reg_get (target , & vsatp , GDB_REGNO_VSATP ) != ERROR_OK ) {
30573040 LOG_TARGET_ERROR (target , "Failed to read vsatp register; priv=0x%" PRIx64 ,
You can’t perform that action at this time.
0 commit comments