[rtems commit] Add RTEMS_SYSINIT_CPU_COUNTER

Sebastian Huber sebh at rtems.org
Tue Jun 19 04:58:10 UTC 2018


Module:    rtems
Branch:    master
Commit:    4c7b18e3588db0658a77ee60170875d00c680110
Changeset: http://git.rtems.org/rtems/commit/?id=4c7b18e3588db0658a77ee60170875d00c680110

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue May 22 09:14:07 2018 +0200

Add RTEMS_SYSINIT_CPU_COUNTER

Add initialization step for the CPU counter support.

Update #3456.

---

 cpukit/include/rtems/sysinit.h        |  3 ++-
 testsuites/sptests/spsysinit01/init.c | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/cpukit/include/rtems/sysinit.h b/cpukit/include/rtems/sysinit.h
index 93e3017..2c718af 100644
--- a/cpukit/include/rtems/sysinit.h
+++ b/cpukit/include/rtems/sysinit.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2015, 2018 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Dornierstr. 4
@@ -28,6 +28,7 @@ extern "C" {
  */
 #define RTEMS_SYSINIT_BSP_WORK_AREAS             000100
 #define RTEMS_SYSINIT_BSP_START                  000200
+#define RTEMS_SYSINIT_CPU_COUNTER                000300
 #define RTEMS_SYSINIT_INITIAL_EXTENSIONS         000400
 #define RTEMS_SYSINIT_MP_EARLY                   000500
 #define RTEMS_SYSINIT_DATA_STRUCTURES            000600
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index df299ac..b9521b9 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2015, 2018 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Dornierstr. 4
@@ -67,6 +67,8 @@ typedef enum {
   BSP_WORK_AREAS_POST,
   BSP_START_PRE,
   BSP_START_POST,
+  CPU_COUNTER_PRE,
+  CPU_COUNTER_POST,
   INITIAL_EXTENSIONS_PRE,
   INITIAL_EXTENSIONS_POST,
   DATA_STRUCTURES_PRE,
@@ -218,6 +220,20 @@ LAST(RTEMS_SYSINIT_BSP_START)
   next_step(BSP_START_POST);
 }
 
+FIRST(RTEMS_SYSINIT_CPU_COUNTER)
+{
+  /*
+   * Since the work performed here is BSP-specific, there is no way to test pre
+   * and post conditions.
+   */
+  next_step(CPU_COUNTER_PRE);
+}
+
+LAST(RTEMS_SYSINIT_CPU_COUNTER)
+{
+  next_step(CPU_COUNTER_POST);
+}
+
 FIRST(RTEMS_SYSINIT_INITIAL_EXTENSIONS)
 {
   assert(_Chain_Is_empty(&_User_extensions_Switches_list));



More information about the vc mailing list