source: rtems/cpukit/score/include/rtems/bspsmp.h @ 4627fcd

4.115
Last change on this file since 4627fcd was 4627fcd, checked in by Sebastian Huber <sebastian.huber@…>, on 02/17/14 at 13:25:29

score: Rename bsp_smp_initialize()

Rename bsp_smp_initialize() into _CPU_SMP_Initialize() since every CPU
port must supply this function.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/**
2 *  @file  rtems/bspsmp.h
3 *
4 *  @brief Interface Between RTEMS and an SMP Aware BSP
5 *
6 *  This include file defines the interface between RTEMS and an
7 *  SMP aware BSP.  These methods will only be used when RTEMS
8 *  is configured with SMP support enabled.
9 */
10
11/*
12 *  COPYRIGHT (c) 1989-2011.
13 *  On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 */
19
20#ifndef _RTEMS_BSPSMP_H
21#define _RTEMS_BSPSMP_H
22
23#include <rtems/score/cpuopts.h>
24
25#if defined (RTEMS_SMP)
26#include <rtems/score/percpu.h>
27
28/**
29 *  @defgroup RTEMS BSP SMP Interface
30 *
31 *  @ingroup Score
32 *
33 *  This defines the interface between RTEMS and the BSP for
34 *  SMP support.  The interface uses the term primary
35 *  to refer to the "boot" processor and secondary to refer
36 *  to the "application" processors.  Different architectures
37 *  use different terminology.
38 *
39 *  It is assumed that when the processor is reset and thus
40 *  when RTEMS is initialized, that the primary processor is
41 *  the only one executing.  The others are assumed to be in
42 *  a quiescent or reset state awaiting a command to come online.
43 */
44
45/**@{*/
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51
52#ifndef ASM
53
54/**
55 *  @brief Generate an interprocessor broadcast interrupt.
56 *
57 *  This method is invoked when RTEMS wants to let all of the other
58 *  CPUs know that it has sent them message.  CPUs not including
59 *  the originating CPU should receive the interrupt.
60
61 *
62 *  @note On CPUs without the capability to generate a broadcast
63 *        to all other CPUs interrupt, this can be implemented by
64 *        a loop of sending interrupts to specific CPUs.
65 */
66void bsp_smp_broadcast_interrupt(void);
67
68/**
69 * @brief Performs high-level initialization of a secondary processor and runs
70 * the application threads.
71 *
72 * The low-level initialization code must call this function to hand over the
73 * control of this processor to RTEMS.  Interrupts must be disabled.  It must
74 * be possible to send inter-processor interrupts to this processor.  Since
75 * interrupts are disabled the inter-processor interrupt delivery is postponed
76 * until interrupts are enabled the first time.  Interrupts are enabled during
77 * the execution begin of threads in case they have interrupt level zero (this
78 * is the default).
79 *
80 * The pre-requisites for the call to this function are
81 * - disabled interrupts,
82 * - delivery of inter-processor interrupts is possible,
83 * - a valid stack pointer and enough stack space,
84 * - a valid code memory, and
85 * - a valid BSS section.
86 *
87 * This function must not be called by the main processor.  This function does
88 * not return to the caller.
89 */
90void rtems_smp_secondary_cpu_initialize( void )
91  RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
92
93/**
94 *  @brief Process the incoming interprocessor request.
95 *
96 *  This is the method called by the BSP's interrupt handler
97 *  to process the incoming interprocessor request.
98 */
99void rtems_smp_process_interrupt(void);
100
101#endif
102
103#ifdef __cplusplus
104}
105#endif
106
107#endif
108
109/**@}*/
110#endif
111
112/* end of include file */
Note: See TracBrowser for help on using the repository browser.