[PATCH v6 3/7] target/riscv: add sdext Debug Mode helpers