summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/nios2
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-15 15:55:28 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-15 15:55:28 +0000
commitdde1fedb0930f0c9ef02f7d76fdb086f3b22bd4a (patch)
tree8c58dab3ed7b9cf33cf720006ff0963dd9c3c151 /c/src/lib/libbsp/nios2
parent2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-dde1fedb0930f0c9ef02f7d76fdb086f3b22bd4a.tar.bz2
2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* startup/bspstart.c: Add capability for bootcard.c BSP Initialization Framework to ask the BSP where it has memory for the RTEMS Workspace and C Program Heap. These collectively are referred to as work area. If the BSP supports this, then it does not have to include code to split the available memory between the two areas. This reduces the amount of code in the BSP specific bspstart.c file. Additionally, the shared framework can initialize the C Library, call rtems_debug_enable(), and dirty the work area memory. Until most/all BSPs support this new capability, if the BSP supports this, it should call RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac. When the transition is complete, this autoconf macro can be removed.
Diffstat (limited to 'c/src/lib/libbsp/nios2')
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/ChangeLog14
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c26
2 files changed, 14 insertions, 26 deletions
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog
index 5917029153..9c46ec8721 100644
--- a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog
+++ b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog
@@ -1,3 +1,17 @@
+2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * startup/bspstart.c: Add capability for bootcard.c BSP Initialization
+ Framework to ask the BSP where it has memory for the RTEMS Workspace
+ and C Program Heap. These collectively are referred to as work area.
+ If the BSP supports this, then it does not have to include code to
+ split the available memory between the two areas. This reduces the
+ amount of code in the BSP specific bspstart.c file. Additionally, the
+ shared framework can initialize the C Library, call
+ rtems_debug_enable(), and dirty the work area memory. Until most/all
+ BSPs support this new capability, if the BSP supports this, it should
+ call RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac.
+ When the transition is complete, this autoconf macro can be removed.
+
2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am: Rework to avoid .rel files.
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c
index 04df095651..9abf8bab7e 100644
--- a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c
+++ b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c
@@ -54,9 +54,6 @@ extern char __alt_heap_start[];
void bsp_pretasking_hook(void)
{
unsigned long heapStart;
-#if 0
- unsigned long heapSize = (unsigned long)_HeapSize;
-#endif
unsigned long ramSpace;
heapStart = (unsigned long)Configuration.work_space_start
@@ -65,35 +62,12 @@ void bsp_pretasking_hook(void)
if (heapStart & (CPU_ALIGNMENT-1))
heapStart = (heapStart + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-#if 0
- ramSpace = (unsigned long)_RAMBase + (unsigned long)_RAMSize - heapStart;
-#else
-#if 0
- ramSpace = SRAM_0_BASE
- + (SRAM_0_SRAM_MEMORY_SIZE * SRAM_0_SRAM_MEMORY_UNITS)
- - heapStart;
-#else
ramSpace = RAM_BASE + RAM_BYTES - heapStart;
-#endif
-#endif
/* TODO */
ramSpace -= 16384; /* Space for initial stack, not to be zeroed */
-#if 0
- if (heapSize < 10)
- heapSize = ramSpace;
- else if (heapSize > ramSpace)
- rtems_fatal_error_occurred (('H'<<24) | ('E'<<16) | ('A'<<8) | 'P');
-
- bsp_libc_init((void *)heapStart, heapSize, 0);
-#else
bsp_libc_init((void *)heapStart, ramSpace, 0);
-#endif
-
-#ifdef RTEMS_DEBUG
- rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
-#endif
}
/*