Fixed bug Fixed bug 3064274.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2176 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
781b0b129c
commit
fb439b48b9
|
@ -263,17 +263,23 @@ struct intctx {
|
|||
* @param[in] ntp the thread to be switched in
|
||||
* @param[in] otp the thread to be switched out
|
||||
*/
|
||||
static INLINE void port_switch(Thread *ntp, Thread *otp) {
|
||||
register Thread *_ntp asm ("r0") = (ntp);
|
||||
register Thread *_otp asm ("r1") = (otp);
|
||||
#if CH_DBG_ENABLE_STACK_CHECK
|
||||
register char *sp asm ("sp");
|
||||
if (sp - sizeof(struct intctx) - sizeof(Thread) < (char *)_otp)
|
||||
asm volatile ("movs r0, #0 \n\t"
|
||||
"b chDbgPanic");
|
||||
#endif /* CH_DBG_ENABLE_STACK_CHECK */
|
||||
asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp) : "memory");
|
||||
#if !CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__)
|
||||
#define port_switch(ntp, otp) { \
|
||||
register Thread *_ntp asm ("r0") = (ntp); \
|
||||
register Thread *_otp asm ("r1") = (otp); \
|
||||
asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp) : "memory"); \
|
||||
}
|
||||
#else /* CH_DBG_ENABLE_STACK_CHECK */
|
||||
#define port_switch(ntp, otp) { \
|
||||
register Thread *_ntp asm ("r0") = (ntp); \
|
||||
register Thread *_otp asm ("r1") = (otp); \
|
||||
register struct intctx *r13 asm ("r13"); \
|
||||
if ((void *)(r13 - 1) < (void *)(_otp + 1)) \
|
||||
asm volatile ("movs r0, #0 \n\t" \
|
||||
"b chDbgPanic"); \
|
||||
asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp) : "memory"); \
|
||||
}
|
||||
#endif /* CH_DBG_ENABLE_STACK_CHECK */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -62,6 +62,8 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** 2.1.2 ***
|
||||
- FIX: Fixed broken CH_DBG_ENABLE_STACK_CHECK option in legacy CM3 port (bug
|
||||
3064274)(backported to 2.0.5).
|
||||
- FIX: Fixed CAN_USE_SLEEP_MODE setting (bug 3064204)(backported to 2.0.5).
|
||||
- FIX: Fixed potential issue with GCC reorganizing instructions around "asm
|
||||
volatile" statements (bug 3058731)(backported in 2.0.4).
|
||||
|
@ -83,7 +85,7 @@
|
|||
- NEW: Added board files for the Olimex STM32-H103.
|
||||
- NEW: New kernel APIs chSysGetIdleThread() and chThdGetTicks(), the new
|
||||
APIs are simple macros so there is no footprint overhead.
|
||||
- NEW: New I2C device driver model (no implementations yet).
|
||||
- NEW: New I2C device driver model (not complete and no implementations yet).
|
||||
- NEW: Added to the UART driver the capability to return the number of
|
||||
not yet transferred frames when stopping an operation.
|
||||
- NEW: Added more compile-time checks to the various STM32 device drivers.
|
||||
|
|
2
todo.txt
2
todo.txt
|
@ -13,11 +13,11 @@ Within 2.1.x (hopefully)
|
|||
"last byte transmitted (RS485)", simple implementation,
|
||||
verifiable.
|
||||
* Rework STM32 drivers to use friendly IRQ names and centralized DMA macros.
|
||||
* I-class functions for the ADC/PWM drivers.
|
||||
X Resist doing more changes and optimizations in the kernel, fixes only.
|
||||
X File System infrastructure.
|
||||
X General HAL improvements.
|
||||
X I2C device driver class support.
|
||||
X I-class functions for the ADC/PWM drivers.
|
||||
- Evaluate making SPI and CAN drivers callback-based.
|
||||
- MAC driver for STM32F105/STM32F107 (hardware missing).
|
||||
- Device drivers for STM8 (SPI, ADC, PWM, bring it on par with STM32).
|
||||
|
|
Loading…
Reference in New Issue