You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/05/07 21:26:30 UTC

[incubator-nuttx] branch master updated: riscv/pmp: fix bug: PMP_CFG_FLAG_MASK makes pmp cfg fail.

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 96b0209366 riscv/pmp: fix bug: PMP_CFG_FLAG_MASK makes pmp cfg fail.
96b0209366 is described below

commit 96b020936626615ab83f97695f3f38bbdd62cb2b
Author: dytang <dy...@bouffalolab.com>
AuthorDate: Sat May 7 15:55:04 2022 +0800

    riscv/pmp: fix bug: PMP_CFG_FLAG_MASK makes pmp cfg fail.
---
 arch/risc-v/src/common/riscv_pmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/risc-v/src/common/riscv_pmp.c b/arch/risc-v/src/common/riscv_pmp.c
index e9786aa9c4..0e32f1be53 100644
--- a/arch/risc-v/src/common/riscv_pmp.c
+++ b/arch/risc-v/src/common/riscv_pmp.c
@@ -58,7 +58,7 @@
 #define BLOCK_ALIGN_MASK        (MIN_BLOCK_SIZE - 1)
 
 #define PMP_CFG_BITS_CNT        (8)
-#define PMP_CFG_FLAG_MASK       (0xFF)
+#define PMP_CFG_FLAG_MASK       ((uintptr_t)0xFF)
 
 #define PMP_CFG_CNT_IN_REG      (PMP_XLEN / PMP_CFG_BITS_CNT)