source: rtems/bsps/include/bsp/bootcard.h @ f7c5f94

5
Last change on this file since f7c5f94 was eea21eac, checked in by Sebastian Huber <sebastian.huber@…>, on 12/13/19 at 05:18:36

bsps: Rework work area initialization

The work area initialization was done by the BSP through
bsp_work_area_initialize(). This approach predated the system
initialization through the system initialization linker set. The
workspace and C program heap were unconditionally initialized. The aim
is to support RTEMS application configurations which do not need the
workspace and C program heap. In these configurations, the workspace
and C prgram heap should not get initialized.

Change all bsp_work_area_initialize() to implement _Memory_Get()
instead. Move the dirty memory, sbrk(), per-CPU data, workspace, and
malloc() heap initialization into separate system initialization steps.
This makes it also easier to test the individual initialization steps.

This change adds a dependency to _Heap_Extend() to all BSPs. This
dependency will be removed in a follow up change.

Update #3838.

  • Property mode set to 100644
File size: 2.2 KB
Line 
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
33extern "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 */
49extern const char *bsp_boot_cmdline;
50
51void bsp_start(void);
52
53void 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 */
71void boot_card(const char *cmdline) RTEMS_NO_RETURN;
72
73struct 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 */
83void 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 */
Note: See TracBrowser for help on using the repository browser.