summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2021-05-28 16:58:49 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2021-06-21 16:11:36 +0200
commit5ad17be9307907eadc844ed8cd8f036baffddd67 (patch)
tree759504f984ef845621846efa64b30f65a5eb513c /cpukit
parent93f96455957a943f1a4c17655a09612a93a34bf4 (diff)
downloadrtems-5ad17be9307907eadc844ed8cd8f036baffddd67.tar.bz2
cpu/armv7m: Avoid regions with negative size
Don't initialze regions that have a negative size (for example due to a wrong calculation). Update #4450
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/score/cpu/arm/include/rtems/score/armv7m.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/score/cpu/arm/include/rtems/score/armv7m.h b/cpukit/score/cpu/arm/include/rtems/score/armv7m.h
index 8f926e826a..a5eaaef418 100644
--- a/cpukit/score/cpu/arm/include/rtems/score/armv7m.h
+++ b/cpukit/score/cpu/arm/include/rtems/score/armv7m.h
@@ -656,7 +656,7 @@ static inline void _ARMV7M_MPU_Set_region(
RTEMS_OBFUSCATE_VARIABLE(end);
size = (uintptr_t) end - (uintptr_t) begin;
- if ( size > 0 ) {
+ if ( (uintptr_t) end > (uintptr_t) begin ) {
rbar = (uintptr_t) begin | region | ARMV7M_MPU_RBAR_VALID;
rasr |= _ARMV7M_MPU_Get_region_size(size);
} else {