Merged in masayuki2009/nuttx.nuttx/fix_lc823450_start (pull request #793)
Fix lc823450 start * arch/arm/src/lc823450: Use CONFIG_STACK_COLORATION instead of CONFIG_DEBUG_STACK Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> * arch/arm/src/lc823450: Fix go_os_start() in lc823450_start.c I found a bug in go_os_start() that it returns immediately because it does not compare r1 to zero. This commit fixes this bug. Also, this commit fixes its description. Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
parent
6f418dd9f3
commit
c5c8c3aab9
@ -78,7 +78,7 @@ ifeq ($(CONFIG_ARCH_MEMMOVE),y)
|
||||
CMN_CSRCS += up_memmove.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
||||
ifeq ($(CONFIG_STACK_COLORATION),y)
|
||||
CMN_CSRCS += up_checkstack.c
|
||||
endif
|
||||
|
||||
|
@ -125,7 +125,7 @@ extern uint32_t _stext_sram, _etext_sram, _ftext, _svect;
|
||||
* Private Function prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_STACK
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
static void go_os_start(void *pv, unsigned int nbytes)
|
||||
__attribute__ ((naked, no_instrument_function, noreturn));
|
||||
#endif
|
||||
@ -152,11 +152,11 @@ static void go_os_start(void *pv, unsigned int nbytes)
|
||||
* Name: go_os_start
|
||||
*
|
||||
* Description:
|
||||
* Set the IDLE stack to the
|
||||
* Set the IDLE stack to the coloration value and jump into os_start()
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_STACK
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
static void go_os_start(void *pv, unsigned int nbytes)
|
||||
{
|
||||
/* Set the IDLE stack to the stack coloration value then jump to
|
||||
@ -169,6 +169,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"\tmov r1, r1, lsr #2\n" /* R1 = nwords = nbytes >> 2 */
|
||||
"\tcmp r1, #0\n" /* Check (nwords == 0) */
|
||||
"\tbeq 2f\n" /* (should not happen) */
|
||||
|
||||
"\tbic r0, r0, #3\n" /* R0 = Aligned stackptr */
|
||||
@ -405,7 +406,7 @@ void __start(void)
|
||||
|
||||
CURRENT_REGS = NULL;
|
||||
|
||||
#ifdef CONFIG_DEBUG_STACK
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
/* Set the IDLE stack to the coloration value and jump into os_start() */
|
||||
|
||||
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user