summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-04 13:56:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-06 15:19:35 +0100
commit8ecbc3826edfbfebabf5b9b75243df8b04421073 (patch)
treec2d172bad057023e18b2d53ded98eef69593e145 /cpukit/sapi
parent1d43a976a83f1b815ec07ce00e3db31fbd36aac4 (diff)
downloadrtems-8ecbc3826edfbfebabf5b9b75243df8b04421073.tar.bz2
sysinit: Add RTEMS_SYSINIT_ZERO_MEMORY
Use a dedicate system initialization step to zero the memory used for the workspace and C program heap. This avoids dead code in case CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY is not configured.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r--cpukit/sapi/src/sysinitverbose.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpukit/sapi/src/sysinitverbose.c b/cpukit/sapi/src/sysinitverbose.c
index 4fe936766b..7c8db2e5eb 100644
--- a/cpukit/sapi/src/sysinitverbose.c
+++ b/cpukit/sapi/src/sysinitverbose.c
@@ -48,6 +48,7 @@ RTEMS_LINKER_RWSET_ITEM_DECLARE(
SYSINIT_VERBOSE( BSP_EARLY );
SYSINIT_VERBOSE( MEMORY );
SYSINIT_VERBOSE( DIRTY_MEMORY );
+SYSINIT_VERBOSE( ZERO_MEMORY );
SYSINIT_VERBOSE( ISR_STACK );
SYSINIT_VERBOSE( PER_CPU_DATA );
SYSINIT_VERBOSE( SBRK );
@@ -192,9 +193,16 @@ static void _Sysinit_Verbose_DIRTY_MEMORY( void )
}
}
+static void _Sysinit_Verbose_ZERO_MEMORY( void )
+{
+ if ( !SYSINIT_IS_ADJACENT( DIRTY_MEMORY, ZERO_MEMORY ) ) {
+ printk( "sysinit: ZERO_MEMORY: done\n" );
+ }
+}
+
static void _Sysinit_Verbose_ISR_STACK( void )
{
- if ( !SYSINIT_IS_ADJACENT( DIRTY_MEMORY, ISR_STACK ) ) {
+ if ( !SYSINIT_IS_ADJACENT( ZERO_MEMORY, ISR_STACK ) ) {
printk( "sysinit: ISR_STACK: done\n" );
}
}