From a1a25aeb58b8690993f4d831934e371b356e1e6b Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Mon, 12 Dec 2011 19:31:48 +0000 Subject: 2011-12-12 Gedare Bloom PR bsps/1989 * shared/start/start.S, shared/startup/linkcmds: Boot stack and heap space improvements. --- c/src/lib/libbsp/sparc64/ChangeLog | 6 +++++ c/src/lib/libbsp/sparc64/shared/start/start.S | 30 +++++++----------------- c/src/lib/libbsp/sparc64/shared/startup/linkcmds | 15 ++++-------- 3 files changed, 19 insertions(+), 32 deletions(-) diff --git a/c/src/lib/libbsp/sparc64/ChangeLog b/c/src/lib/libbsp/sparc64/ChangeLog index 7a53002a90..ff7ecc7ce2 100644 --- a/c/src/lib/libbsp/sparc64/ChangeLog +++ b/c/src/lib/libbsp/sparc64/ChangeLog @@ -1,3 +1,9 @@ +2011-12-12 Gedare Bloom + + PR bsps/1989 + * shared/start/start.S, shared/startup/linkcmds: Boot stack and heap + space improvements. + 2011-12-12 Gedare Bloom PR bsps/1988 diff --git a/c/src/lib/libbsp/sparc64/shared/start/start.S b/c/src/lib/libbsp/sparc64/shared/start/start.S index d271714bb1..69186e81b5 100644 --- a/c/src/lib/libbsp/sparc64/shared/start/start.S +++ b/c/src/lib/libbsp/sparc64/shared/start/start.S @@ -53,20 +53,6 @@ .register %g6, #scratch .register %g7, #scratch -#if 0 -#define _BSP_DEBUG -#endif - -#if _BSP_DEBUG -/* - * This is for debug and script support to identify RTEMS app termination - */ -.section .data - .align 8 -_end_token_string: - .asciz "END_TOKEN\n" -#endif - .section BOOTSTRAP, "ax" PUBLIC(_start) @@ -148,20 +134,20 @@ setstack: call SYM(boot_card) sub %sp, 0x60, %sp ! make room on stack (necessary?) -#if _BSP_DEBUG - /* execution returns here when RTEMS terminates */ - sethi %hi(_end_token_string), %g1 - add %g1, %lo(_end_token_string), %o0 - call SYM(printk) - nop -#endif - call SYM(halt) nop halted: nop b SYM(halted) +.section BOOTSTRAP + .align CPU_ALIGNMENT + .space 32768 - CPU_MINIMUM_STACK_FRAME_SIZE ! 32K boot stack grows down + .global StackStart + StackStart: + .space CPU_MINIMUM_STACK_FRAME_SIZE ! initial stack frame + +.section BOOTSTRAP .align CPU_ALIGNMENT param_space: .space 8 diff --git a/c/src/lib/libbsp/sparc64/shared/startup/linkcmds b/c/src/lib/libbsp/sparc64/shared/startup/linkcmds index 0a05be1e2e..6269940c2f 100644 --- a/c/src/lib/libbsp/sparc64/shared/startup/linkcmds +++ b/c/src/lib/libbsp/sparc64/shared/startup/linkcmds @@ -14,8 +14,7 @@ */ RamBase = DEFINED(RamBase) ? RamBase : 0x0; RamSize = DEFINED(RamSize) ? RamSize : 12M; -HeapSize = DEFINED(HeapSize) ? HeapSize : 1M; -StackSize = DEFINED(StackSize) ? StackSize : 1M; +HeapSize = DEFINED(HeapSize) ? HeapSize : 2M; RAM_END = RamBase + RamSize; @@ -24,10 +23,9 @@ OUTPUT_FORMAT("elf64-sparc") ENTRY(start) MEMORY - { - ram : ORIGIN = 0x0, LENGTH = 12M - } - +{ + ram : ORIGIN = 0x0, LENGTH = 12M +} SECTIONS { @@ -151,7 +149,7 @@ SECTIONS . = ALIGN (16); _endtext = . ; _etext = . ; - } > ram + } > ram .data : AT (ADDR (.text) + SIZEOF (.text)) { @@ -196,9 +194,6 @@ SECTIONS . += HeapSize; PROVIDE (HeapBase = .); . += HeapSize; - . += StackSize; - PROVIDE (__stack = .); - PROVIDE (StackStart = .); } > ram } -- cgit v1.2.3