Looks good to me.

> On Jun 4, 2021, at 03:47 , Christian Mauderer 
> <christian.maude...@embedded-brains.de> wrote:
> 
> Don't initialze regions that have a negative size (for example due to a
> wrong calculation).
> 
> Update #4450
> ---
> cpukit/score/cpu/arm/include/rtems/score/armv7m.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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 {
> --
> 2.26.2
> 
> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering

This email is delivered through the public internet using protocols subject to 
interception and tampering.

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to