You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/05/03 11:12:09 UTC

[incubator-nuttx] branch master updated: armv7-a: smp: fix stack coloration

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ba891c1b0 armv7-a: smp: fix stack coloration
0ba891c1b0 is described below

commit 0ba891c1b044d74656a6aa5a7d57e82a92bd2725
Author: Oki Minabe <mi...@gmail.com>
AuthorDate: Tue May 3 17:29:50 2022 +0900

    armv7-a: smp: fix stack coloration
    
    Summary:
    - The stack pointer is subtracted to alloc xcptcontext area
      in the __cpu?_start block
    - Fix the stack coloration overrun to the previous cpu's xcpt area
    
    Impact:
    - armv7-a's smp configuration
    
    Testing:
    - smp and ostest on sabre-6quad:smp w/ qemu
    
    Signed-off-by: Oki Minabe <mi...@gmail.com>
---
 arch/arm/src/armv7-a/arm_cpuhead.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/armv7-a/arm_cpuhead.S b/arch/arm/src/armv7-a/arm_cpuhead.S
index 58e7224765..9d71005a76 100644
--- a/arch/arm/src/armv7-a/arm_cpuhead.S
+++ b/arch/arm/src/armv7-a/arm_cpuhead.S
@@ -441,7 +441,7 @@ __cpu3_start:
 #ifdef CONFIG_STACK_COLORATION
 	.type	.Lstkinit, %object
 .Lstkinit:
-	.long	SMP_STACK_WORDS
+	.long	SMP_STACK_WORDS - (XCPTCONTEXT_SIZE / 4)
 	.long	STACK_COLOR				/* Stack coloration word */
 	.size	.Lstkinit, . -.Lstkinit
 #endif