source: rtems/bsps/shared/start/bootcard.c @ 762fa62

5
Last change on this file since 762fa62 was c4ccf26c, checked in by Sebastian Huber <sebastian.huber@…>, on 04/17/18 at 04:57:46

bsps: Convert all bsp_predriver_hook()

Use RTEMS_SYSINIT_ITEM() instead.

Update #2408.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup bsp_bootcard
5 *
6 * @brief Standard system startup.
7 *
8 *  This is the C entry point for ALL RTEMS BSPs.  It is invoked
9 *  from the assembly language initialization file usually called
10 *  start.S.  It provides the framework for the BSP initialization
11 *  sequence.  For the basic flow of initialization see RTEMS C User's Guide,
12 *  Initialization Manager.
13 *
14 *  This style of initialization ensures that the C++ global
15 *  constructors are executed after RTEMS is initialized.
16 *  Thanks to Chris Johns <cjohns@plessey.com.au> for the idea
17 *  to move C++ global constructors into the first task.
18 */
19
20/*
21 *  COPYRIGHT (c) 1989-2014.
22 *  On-Line Applications Research Corporation (OAR).
23 *
24 *  The license and distribution terms for this file may be
25 *  found in the file LICENSE in this distribution or at
26 *  http://www.rtems.org/license/LICENSE.
27 */
28
29#include <bsp/bootcard.h>
30
31#include <rtems.h>
32#include <rtems/sysinit.h>
33
34/*
35 *  At most a single pointer to the cmdline for those target
36 *  short on memory and not supporting a command line.
37 */
38const char *bsp_boot_cmdline;
39
40RTEMS_SYSINIT_ITEM(
41  bsp_work_area_initialize,
42  RTEMS_SYSINIT_BSP_WORK_AREAS,
43  RTEMS_SYSINIT_ORDER_MIDDLE
44);
45
46RTEMS_SYSINIT_ITEM(
47  bsp_start,
48  RTEMS_SYSINIT_BSP_START,
49  RTEMS_SYSINIT_ORDER_MIDDLE
50);
51
52/*
53 *  This is the initialization framework routine that weaves together
54 *  calls to RTEMS and the BSP in the proper sequence to initialize
55 *  the system while maximizing shared code and keeping BSP code in C
56 *  as much as possible.
57 */
58void boot_card(
59  const char *cmdline
60)
61{
62  rtems_interrupt_level  bsp_isr_level;
63
64  /*
65   *  Make sure interrupts are disabled.
66   */
67  (void) bsp_isr_level;
68  rtems_interrupt_local_disable( bsp_isr_level );
69
70  bsp_boot_cmdline = cmdline;
71
72  rtems_initialize_executive();
73
74  /***************************************************************
75   ***************************************************************
76   *  APPLICATION RUNS NOW!!!  We will not return to here!!!     *
77   ***************************************************************
78   ***************************************************************/
79}
Note: See TracBrowser for help on using the repository browser.