summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-15 22:05:08 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-15 22:05:08 +0000
commit704e37143eda4b462743d6b26a3042e6584f38e9 (patch)
tree2c1cc4fdb4d82de144aaa866e1747159eac7f574
parent2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-704e37143eda4b462743d6b26a3042e6584f38e9.tar.bz2
2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, include/bsp.h, include/bspopts.h.in, startup/bspstart.c: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization.
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/ChangeLog6
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/Makefile.am2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/configure.ac2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h10
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/include/bspopts.h.in8
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c39
6 files changed, 26 insertions, 41 deletions
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/ChangeLog b/c/src/lib/libbsp/powerpc/mvme3100/ChangeLog
index a33a5cb96b..479cf83458 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/mvme3100/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-15 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, configure.ac, include/bsp.h, include/bspopts.h.in,
+ startup/bspstart.c: Add use of bsp_get_work_area() in its own file
+ and rely on BSP Framework to perform more initialization.
+
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* startup/bspstart.c: Review of all bsp_cleanup() implementations. In
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am b/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
index 7f0c66475d..9c82f028c5 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
@@ -57,7 +57,7 @@ build_date.c::
echo 'const char *BSP_build_date="'`date`'";' > $@
startup_SOURCES = startup/bspstart.c build_date.c \
- startup/misc.c \
+ startup/misc.c ../../powerpc/shared/startup/bspgetworkarea.c \
../../powerpc/shared/startup/pretaskinghook.c \
../../powerpc/shared/startup/zerobss.c \
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
index f62e62f1bd..6ceb46881a 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
+++ b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac
@@ -35,6 +35,8 @@ RTEMS_BSPOPTS_HELP([PPC_USE_DATA_CACHE],
of PowerPC 603e revisions and emulator versions.
The BSP actually contains the call that enables this.])
+RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
+
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
index 50bf2d480c..db672f4de9 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
@@ -28,6 +28,7 @@
* - Interrupt stack space is not minimum if defined.
*/
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
+#define CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
#define BSP_INTERRUPT_STACK_SIZE (16 * 1024)
@@ -276,10 +277,6 @@ BSP_clrLEDs(uint8_t mask);
*/
extern unsigned int BSP_mem_size;
/*
- * Start of the heap
- */
-extern unsigned int BSP_heap_start;
-/*
* PCI Bus Frequency
*/
extern unsigned int BSP_bus_frequency;
@@ -327,6 +324,11 @@ rtems_tsec_attach(struct rtems_bsdnet_ifconfig *ifcfg, int attaching);
#define RTEMS_BSP_NETWORK_DRIVER_NAME "tse1"
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_tsec_attach
+/*
+ * system init stack and soft ir stack size
+ */
+#define BSP_INIT_STACK_SIZE 0x1000
+
#ifdef __cplusplus
}
#endif
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/include/bspopts.h.in b/c/src/lib/libbsp/powerpc/mvme3100/include/bspopts.h.in
index 2678efef45..735eb7495f 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/include/bspopts.h.in
+++ b/c/src/lib/libbsp/powerpc/mvme3100/include/bspopts.h.in
@@ -1,5 +1,13 @@
/* include/bspopts.h.in. Generated from configure.ac by autoheader. */
+/* BSP uses shared logic in bootcard.c */
+#undef BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
+
+/* If defined, then PSIM will put a non-zero pattern into the RTEMS Workspace
+ and C program heap. This should assist in finding code that assumes memory
+ starts set to zero. */
+#undef BSP_DIRTY_MEMORY
+
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
index 3a2c2d586e..ab7f19786f 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
@@ -70,10 +70,6 @@ uint32_t bsp_clicks_per_usec = 0;
* Total memory using RESIDUAL DATA
*/
unsigned int BSP_mem_size = 0;
-/*
- * Where the heap starts; is used by bsp_pretasking_hook;
- */
-unsigned int BSP_heap_start = 0;
/*
* PCI Bus Frequency
*/
@@ -110,11 +106,6 @@ int i;
printk("\n");
}
-/*
- * system init stack and soft ir stack size
- */
-#define INIT_STACK_SIZE 0x1000
-#define INTR_STACK_SIZE rtems_configuration_get_interrupt_stack_size()
BSP_output_char_function_type BSP_output_char = BSP_output_char_via_serial;
@@ -238,7 +229,6 @@ void bsp_start( void )
unsigned char *stack;
uint32_t intrStackStart;
uint32_t intrStackSize;
-unsigned char *work_space_start;
char *chpt;
ppc_cpu_id_t myCpu;
ppc_cpu_revision_t myCpuRevision;
@@ -286,9 +276,8 @@ VpdBufRec vpdData [] = {
/*
* Initialize the interrupt related settings.
*/
- intrStackStart = (uint32_t) __rtems_end + INIT_STACK_SIZE;
- intrStackSize = INTR_STACK_SIZE;
- BSP_heap_start = intrStackStart + intrStackSize;
+ intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE;
+ intrStackSize = rtems_configuration_get_interrupt_stack_size();
/*
* Initialize default raw exception handlers.
@@ -433,29 +422,7 @@ VpdBufRec vpdData [] = {
*/
_BSP_clear_hostbridge_errors(0 /* enableMCP */, 0/*quiet*/);
- /*
- * Set up our hooks
- * Make sure libc_init is done before drivers initialized so that
- * they can use atexit()
- */
-
- bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
-
-#ifdef SHOW_MORE_INIT_SETTINGS
- printk("Configuration.work_space_size = %x\n",
- Configuration.work_space_size);
-#endif
-
- work_space_start =
- (unsigned char *)BSP_mem_size - Configuration.work_space_size;
-
- if ( work_space_start <=
- ((unsigned char *)__rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE) {
- printk( "bspstart: Not enough RAM!!!\n" );
- bsp_cleanup();
- }
-
- Configuration.work_space_start = work_space_start;
+ bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
/*
* Initalize RTEMS IRQ system