diff options
| author | Yuxin Zhou <[email protected]> | 2021-04-03 01:03:21 +0000 |
|---|---|---|
| committer | Yuxin Zhou <[email protected]> | 2021-04-03 01:03:21 +0000 |
| commit | b12bd44faaca46dbad4b06cb93a8669c6e36e02a (patch) | |
| tree | 033f9c24f940f39d8c4b1b40fcd0d388e80bf317 /ports_module/cortex_m33/gnu | |
| parent | 6ffaf848a06ce9dbf8948254ed806ed94ae58305 (diff) | |
Release 6.1.6v6.1.6_rel
Diffstat (limited to 'ports_module/cortex_m33/gnu')
3 files changed, 24 insertions, 8 deletions
diff --git a/ports_module/cortex_m33/gnu/inc/tx_port.h b/ports_module/cortex_m33/gnu/inc/tx_port.h index 54b785b9..3b336daa 100644 --- a/ports_module/cortex_m33/gnu/inc/tx_port.h +++ b/ports_module/cortex_m33/gnu/inc/tx_port.h @@ -648,7 +648,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_interrupt(); #define TX_RESTORE __restore_interrupt(interrupt_save); diff --git a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S index 179c80b8..f5c6224f 100644 --- a/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S +++ b/ports_module/cortex_m33/gnu/module_manager/src/tx_thread_schedule.S @@ -29,7 +29,7 @@ /* FUNCTION RELEASE */ /* */ /* _tx_thread_schedule Cortex-M33/MPU/GNU */ -/* 6.1.5 */ +/* 6.1.6 */ /* AUTHOR */ /* */ /* Scott Larson, Microsoft Corporation */ @@ -62,6 +62,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 03-02-2021 Scott Larson Initial Version 6.1.5 */ +/* 04-02-2021 Scott Larson Modified comments and fixed */ +/* MPU region configuration, */ +/* resulting in version 6.1.6 */ /* */ /**************************************************************************/ // VOID _tx_thread_schedule(VOID) @@ -382,6 +385,8 @@ _skip_secure_restore: LDR r1, =0xE000ED9C // Build address of MPU base register // Use alias registers to quickly load MPU + LDR r2, =0xE000ED98 // Get region register + STR r3, [r2] // Set region to 0 ADD r0, r0, #0x64 // Build address of MPU register start in thread control block LDM r0!, {r2-r9} // Load first four MPU regions STM r1, {r2-r9} // Store first four MPU regions diff --git a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c index 3670dabb..4bd99c30 100644 --- a/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c +++ b/ports_module/cortex_m33/gnu/module_manager/src/txm_module_manager_mm_register_setup.c @@ -29,8 +29,8 @@ /* */ /* FUNCTION RELEASE */ /* */ -/* _txm_module_manager_mm_register_setup Cortex-M33/MPU */ -/* 6.1.5 */ +/* _txm_module_manager_mm_register_setup Cortex-M33/Generic */ +/* 6.1.6 */ /* AUTHOR */ /* */ /* Scott Larson, Microsoft Corporation */ @@ -60,7 +60,10 @@ /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 03-02-2021 Scott Larson Initial Version 6.1.5 */ +/* 12-31-2020 Scott Larson Initial Version 6.1.3 */ +/* 04-02-2021 Scott Larson Modified comments and check */ +/* for overflow, */ +/* resulting 6.1.6 */ /* */ /**************************************************************************/ VOID _txm_module_manager_mm_register_setup(TXM_MODULE_INSTANCE *module_instance) @@ -120,8 +123,8 @@ ULONG callback_stack_size; /* */ /* FUNCTION RELEASE */ /* */ -/* _txm_module_manager_inside_data_check Cortex-M33/MPU */ -/* 6.1.5 */ +/* _txm_module_manager_inside_data_check Cortex-M33/Generic */ +/* 6.1.6 */ /* AUTHOR */ /* */ /* Scott Larson, Microsoft Corporation */ @@ -153,7 +156,9 @@ ULONG callback_stack_size; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 03-02-2021 Scott Larson Initial Version 6.1.5 */ +/* 12-31-2020 Scott Larson Initial Version 6.1.3 */ +/* 04-02-2021 Scott Larson Modified comments, */ +/* 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) @@ -164,6 +169,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))) |
