source: rtems/cpukit/include/rtems/sysinit.h @ 4c7b18e3

5
Last change on this file since 4c7b18e3 was 4c7b18e3, checked in by Sebastian Huber <sebastian.huber@…>, on May 22, 2018 at 7:14:07 AM

Add RTEMS_SYSINIT_CPU_COUNTER

Add initialization step for the CPU counter support.

Update #3456.

  • Property mode set to 100644
File size: 4.5 KB
Line 
1/*
2 * Copyright (c) 2015, 2018 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef _RTEMS_SYSINIT_H
16#define _RTEMS_SYSINIT_H
17
18#include <rtems/linkersets.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24/*
25 * The value of each module define must consist of exactly six hexadecimal
26 * digits without a 0x-prefix.  A 0x-prefix is concatenated with the module and
27 * order values to form a proper integer literal.
28 */
29#define RTEMS_SYSINIT_BSP_WORK_AREAS             000100
30#define RTEMS_SYSINIT_BSP_START                  000200
31#define RTEMS_SYSINIT_CPU_COUNTER                000300
32#define RTEMS_SYSINIT_INITIAL_EXTENSIONS         000400
33#define RTEMS_SYSINIT_MP_EARLY                   000500
34#define RTEMS_SYSINIT_DATA_STRUCTURES            000600
35#define RTEMS_SYSINIT_MP                         000700
36#define RTEMS_SYSINIT_USER_EXTENSIONS            000900
37#define RTEMS_SYSINIT_CLASSIC_TASKS              000a00
38#define RTEMS_SYSINIT_CLASSIC_TIMER              000b00
39#define RTEMS_SYSINIT_CLASSIC_SIGNAL             000c00
40#define RTEMS_SYSINIT_CLASSIC_EVENT              000d00
41#define RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE      000e00
42#define RTEMS_SYSINIT_CLASSIC_SEMAPHORE          000f00
43#define RTEMS_SYSINIT_CLASSIC_PARTITION          001000
44#define RTEMS_SYSINIT_CLASSIC_REGION             001100
45#define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 001200
46#define RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC     001300
47#define RTEMS_SYSINIT_CLASSIC_BARRIER            001400
48#define RTEMS_SYSINIT_POSIX_SIGNALS              001500
49#define RTEMS_SYSINIT_POSIX_THREADS              001600
50#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE        001700
51#define RTEMS_SYSINIT_POSIX_SEMAPHORE            001800
52#define RTEMS_SYSINIT_POSIX_TIMER                001900
53#define RTEMS_SYSINIT_POSIX_SHM                  001a00
54#define RTEMS_SYSINIT_POSIX_KEYS                 001b00
55#define RTEMS_SYSINIT_POSIX_CLEANUP              001c00
56#define RTEMS_SYSINIT_IDLE_THREADS               001d00
57#define RTEMS_SYSINIT_LIBIO                      001e00
58#define RTEMS_SYSINIT_ROOT_FILESYSTEM            001f00
59#define RTEMS_SYSINIT_DRVMGR                     002000
60#define RTEMS_SYSINIT_MP_SERVER                  002100
61#define RTEMS_SYSINIT_BSP_PRE_DRIVERS            002200
62#define RTEMS_SYSINIT_DRVMGR_LEVEL_1             002300
63#define RTEMS_SYSINIT_DEVICE_DRIVERS             002400
64#define RTEMS_SYSINIT_DRVMGR_LEVEL_2             002500
65#define RTEMS_SYSINIT_DRVMGR_LEVEL_3             002600
66#define RTEMS_SYSINIT_DRVMGR_LEVEL_4             002700
67#define RTEMS_SYSINIT_MP_FINALIZE                002800
68#define RTEMS_SYSINIT_CLASSIC_USER_TASKS         002900
69#define RTEMS_SYSINIT_POSIX_USER_THREADS         002a00
70#define RTEMS_SYSINIT_STD_FILE_DESCRIPTORS       002b00
71#define RTEMS_SYSINIT_LAST                       ffffff
72
73/*
74 * The value of each order define must consist of exactly two hexadecimal
75 * digits without a 0x-prefix.  A 0x-prefix is concatenated with the module and
76 * order values to form a proper integer literal.
77 */
78#define RTEMS_SYSINIT_ORDER_FIRST   00
79#define RTEMS_SYSINIT_ORDER_SECOND  01
80#define RTEMS_SYSINIT_ORDER_THIRD   02
81#define RTEMS_SYSINIT_ORDER_FOURTH  03
82#define RTEMS_SYSINIT_ORDER_FIFTH   04
83#define RTEMS_SYSINIT_ORDER_SIXTH   05
84#define RTEMS_SYSINIT_ORDER_SEVENTH 06
85#define RTEMS_SYSINIT_ORDER_EIGHTH  07
86#define RTEMS_SYSINIT_ORDER_NINETH  08
87#define RTEMS_SYSINIT_ORDER_TENTH   09
88#define RTEMS_SYSINIT_ORDER_MIDDLE  80
89#define RTEMS_SYSINIT_ORDER_LAST    ff
90
91typedef void ( *rtems_sysinit_handler )( void );
92
93typedef struct {
94  rtems_sysinit_handler handler;
95} rtems_sysinit_item;
96
97/* The enum helps to detect typos in the module and order parameters */
98#define _RTEMS_SYSINIT_INDEX_ITEM( handler, index ) \
99  enum { _Sysinit_##handler = index }; \
100  RTEMS_LINKER_ROSET_ITEM_ORDERED( \
101    _Sysinit, \
102    rtems_sysinit_item, \
103    handler, \
104    index \
105  ) = { handler }
106
107/* Create index from module and order */
108#define _RTEMS_SYSINIT_ITEM( handler, module, order ) \
109  _RTEMS_SYSINIT_INDEX_ITEM( handler, 0x##module##order )
110
111/* Perform parameter expansion */
112#define RTEMS_SYSINIT_ITEM( handler, module, order ) \
113  _RTEMS_SYSINIT_ITEM( handler, module, order )
114
115#ifdef __cplusplus
116}
117#endif /* __cplusplus */
118
119#endif /* _RTEMS_SYSINIT_H */
Note: See TracBrowser for help on using the repository browser.