From f0c564c5ae36da20b1543ae9db9e8fe9644a81c8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 12 Nov 2014 13:57:24 +0100 Subject: 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(-) (limited to 'c/src/lib/libbsp/arm/shared') diff --git a/c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4 b/c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4 index 999fd3280f..33e419f5be 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 11e01757df..268e88a858 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 = .; -- cgit v1.2.3