You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/10/21 19:23:55 UTC

[incubator-nuttx] branch master updated (16b6d365e9 -> ec3805721c)

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

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


    from 16b6d365e9 fs/procfs: check task status before get group info
     new d4cbb4f5b8 armv8-m: Fix MPU Attribute Indirection reg offsets
     new ec3805721c armv8-m: Fix MPU Region Limit Address config

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/armv8-m/arm_mpu.c | 2 +-
 arch/arm/src/armv8-m/mpu.h     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)


[incubator-nuttx] 01/02: armv8-m: Fix MPU Attribute Indirection reg offsets

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d4cbb4f5b886a6c69d1edc925a09d4a8a3716f51
Author: Michael Jung <mi...@secore.ly>
AuthorDate: Thu Oct 20 12:57:51 2022 +0200

    armv8-m: Fix MPU Attribute Indirection reg offsets
    
    Both MPU_MAIR0 and MPU_MAIR1 were off by 0x10.
    
    Signed-off-by: Michael Jung <mi...@secore.ly>
---
 arch/arm/src/armv8-m/mpu.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/armv8-m/mpu.h b/arch/arm/src/armv8-m/mpu.h
index 3feb412492..b6bf1e95d7 100644
--- a/arch/arm/src/armv8-m/mpu.h
+++ b/arch/arm/src/armv8-m/mpu.h
@@ -59,9 +59,9 @@
 #define MPU_RBAR_A3_OFFSET      0x0024
 #define MPU_RLAR_A3_OFFSET      0x0028
 
-#define MPU_MAIR_OFFSET(n)      (0x0040 + 4 * ((n) >> 2))
-#define MPU_MAIR0_OFFSET        0x0040 /* MPU Memory Attribute Indirection Register 0 */
-#define MPU_MAIR1_OFFSET        0x0044 /* MPU Memory Attribute Indirection Register 1 */
+#define MPU_MAIR_OFFSET(n)      (0x0030 + 4 * ((n) >> 2))
+#define MPU_MAIR0_OFFSET        0x0030 /* MPU Memory Attribute Indirection Register 0 */
+#define MPU_MAIR1_OFFSET        0x0034 /* MPU Memory Attribute Indirection Register 1 */
 
 /* MPU Register Addresses */
 


[incubator-nuttx] 02/02: armv8-m: Fix MPU Region Limit Address config

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ec3805721ca4d519e49e3ebb03bf7914e3f9d7a6
Author: Michael Jung <mi...@secore.ly>
AuthorDate: Thu Oct 20 12:55:42 2022 +0200

    armv8-m: Fix MPU Region Limit Address config
    
    On armv8-m the MPU region limits are inclusive.  Thus, we must substract
    one byte of size from (base + limit).
    
    Signed-off-by: Michael Jung <mi...@secore.ly>
---
 arch/arm/src/armv8-m/arm_mpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/armv8-m/arm_mpu.c b/arch/arm/src/armv8-m/arm_mpu.c
index 50ae4ff63c..327b3a030c 100644
--- a/arch/arm/src/armv8-m/arm_mpu.c
+++ b/arch/arm/src/armv8-m/arm_mpu.c
@@ -163,7 +163,7 @@ void mpu_configure_region(uintptr_t base, size_t size,
    * aligns with the size of the selected region."
    */
 
-  limit = (base + size) & MPU_RLAR_LIMIT_MASK;
+  limit = (base + size - 1) & MPU_RLAR_LIMIT_MASK;
   base &= MPU_RBAR_BASE_MASK;
 
   /* Select the region */