You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/10/19 05:24:37 UTC

[incubator-nuttx] branch master updated: arch:xtens:mpu: modify acc and memtype to uint32_t

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

xiaoxiang 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 b513456  arch:xtens:mpu: modify acc and memtype to uint32_t
b513456 is described below

commit b5134565fa5bb04c56d73b310596b960bb2edc4e
Author: zhuyanlin <zh...@xiaomi.com>
AuthorDate: Mon Oct 18 19:38:58 2021 +0800

    arch:xtens:mpu: modify acc and memtype to uint32_t
    
    The uint8_t and uint16_t will overflow in MPU_ENTRY_AR marco.
    
    Signed-off-by: zhuyanlin <zh...@xiaomi.com>
---
 arch/xtensa/src/common/mpu.h        | 2 +-
 arch/xtensa/src/common/xtensa_mpu.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/xtensa/src/common/mpu.h b/arch/xtensa/src/common/mpu.h
index 75d1ae3..57aa7e9 100644
--- a/arch/xtensa/src/common/mpu.h
+++ b/arch/xtensa/src/common/mpu.h
@@ -210,7 +210,7 @@ void mpu_control(bool enable);
  ****************************************************************************/
 
 void mpu_configure_region(uintptr_t base, size_t size,
-            uint8_t acc, uint16_t memtype);
+                          uint32_t acc, uint32_t memtype);
 
 /****************************************************************************
  * Name: mpu_priv_stronglyordered
diff --git a/arch/xtensa/src/common/xtensa_mpu.c b/arch/xtensa/src/common/xtensa_mpu.c
index 39f2c85..4d88495 100644
--- a/arch/xtensa/src/common/xtensa_mpu.c
+++ b/arch/xtensa/src/common/xtensa_mpu.c
@@ -94,7 +94,7 @@ void mpu_control(bool enable)
  ****************************************************************************/
 
 void mpu_configure_region(uintptr_t base, size_t size,
-            uint8_t acc, uint16_t memtype)
+                          uint32_t acc, uint32_t memtype)
 {
   unsigned int region = mpu_allocregion();
   uint32_t at;