summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-13 15:01:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-13 15:01:25 +0000
commit21ca21996d8c0f2ad815f5e0beb34827083afae2 (patch)
tree5f6f52fc99b524265788ae2decbb5e0f54fa5fc7 /c
parent2007-09-07 Kate Feng <feng1@bnl.gov> (diff)
downloadrtems-21ca21996d8c0f2ad815f5e0beb34827083afae2.tar.bz2
2007-09-13 Joel Sherrill <joel.sherrill@OARcorp.com>
* configure.ac, startup/bspstart.c: Add BSP_DIRTY_MEMORY option.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/psim/ChangeLog4
-rw-r--r--c/src/lib/libbsp/powerpc/psim/configure.ac6
-rw-r--r--c/src/lib/libbsp/powerpc/psim/startup/bspstart.c5
3 files changed, 15 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/psim/ChangeLog b/c/src/lib/libbsp/powerpc/psim/ChangeLog
index 8bbfc34bd5..c9bf80b31b 100644
--- a/c/src/lib/libbsp/powerpc/psim/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/psim/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-13 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * configure.ac, startup/bspstart.c: Add BSP_DIRTY_MEMORY option.
+
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1257/bsps
diff --git a/c/src/lib/libbsp/powerpc/psim/configure.ac b/c/src/lib/libbsp/powerpc/psim/configure.ac
index de82cf8084..79c1c5a5df 100644
--- a/c/src/lib/libbsp/powerpc/psim/configure.ac
+++ b/c/src/lib/libbsp/powerpc/psim/configure.ac
@@ -29,6 +29,12 @@ RTEMS_BSPOPTS_HELP([PPC_VECTOR_FILE_BASE],
[This defines the base address of the exception table.
NOTE: Vectors are actually at 0xFFF00000 but file starts at offset.])
+RTEMS_BSPOPTS_SET([BSP_DIRTY_MEMORY],[*],[0])
+RTEMS_BSPOPTS_HELP([BSP_DIRTY_MEMORY],
+[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.])
+
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
index 0cb1c406fb..9a21d6b137 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
@@ -186,6 +186,11 @@ void bsp_start( void )
}
BSP_Configuration.work_space_start = work_space_start;
+ #if defined(BSP_DIRTY_MEMORY)
+ {
+ memset(&end, 0xCF, (unsigned char *)&RAM_END - (unsigned char *)&end );
+ }
+ #endif
/*
* Initialize the interrupt related settings