summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-24 13:25:46 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-26 09:10:09 +0100
commitbc6ffc3be8c6001c1e0a289ec2b03a4b55cf596f (patch)
tree4d9ec1ccfac9e9173ca76e1dedc24ada54472558
parentfb17af2756360ff2f9fdccd736d4c63b665e0cde (diff)
downloadrtems-bc6ffc3be8c6001c1e0a289ec2b03a4b55cf596f.tar.bz2
Add system initialization step for target hash
Update #4267.
-rw-r--r--cpukit/include/rtems/sysinit.h1
-rw-r--r--cpukit/sapi/src/sysinitverbose.c10
-rw-r--r--testsuites/sptests/spsysinit01/init.c16
3 files changed, 26 insertions, 1 deletions
diff --git a/cpukit/include/rtems/sysinit.h b/cpukit/include/rtems/sysinit.h
index cb17a0fd77..3e85aa9a2b 100644
--- a/cpukit/include/rtems/sysinit.h
+++ b/cpukit/include/rtems/sysinit.h
@@ -39,6 +39,7 @@ extern "C" {
#define RTEMS_SYSINIT_MALLOC 000280
#define RTEMS_SYSINIT_BSP_START 000300
#define RTEMS_SYSINIT_CPU_COUNTER 000400
+#define RTEMS_SYSINIT_TARGET_HASH 000480
#define RTEMS_SYSINIT_INITIAL_EXTENSIONS 000500
#define RTEMS_SYSINIT_MP_EARLY 000600
#define RTEMS_SYSINIT_DATA_STRUCTURES 000700
diff --git a/cpukit/sapi/src/sysinitverbose.c b/cpukit/sapi/src/sysinitverbose.c
index d05f1de9b3..31567198be 100644
--- a/cpukit/sapi/src/sysinitverbose.c
+++ b/cpukit/sapi/src/sysinitverbose.c
@@ -66,6 +66,7 @@ SYSINIT_VERBOSE( WORKSPACE );
SYSINIT_VERBOSE( MALLOC );
SYSINIT_VERBOSE( BSP_START );
SYSINIT_VERBOSE( CPU_COUNTER );
+SYSINIT_VERBOSE( TARGET_HASH );
SYSINIT_VERBOSE( INITIAL_EXTENSIONS );
SYSINIT_VERBOSE( MP_EARLY );
SYSINIT_VERBOSE( DATA_STRUCTURES );
@@ -272,9 +273,16 @@ static void _Sysinit_Verbose_CPU_COUNTER( void )
}
}
+static void _Sysinit_Verbose_TARGET_HASH( void )
+{
+ if ( !SYSINIT_IS_ADJACENT( CPU_COUNTER, TARGET_HASH ) ) {
+ printk( "sysinit: TARGET_HASH: done\n" );
+ }
+}
+
static void _Sysinit_Verbose_INITIAL_EXTENSIONS( void )
{
- if ( !SYSINIT_IS_ADJACENT( CPU_COUNTER, INITIAL_EXTENSIONS ) ) {
+ if ( !SYSINIT_IS_ADJACENT( TARGET_HASH, INITIAL_EXTENSIONS ) ) {
printk( "sysinit: INITIAL_EXTENSIONS: done\n" );
}
}
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index 20b5922dae..13b4a1a802 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -77,6 +77,8 @@ typedef enum {
BSP_START_POST,
CPU_COUNTER_PRE,
CPU_COUNTER_POST,
+ TARGET_HASH_PRE,
+ TARGET_HASH_POST,
INITIAL_EXTENSIONS_PRE,
INITIAL_EXTENSIONS_POST,
DATA_STRUCTURES_PRE,
@@ -257,6 +259,20 @@ LAST(RTEMS_SYSINIT_CPU_COUNTER)
next_step(CPU_COUNTER_POST);
}
+FIRST(RTEMS_SYSINIT_TARGET_HASH)
+{
+ /*
+ * Since the work performed here is BSP-specific, there is no way to test pre
+ * and post conditions.
+ */
+ next_step(TARGET_HASH_PRE);
+}
+
+LAST(RTEMS_SYSINIT_TARGET_HASH)
+{
+ next_step(TARGET_HASH_POST);
+}
+
FIRST(RTEMS_SYSINIT_INITIAL_EXTENSIONS)
{
assert(_Chain_Is_empty(&_User_extensions_Switches_list));