All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: Fix defination of csr operations
@ 2020-01-19 10:52 jiangzhiying
  2020-01-20 23:08 ` Alistair Francis
  0 siblings, 1 reply; 3+ messages in thread
From: jiangzhiying @ 2020-01-19 10:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alistair.Francis, palmer, Ian Jiang, sagark, kbastian

From: Ian Jiang <ianjiang.ict@gmail.com>

There is a mistake in defining CSR operations for pmpcfg registers.
This patch fixes the bug.

Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
---
 target/riscv/csr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index da02f9f0b1..e07b5267be 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -948,7 +948,7 @@ static riscv_csr_operations csr_ops[CSR_TABLE_SIZE] = {
     [CSR_SATP] =                { smode, read_satp,        write_satp        },
 
     /* Physical Memory Protection */
-    [CSR_PMPCFG0  ... CSR_PMPADDR9] =  { pmp,   read_pmpcfg,  write_pmpcfg   },
+    [CSR_PMPCFG0  ... CSR_PMPCFG3] =  { pmp,   read_pmpcfg,  write_pmpcfg   },
     [CSR_PMPADDR0 ... CSR_PMPADDR15] = { pmp,   read_pmpaddr, write_pmpaddr  },
 
     /* Performance Counters */
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] riscv: Fix defination of csr operations
@ 2020-01-19  1:43 Ian Jiang
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Jiang @ 2020-01-19  1:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alistair Francis, Palmer Dabbelt, Sagar Karandikar, Bastian Koppelmann

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

There is a mistake in defining CSR operations for pmpcfg registers.
This patch fixes the bug.

Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
---
 target/riscv/csr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index da02f9f0b1..e07b5267be 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -948,7 +948,7 @@ static riscv_csr_operations csr_ops[CSR_TABLE_SIZE] = {
     [CSR_SATP] =                { smode, read_satp,        write_satp
   },

     /* Physical Memory Protection */
-    [CSR_PMPCFG0  ... CSR_PMPADDR9] =  { pmp,   read_pmpcfg,  write_pmpcfg
  },
+    [CSR_PMPCFG0  ... CSR_PMPCFG3] =  { pmp,   read_pmpcfg,  write_pmpcfg
  },
     [CSR_PMPADDR0 ... CSR_PMPADDR15] = { pmp,   read_pmpaddr,
write_pmpaddr  },

     /* Performance Counters */
-- 
2.17.1

[-- Attachment #2: Type: text/html, Size: 1130 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-20 23:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-19 10:52 [PATCH] riscv: Fix defination of csr operations jiangzhiying
2020-01-20 23:08 ` Alistair Francis
  -- strict thread matches above, loose matches on Subject: below --
2020-01-19  1:43 Ian Jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.