[rtems commit] bsps/arm: Adjust stacks for ARMv4

Sebastian Huber sebh at rtems.org
Thu Nov 20 13:53:25 UTC 2014


Module:    rtems
Branch:    master
Commit:    f0c564c5ae36da20b1543ae9db9e8fe9644a81c8
Changeset: http://git.rtems.org/rtems/commit/?id=f0c564c5ae36da20b1543ae9db9e8fe9644a81c8

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov 12 13:57:24 2014 +0100

bsps/arm: Adjust stacks for ARMv4

Reduce non-IRQ stacks to size zero.  All non-IRQ stacks overlap now the
IRQ stack.  This is all right since the SVC stack is used only during
startup and here interrupts are disabled.  The other exception stacks
lead to a system termination by default, so we can here also use the IRQ
stack since interrupts are disabled on exception entry.

---

 c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4 | 16 ++--------------
 c/src/lib/libbsp/arm/shared/startup/linkcmds.base  | 10 +++++-----
 2 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4 b/c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4
index 999fd32..33e419f 100644
--- a/c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4
+++ b/c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (c) 2010 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2010-2014 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Obere Lagerstr. 30
@@ -20,19 +20,7 @@
  * http://www.rtems.org/license/LICENSE.
  */
 
-bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 128;
-bsp_stack_abt_size = ALIGN (bsp_stack_abt_size, bsp_stack_align);
-
-bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 128;
-bsp_stack_fiq_size = ALIGN (bsp_stack_fiq_size, bsp_stack_align);
-
-bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 512;
+bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 1024;
 bsp_stack_irq_size = ALIGN (bsp_stack_irq_size, bsp_stack_align);
 
-bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 512;
-bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align);
-
-bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 128;
-bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align);
-
 INCLUDE linkcmds.base
diff --git a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
index 11e0175..268e88a 100644
--- a/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/arm/shared/startup/linkcmds.base
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (c) 2008-2013 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2008-2014 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Obere Lagerstr. 30
@@ -296,10 +296,6 @@ SECTIONS {
 
 		. = ALIGN (bsp_stack_align);
 
-		bsp_stack_fiq_begin = .;
-		. = . + bsp_stack_fiq_size;
-		bsp_stack_fiq_end = .;
-
 		bsp_stack_irq_begin = .;
 		. = . + bsp_stack_irq_size;
 		bsp_stack_irq_end = .;
@@ -308,6 +304,10 @@ SECTIONS {
 		. = . + bsp_stack_svc_size;
 		bsp_stack_svc_end = .;
 
+		bsp_stack_fiq_begin = .;
+		. = . + bsp_stack_fiq_size;
+		bsp_stack_fiq_end = .;
+
 		bsp_stack_und_begin = .;
 		. = . + bsp_stack_und_size;
 		bsp_stack_und_end = .;



More information about the vc mailing list