Skip to contentSkip to conversation

riscv: Fix defination of TW bits in mstatus CSR

PATCH In review Ian Jiang 2 participants 2 messages Jan 20, 2020 – Jan 21, 2020 RISC-V

lore
Share & tools
lore

Ian Jiang

author
#0 lore raw

PATCH 1/1 riscv: Fix defination of TW bits in mstatus CSR

The origin defination of TW bits in mstatus is not correct. This patch fixes the problem.

---
 target/riscv/cpu_bits.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/cpu_bits.h +1 -1
index e99834856c..fb2e0b340e 100644
@@ -349,7 +349,7 @@
 #define MSTATUS_MXR         0x00080000
 #define MSTATUS_VM          0x1F000000 /* until: priv-1.9.1 */
 #define MSTATUS_TVM         0x00100000 /* since: priv-1.10 */
-#define MSTATUS_TW          0x20000000 /* since: priv-1.10 */
+#define MSTATUS_TW          0x00200000 /* since: priv-1.10 */
 #define MSTATUS_TSR         0x40000000 /* since: priv-1.10 */
 #define MSTATUS_MTL         0x4000000000ULL
 #define MSTATUS_MPV         0x8000000000ULL
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Ian Jiang

The origin defination of TW bits in mstatus is not correct. This patch fixes the problem.

Alistair

Quoted 21 lines
---
 target/riscv/cpu_bits.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/cpu_bits.h +1 -2
index e99834856c..fb2e0b340e 100644
@@ -349,7 +349,7 @@
 #define MSTATUS_MXR         0x00080000
 #define MSTATUS_VM          0x1F000000 /* until: priv-1.9.1 */
 #define MSTATUS_TVM         0x00100000 /* since: priv-1.10 */
-#define MSTATUS_TW          0x20000000 /* since: priv-1.10 */
+#define MSTATUS_TW          0x00200000 /* since: priv-1.10 */
 #define MSTATUS_TSR         0x40000000 /* since: priv-1.10 */
 #define MSTATUS_MTL         0x4000000000ULL
 #define MSTATUS_MPV         0x8000000000ULL
--

2.17.1