[PATCH 1/2] arm: Fix PMSA region mapping with 0x0 end address

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 3 06:38:04 UTC 2022


A section may span up to the end of the address range.  In this case the
end address is zero.  Use the base address to check if a region should
be before another region.
---
 cpukit/score/cpu/arm/aarch32-psma-init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/score/cpu/arm/aarch32-psma-init.c b/cpukit/score/cpu/arm/aarch32-psma-init.c
index 3e15e2de8e..9edbb517fc 100644
--- a/cpukit/score/cpu/arm/aarch32-psma-init.c
+++ b/cpukit/score/cpu/arm/aarch32-psma-init.c
@@ -155,7 +155,7 @@ size_t _AArch32_PMSA_Map_sections_to_regions(
         }
       }
 
-      if ( end <= region_base ) {
+      if ( base <= region_base ) {
         size_t i;
 
         if ( region_used >= region_max ) {
-- 
2.35.3



More information about the devel mailing list