summaryrefslogtreecommitdiff
path: root/ports_module/cortex-m7
diff options
context:
space:
mode:
Diffstat (limited to 'ports_module/cortex-m7')
-rw-r--r--ports_module/cortex-m7/ac5/inc/tx_port.h7
-rw-r--r--ports_module/cortex-m7/ac5/inc/txm_module_port.h6
-rw-r--r--ports_module/cortex-m7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c13
-rw-r--r--ports_module/cortex-m7/ac6/inc/tx_port.h9
-rw-r--r--ports_module/cortex-m7/ac6/inc/txm_module_port.h6
-rw-r--r--ports_module/cortex-m7/ac6/module_manager/src/txm_module_manager_mm_register_setup.c13
-rw-r--r--ports_module/cortex-m7/gnu/inc/tx_port.h9
-rw-r--r--ports_module/cortex-m7/gnu/inc/txm_module_port.h7
-rw-r--r--ports_module/cortex-m7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c13
-rw-r--r--ports_module/cortex-m7/iar/inc/txm_module_port.h6
-rw-r--r--ports_module/cortex-m7/iar/module_manager/src/txm_module_manager_mm_register_setup.c13
11 files changed, 85 insertions, 17 deletions
diff --git a/ports_module/cortex-m7/ac5/inc/tx_port.h b/ports_module/cortex-m7/ac5/inc/tx_port.h
index 0962e1d9..ee66d1fe 100644
--- a/ports_module/cortex-m7/ac5/inc/tx_port.h
+++ b/ports_module/cortex-m7/ac5/inc/tx_port.h
@@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* tx_port.h Cortex-M7/AC5 */
-/* 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 */
/* */
/**************************************************************************/
@@ -424,7 +427,7 @@ VOID _tx_thread_interrupt_restore(UIN
#else
-#define TX_INTERRUPT_SAVE_AREA unsigned int was_masked;
+#define TX_INTERRUPT_SAVE_AREA UINT was_masked;
#define TX_DISABLE was_masked = __disable_irq();
#define TX_RESTORE if (was_masked == 0) __enable_irq();
diff --git a/ports_module/cortex-m7/ac5/inc/txm_module_port.h b/ports_module/cortex-m7/ac5/inc/txm_module_port.h
index defc6a49..d876f338 100644
--- a/ports_module/cortex-m7/ac5/inc/txm_module_port.h
+++ b/ports_module/cortex-m7/ac5/inc/txm_module_port.h
@@ -107,11 +107,17 @@ The following extensions must also be defined in tx_port.h:
/* For the following 3 access control settings, change TEX and C, B, S (bits 21 through 16 of MPU_RASR)
* to reflect your system memory attributes (cache, shareable, memory type). */
/* Code region access control: privileged read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_CODE_ACCESS_CONTROL
#define TXM_MODULE_MPU_CODE_ACCESS_CONTROL 0x06070000
+#endif
/* Data region access control: execute never, read/write, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_DATA_ACCESS_CONTROL
#define TXM_MODULE_MPU_DATA_ACCESS_CONTROL 0x13070000
+#endif
/* Shared region access control: execute never, read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_SHARED_ACCESS_CONTROL
#define TXM_MODULE_MPU_SHARED_ACCESS_CONTROL 0x12070000
+#endif
/* Define constants specific to the tools the module can be built with for this particular modules port. */
diff --git a/ports_module/cortex-m7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex-m7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c
index 8afa4571..3dce9ab7 100644
--- a/ports_module/cortex-m7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex-m7/ac5/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -461,7 +461,7 @@ UINT i;
/* FUNCTION RELEASE */
/* */
/* _txm_module_manager_inside_data_check Cortex-M7/MPU/AC5 */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -493,7 +493,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)
@@ -504,6 +507,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-m7/ac6/inc/tx_port.h b/ports_module/cortex-m7/ac6/inc/tx_port.h
index 8c761ecf..57a43e48 100644
--- a/ports_module/cortex-m7/ac6/inc/tx_port.h
+++ b/ports_module/cortex-m7/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 */
/* */
/**************************************************************************/
@@ -476,7 +479,7 @@ unsigned int interrupt_save;
}
-#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save;
+#define TX_INTERRUPT_SAVE_AREA UINT interrupt_save;
#define TX_DISABLE interrupt_save = __disable_interrupts();
#define TX_RESTORE __restore_interrupts(interrupt_save);
@@ -489,7 +492,7 @@ unsigned int interrupt_save;
#else
-#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_control(TX_INT_DISABLE);
#define TX_RESTORE _tx_thread_interrupt_control(interrupt_save);
@@ -507,7 +510,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M7/AC6 Version 6.1 *";
+ "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M7/AC6 Version 6.1.6 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports_module/cortex-m7/ac6/inc/txm_module_port.h b/ports_module/cortex-m7/ac6/inc/txm_module_port.h
index bf4c3738..584134bb 100644
--- a/ports_module/cortex-m7/ac6/inc/txm_module_port.h
+++ b/ports_module/cortex-m7/ac6/inc/txm_module_port.h
@@ -101,11 +101,17 @@ The following extensions must also be defined in tx_port.h:
/* For the following 3 access control settings, change TEX and C, B, S (bits 21 through 16 of MPU_RASR)
* to reflect your system memory attributes (cache, shareable, memory type). */
/* Code region access control: privileged read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_CODE_ACCESS_CONTROL
#define TXM_MODULE_MPU_CODE_ACCESS_CONTROL 0x06070000
+#endif
/* Data region access control: execute never, read/write, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_DATA_ACCESS_CONTROL
#define TXM_MODULE_MPU_DATA_ACCESS_CONTROL 0x13070000
+#endif
/* Shared region access control: execute never, read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_SHARED_ACCESS_CONTROL
#define TXM_MODULE_MPU_SHARED_ACCESS_CONTROL 0x12070000
+#endif
/* Define constants specific to the tools the module can be built with for this particular modules port. */
diff --git a/ports_module/cortex-m7/ac6/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex-m7/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
index 7a4e63d3..359b628b 100644
--- a/ports_module/cortex-m7/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex-m7/ac6/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -461,7 +461,7 @@ UINT i;
/* FUNCTION RELEASE */
/* */
/* _txm_module_manager_inside_data_check Cortex-M7/MPU/AC6 */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -493,7 +493,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)
@@ -504,6 +507,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-m7/gnu/inc/tx_port.h b/ports_module/cortex-m7/gnu/inc/tx_port.h
index 78c15c58..d0e61b60 100644
--- a/ports_module/cortex-m7/gnu/inc/tx_port.h
+++ b/ports_module/cortex-m7/gnu/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 */
/* */
/**************************************************************************/
@@ -470,7 +473,7 @@ unsigned int interrupt_save;
}
-#define TX_INTERRUPT_SAVE_AREA unsigned int interrupt_save;
+#define TX_INTERRUPT_SAVE_AREA UINT interrupt_save;
#define TX_DISABLE interrupt_save = __disable_interrupts();
#define TX_RESTORE __restore_interrupts(interrupt_save);
@@ -483,7 +486,7 @@ unsigned int interrupt_save;
#else
-#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_control(TX_INT_DISABLE);
#define TX_RESTORE _tx_thread_interrupt_control(interrupt_save);
@@ -501,7 +504,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M7/GNU Version 6.1 *";
+ "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Cortex-M7/GNU Version 6.1.6 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports_module/cortex-m7/gnu/inc/txm_module_port.h b/ports_module/cortex-m7/gnu/inc/txm_module_port.h
index 16aacacd..4c883ddb 100644
--- a/ports_module/cortex-m7/gnu/inc/txm_module_port.h
+++ b/ports_module/cortex-m7/gnu/inc/txm_module_port.h
@@ -101,12 +101,17 @@ The following extensions must also be defined in tx_port.h:
/* For the following 3 access control settings, change TEX and C, B, S (bits 21 through 16 of MPU_RASR)
* to reflect your system memory attributes (cache, shareable, memory type). */
/* Code region access control: privileged read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_CODE_ACCESS_CONTROL
#define TXM_MODULE_MPU_CODE_ACCESS_CONTROL 0x06070000
+#endif
/* Data region access control: execute never, read/write, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_DATA_ACCESS_CONTROL
#define TXM_MODULE_MPU_DATA_ACCESS_CONTROL 0x13070000
+#endif
/* Shared region access control: execute never, read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_SHARED_ACCESS_CONTROL
#define TXM_MODULE_MPU_SHARED_ACCESS_CONTROL 0x12070000
-
+#endif
/* Define constants specific to the tools the module can be built with for this particular modules port. */
diff --git a/ports_module/cortex-m7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex-m7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
index ec85828e..da7187ba 100644
--- a/ports_module/cortex-m7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex-m7/gnu/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -461,7 +461,7 @@ UINT i;
/* FUNCTION RELEASE */
/* */
/* _txm_module_manager_inside_data_check Cortex-M7/MPU/GNU */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -493,7 +493,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)
@@ -504,6 +507,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-m7/iar/inc/txm_module_port.h b/ports_module/cortex-m7/iar/inc/txm_module_port.h
index 496dc591..7d56647e 100644
--- a/ports_module/cortex-m7/iar/inc/txm_module_port.h
+++ b/ports_module/cortex-m7/iar/inc/txm_module_port.h
@@ -103,11 +103,17 @@ The following extensions must also be defined in tx_port.h:
/* For the following 3 access control settings, change TEX and C, B, S (bits 21 through 16 of MPU_RASR)
* to reflect your system memory attributes (cache, shareable, memory type). */
/* Code region access control: privileged read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_CODE_ACCESS_CONTROL
#define TXM_MODULE_MPU_CODE_ACCESS_CONTROL 0x06070000
+#endif
/* Data region access control: execute never, read/write, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_DATA_ACCESS_CONTROL
#define TXM_MODULE_MPU_DATA_ACCESS_CONTROL 0x13070000
+#endif
/* Shared region access control: execute never, read-only, outer & inner write-back, normal memory, shareable. */
+#ifndef TXM_MODULE_MPU_SHARED_ACCESS_CONTROL
#define TXM_MODULE_MPU_SHARED_ACCESS_CONTROL 0x12070000
+#endif
/* Define constants specific to the tools the module can be built with for this particular modules port. */
diff --git a/ports_module/cortex-m7/iar/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex-m7/iar/module_manager/src/txm_module_manager_mm_register_setup.c
index db5d8de9..d4cb11d9 100644
--- a/ports_module/cortex-m7/iar/module_manager/src/txm_module_manager_mm_register_setup.c
+++ b/ports_module/cortex-m7/iar/module_manager/src/txm_module_manager_mm_register_setup.c
@@ -461,7 +461,7 @@ UINT i;
/* FUNCTION RELEASE */
/* */
/* _txm_module_manager_inside_data_check Cortex-M7/MPU/IAR */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -493,7 +493,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)
@@ -504,6 +507,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)))