1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup RTEMSBSPsSharedStartup |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2008-2014 embedded brains GmbH. All rights reserved. |
---|
9 | * |
---|
10 | * embedded brains GmbH |
---|
11 | * Dornierstr. 4 |
---|
12 | * 82178 Puchheim |
---|
13 | * Germany |
---|
14 | * <rtems@embedded-brains.de> |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.org/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef LIBBSP_SHARED_BOOTCARD_H |
---|
22 | #define LIBBSP_SHARED_BOOTCARD_H |
---|
23 | |
---|
24 | #include <rtems/config.h> |
---|
25 | #include <rtems/bspIo.h> |
---|
26 | #include <rtems/malloc.h> |
---|
27 | #include <rtems/score/memory.h> |
---|
28 | #include <rtems/score/wkspace.h> |
---|
29 | |
---|
30 | #include <bspopts.h> |
---|
31 | |
---|
32 | #ifdef __cplusplus |
---|
33 | extern "C" { |
---|
34 | #endif /* __cplusplus */ |
---|
35 | |
---|
36 | /** |
---|
37 | * @defgroup RTEMSBSPsSharedStartup Bootcard |
---|
38 | * |
---|
39 | * @ingroup RTEMSBSPsShared |
---|
40 | * |
---|
41 | * @brief Standard system startup. |
---|
42 | * |
---|
43 | * @{ |
---|
44 | */ |
---|
45 | |
---|
46 | /** |
---|
47 | * @brief Global pointer to the command line of boot_card(). |
---|
48 | */ |
---|
49 | extern const char *bsp_boot_cmdline; |
---|
50 | |
---|
51 | void bsp_start(void); |
---|
52 | |
---|
53 | void bsp_reset(void); |
---|
54 | |
---|
55 | /** |
---|
56 | * @brief Standard system initialization procedure. |
---|
57 | * |
---|
58 | * You may pass a command line in @a cmdline. It is later available via the |
---|
59 | * global @ref bsp_boot_cmdline variable. |
---|
60 | * |
---|
61 | * This is the C entry point for ALL RTEMS BSPs. It is invoked from the |
---|
62 | * assembly language initialization file usually called @c start.S which does |
---|
63 | * the basic CPU setup (stack, C runtime environment, zero BSS, load other |
---|
64 | * sections) and calls afterwards boot_card(). The boot card function provides |
---|
65 | * the framework for the BSP initialization sequence. For the basic flow of |
---|
66 | * initialization see RTEMS C User's Guide, Initialization Manager. |
---|
67 | * |
---|
68 | * This style of initialization ensures that the C++ global constructors are |
---|
69 | * executed after RTEMS is initialized. |
---|
70 | */ |
---|
71 | void boot_card(const char *cmdline) RTEMS_NO_RETURN; |
---|
72 | |
---|
73 | struct Per_CPU_Control; |
---|
74 | |
---|
75 | /** |
---|
76 | * @brief Standard start routine for secondary processors. |
---|
77 | * |
---|
78 | * This function is usually called by low-level startup code of secondary |
---|
79 | * processors or boot loaders starting a secondary processor. The final step |
---|
80 | * of this function is a call to |
---|
81 | * _SMP_Start_multitasking_on_secondary_processor(). |
---|
82 | */ |
---|
83 | void bsp_start_on_secondary_processor(struct Per_CPU_Control *cpu_self); |
---|
84 | |
---|
85 | /** @} */ |
---|
86 | |
---|
87 | #ifdef __cplusplus |
---|
88 | } |
---|
89 | #endif /* __cplusplus */ |
---|
90 | |
---|
91 | #endif /* LIBBSP_SHARED_BOOTCARD_H */ |
---|