summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2011-12-12 19:31:48 +0000
committerGedare Bloom <gedare@rtems.org>2011-12-12 19:31:48 +0000
commita1a25aeb58b8690993f4d831934e371b356e1e6b (patch)
tree4f2fa681bd5575101947b7329d78428e583e8256
parent8bc6b663f159a65ab1f3826fa9c5e415c483a54d (diff)
2011-12-12 Gedare Bloom <gedare@rtems.org>
PR bsps/1989 * shared/start/start.S, shared/startup/linkcmds: Boot stack and heap space improvements.
-rw-r--r--c/src/lib/libbsp/sparc64/ChangeLog6
-rw-r--r--c/src/lib/libbsp/sparc64/shared/start/start.S30
-rw-r--r--c/src/lib/libbsp/sparc64/shared/startup/linkcmds15
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,5 +1,11 @@
2011-12-12 Gedare Bloom <gedare@rtems.org>
+ PR bsps/1989
+ * shared/start/start.S, shared/startup/linkcmds: Boot stack and heap
+ space improvements.
+
+2011-12-12 Gedare Bloom <gedare@rtems.org>
+
PR bsps/1988
* shared/start/start.S: Add _init and _fini to .init and .fini sections
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
}