summaryrefslogtreecommitdiff
path: root/ports_module/cortex-r4
diff options
context:
space:
mode:
authorYuxin Zhou <[email protected]>2021-04-03 01:03:21 +0000
committerYuxin Zhou <[email protected]>2021-04-03 01:03:21 +0000
commitb12bd44faaca46dbad4b06cb93a8669c6e36e02a (patch)
tree033f9c24f940f39d8c4b1b40fcd0d388e80bf317 /ports_module/cortex-r4
parent6ffaf848a06ce9dbf8948254ed806ed94ae58305 (diff)
Release 6.1.6v6.1.6_rel
Diffstat (limited to 'ports_module/cortex-r4')
-rw-r--r--ports_module/cortex-r4/ac6/inc/tx_port.h9
-rw-r--r--ports_module/cortex-r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c13
-rw-r--r--ports_module/cortex-r4/iar/inc/tx_port.h11
-rw-r--r--ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c13
4 files changed, 35 insertions, 11 deletions
diff --git a/ports_module/cortex-r4/ac6/inc/tx_port.h b/ports_module/cortex-r4/ac6/inc/tx_port.h
index 52efe1bf..5f480c29 100644
--- a/ports_module/cortex-r4/ac6/inc/tx_port.h
+++ b/ports_module/cortex-r4/ac6/inc/tx_port.h
@@ -48,6 +48,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
+/* macro definition, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
@@ -284,7 +287,7 @@ typedef unsigned short USHORT;
#ifndef __thumb
-#define TX_INTERRUPT_SAVE_AREA register unsigned int interrupt_save_disabled;
+#define TX_INTERRUPT_SAVE_AREA register UINT interrupt_save_disabled;
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -315,7 +318,7 @@ unsigned int _tx_thread_interrupt_disable(void);
unsigned int _tx_thread_interrupt_restore(UINT old_posture);
-#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save;
+#define TX_INTERRUPT_SAVE_AREA UINT interrupt_save;
#define TX_DISABLE interrupt_save = _tx_thread_interrupt_disable();
#define TX_RESTORE _tx_thread_interrupt_restore(interrupt_save);
@@ -343,7 +346,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-R4/AC6 Version 6.1 *";
+ "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-R4/AC6 Version 6.1.6 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports_module/cortex-r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex-r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
index 524f67b5..0ac981b1 100644
--- a/ports_module/cortex-r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex-r4/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -469,7 +469,7 @@ UINT i;
/* FUNCTION RELEASE */
/* */
/* _txm_module_manager_inside_data_check Cortex-R4/MPU/ARM */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -501,7 +501,10 @@ UINT i;
/* */
/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* 04-02-2021 Scott Larson Modified comments, added */
+/* check for overflow, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _txm_module_manager_inside_data_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE obj_ptr, UINT obj_size)
@@ -512,6 +515,12 @@ UINT num_shared_memory_mpu_entries;
ALIGN_TYPE shared_memory_address_start;
ALIGN_TYPE shared_memory_address_end;
+ /* Check for overflow. */
+ if ((obj_ptr) > ((obj_ptr) + (obj_size)))
+ {
+ return(TX_FALSE);
+ }
+
/* Check if the object is inside the module data. */
if ((obj_ptr >= (ALIGN_TYPE) module_instance -> txm_module_instance_data_start) &&
((obj_ptr + obj_size) <= ((ALIGN_TYPE) module_instance -> txm_module_instance_data_end + 1)))
diff --git a/ports_module/cortex-r4/iar/inc/tx_port.h b/ports_module/cortex-r4/iar/inc/tx_port.h
index 34a300e5..b653cd20 100644
--- a/ports_module/cortex-r4/iar/inc/tx_port.h
+++ b/ports_module/cortex-r4/iar/inc/tx_port.h
@@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* tx_port.h Cortex-R4/IAR */
-/* 6.1 */
+/* 6.1.6 */
/* */
/* AUTHOR */
/* */
@@ -48,6 +48,9 @@
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
+/* macro definition, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
@@ -347,9 +350,9 @@ __intrinsic void __set_CPSR( unsigned long );
#if (__VER__ < 8002000)
-#define TX_INTERRUPT_SAVE_AREA unsigned long interrupt_save;
+#define TX_INTERRUPT_SAVE_AREA ULONG interrupt_save;
#else
-#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save;
+#define TX_INTERRUPT_SAVE_AREA UINT interrupt_save;
#endif
#define TX_DISABLE interrupt_save = __get_CPSR(); \
@@ -392,7 +395,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-R4/IAR Version 6.1 *";
+ "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-R4/IAR Version 6.1.6 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c
index b2c21835..cc59721d 100644
--- a/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex-r4/iar/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -464,7 +464,7 @@ UINT i;
/* FUNCTION RELEASE */
/* */
/* _txm_module_manager_inside_data_check Cortex-R4/MPU/IAR */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -496,7 +496,10 @@ UINT i;
/* */
/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* 04-02-2021 Scott Larson Modified comments, added */
+/* check for overflow, *
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _txm_module_manager_inside_data_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE obj_ptr, UINT obj_size)
@@ -507,6 +510,12 @@ UINT num_shared_memory_mpu_entries;
ALIGN_TYPE shared_memory_address_start;
ALIGN_TYPE shared_memory_address_end;
+ /* Check for overflow. */
+ if ((obj_ptr) > ((obj_ptr) + (obj_size)))
+ {
+ return(TX_FALSE);
+ }
+
/* Check if the object is inside the module data. */
if ((obj_ptr >= (ALIGN_TYPE) module_instance -> txm_module_instance_data_start) &&
((obj_ptr + obj_size) <= ((ALIGN_TYPE) module_instance -> txm_module_instance_data_end + 1)))