aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2019-05-04 08:25:43 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2019-05-04 08:25:43 +0000
commit5666889d8b09fea72fe1aa51944c982acdacefef (patch)
tree0c2dca8bf51f6cc2880f5d903936ed29084c6121
parente34eff0df15d8a1e28463bccc1c75b337ace9fb5 (diff)
downloadChibiOS-5666889d8b09fea72fe1aa51944c982acdacefef.tar.gz
ChibiOS-5666889d8b09fea72fe1aa51944c982acdacefef.tar.bz2
ChibiOS-5666889d8b09fea72fe1aa51944c982acdacefef.zip
Fixed bug #1028.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12776 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
-rw-r--r--demos/STM32/RT-STM32F446RE-NUCLEO64/cfg/chconf.h2
-rw-r--r--os/common/ports/ARMCMx/chcore_v7m.c4
-rw-r--r--os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S2
-rw-r--r--os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s4
-rw-r--r--os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s4
-rw-r--r--readme.txt4
6 files changed, 13 insertions, 7 deletions
diff --git a/demos/STM32/RT-STM32F446RE-NUCLEO64/cfg/chconf.h b/demos/STM32/RT-STM32F446RE-NUCLEO64/cfg/chconf.h
index e50f15cce..e7aaf2b35 100644
--- a/demos/STM32/RT-STM32F446RE-NUCLEO64/cfg/chconf.h
+++ b/demos/STM32/RT-STM32F446RE-NUCLEO64/cfg/chconf.h
@@ -709,6 +709,8 @@
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
+#define PORT_ENABLE_GUARD_PAGES TRUE
+
#endif /* CHCONF_H */
/** @} */
diff --git a/os/common/ports/ARMCMx/chcore_v7m.c b/os/common/ports/ARMCMx/chcore_v7m.c
index 8fbe02591..237e91ec2 100644
--- a/os/common/ports/ARMCMx/chcore_v7m.c
+++ b/os/common/ports/ARMCMx/chcore_v7m.c
@@ -116,8 +116,8 @@ void PendSV_Handler(void) {
/* Module exported functions. */
/*===========================================================================*/
-#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || \
- (PORT_ENABLE_GUARD_PAGES == TRUE) || \
+#if ((CH_DBG_ENABLE_STACK_CHECK == TRUE) && \
+ (PORT_ENABLE_GUARD_PAGES == TRUE)) || \
defined(__DOXYGEN__)
/**
* @brief Setting up MPU region for the current thread.
diff --git a/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S b/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S
index 89e37583e..deae827c4 100644
--- a/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S
+++ b/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S
@@ -103,7 +103,7 @@ _port_switch:
.thumb_func
.globl _port_thread_start
_port_thread_start:
-#if CH_DBG_ENABLE_STACK_CHECK || PORT_ENABLE_GUARD_PAGES
+#if CH_DBG_ENABLE_STACK_CHECK && PORT_ENABLE_GUARD_PAGES
bl _port_set_region
#endif
#if CH_DBG_SYSTEM_STATE_CHECK
diff --git a/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s b/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s
index b0de85ce1..6385ac514 100644
--- a/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s
+++ b/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s
@@ -64,7 +64,7 @@ ICSR_PENDSVSET SET 0x10000000
EXTERN chThdExit
EXTERN chSysHalt
EXTERN chSchDoReschedule
-#if CH_DBG_ENABLE_STACK_CHECK || PORT_ENABLE_GUARD_PAGES
+#if CH_DBG_ENABLE_STACK_CHECK && PORT_ENABLE_GUARD_PAGES
EXTERN _port_set_region
#endif
#if CH_DBG_STATISTICS
@@ -110,7 +110,7 @@ _port_switch:
*/
PUBLIC _port_thread_start
_port_thread_start:
-#if CH_DBG_ENABLE_STACK_CHECK || PORT_ENABLE_GUARD_PAGES
+#if CH_DBG_ENABLE_STACK_CHECK && PORT_ENABLE_GUARD_PAGES
bl _port_set_region
#endif
#if CH_DBG_SYSTEM_STATE_CHECK
diff --git a/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s b/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
index 04d082ee5..abe6960b0 100644
--- a/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
+++ b/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
@@ -61,7 +61,7 @@ ICSR_PENDSVSET EQU 0x10000000
IMPORT chThdExit
IMPORT chSysHalt
IMPORT chSchDoReschedule
-#if CH_DBG_ENABLE_STACK_CHECK || PORT_ENABLE_GUARD_PAGES
+#if CH_DBG_ENABLE_STACK_CHECK && PORT_ENABLE_GUARD_PAGES
IMPORT _port_set_region
#endif
#if CH_DBG_STATISTICS
@@ -106,7 +106,7 @@ _port_switch PROC
*/
EXPORT _port_thread_start
_port_thread_start PROC
-#if CH_DBG_ENABLE_STACK_CHECK || PORT_ENABLE_GUARD_PAGES
+#if CH_DBG_ENABLE_STACK_CHECK && PORT_ENABLE_GUARD_PAGES
bl _port_set_region
#endif
#if CH_DBG_SYSTEM_STATE_CHECK
diff --git a/readme.txt b/readme.txt
index 6e41588a1..869e048c9 100644
--- a/readme.txt
+++ b/readme.txt
@@ -73,6 +73,10 @@
*** Releases and Change Log ***
*****************************************************************************
+*** 19.1.3 ***
+- FIX: Fixed MPU fix #1027 broke stack checking on Cortex-M devices without
+ MPU (bug #1028).
+
*** 19.1.2 ***
- NEW: Modified AES GCM function signatures.
- NEW: updates to MFS from trunk code.