source: rtems/cpukit/score/include/rtems/score/smpimpl.h @ 911b1d2

4.115
Last change on this file since 911b1d2 was 911b1d2, checked in by Sebastian Huber <sebastian.huber@…>, on 02/17/14 at 14:02:54

score: Rename rtems_smp_secondary_cpu_initialize()

Rename rtems_smp_secondary_cpu_initialize() into
_SMP_Start_multitasking_on_secondary_processor(). Move declaration to
<rtems/score/smpimpl.h>.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreSMPImpl
5 *
6 * @brief SuperCore SMP Implementation
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2011.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 */
17
18#ifndef _RTEMS_SCORE_SMPIMPL_H
19#define _RTEMS_SCORE_SMPIMPL_H
20
21#include <rtems/score/smp.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @defgroup ScoreSMP SMP Support
29 *
30 * @ingroup Score
31 *
32 * This defines the interface of the SuperCore SMP support.
33 *
34 * @{
35 */
36
37/**
38 * @brief SMP message to request a processor shutdown.
39 *
40 * @see _SMP_Send_message().
41 */
42#define SMP_MESSAGE_SHUTDOWN UINT32_C(0x1)
43
44/**
45 * @brief SMP fatal codes.
46 */
47typedef enum {
48  SMP_FATAL_SHUTDOWN
49} SMP_Fatal_code;
50
51/**
52 *  @brief Initialize SMP Handler
53 *
54 *  This method initialize the SMP Handler.
55 */
56#if defined( RTEMS_SMP )
57  void _SMP_Handler_initialize( void );
58#else
59  #define _SMP_Handler_initialize() \
60    do { } while ( 0 )
61#endif
62
63#if defined( RTEMS_SMP )
64
65/**
66 * @brief Performs high-level initialization of a secondary processor and runs
67 * the application threads.
68 *
69 * The low-level initialization code must call this function to hand over the
70 * control of this processor to RTEMS.  Interrupts must be disabled.  It must
71 * be possible to send inter-processor interrupts to this processor.  Since
72 * interrupts are disabled the inter-processor interrupt delivery is postponed
73 * until interrupts are enabled the first time.  Interrupts are enabled during
74 * the execution begin of threads in case they have interrupt level zero (this
75 * is the default).
76 *
77 * The pre-requisites for the call to this function are
78 * - disabled interrupts,
79 * - delivery of inter-processor interrupts is possible,
80 * - a valid stack pointer and enough stack space,
81 * - a valid code memory, and
82 * - a valid BSS section.
83 *
84 * This function must not be called by the main processor.  The main processor
85 * uses _Thread_Start_multitasking() instead.
86 *
87 * This function does not return to the caller.
88 */
89void _SMP_Start_multitasking_on_secondary_processor( void )
90  RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
91
92/**
93 *  @brief Sends a SMP message to a processor.
94 *
95 *  The target processor may be the sending processor.
96 *
97 *  @param[in] cpu The target processor of the message.
98 *  @param[in] message The message.
99 */
100void _SMP_Send_message( uint32_t cpu, uint32_t message );
101
102/**
103 *  @brief Request of others CPUs.
104 *
105 *  This method is invoked by RTEMS when it needs to make a request
106 *  of the other CPUs.  It should be implemented using some type of
107 *  interprocessor interrupt. CPUs not including the originating
108 *  CPU should receive the message.
109 *
110 *  @param [in] message is message to send
111 */
112void _SMP_Broadcast_message(
113  uint32_t  message
114);
115
116#endif /* defined( RTEMS_SMP ) */
117
118/**
119 *  @brief Request other cores to perform first context switch.
120 *
121 *  Send message to other cores requesting them to perform
122 *  their first context switch operation.
123 */
124#if defined( RTEMS_SMP )
125  void _SMP_Request_other_cores_to_perform_first_context_switch( void );
126#else
127  #define _SMP_Request_other_cores_to_perform_first_context_switch() \
128    do { } while ( 0 )
129#endif
130
131/**
132 *  @brief Request other cores to shutdown.
133 *
134 *  Send message to other cores requesting them to shutdown.
135 */
136#if defined( RTEMS_SMP )
137  void _SMP_Request_other_cores_to_shutdown( void );
138#else
139  #define _SMP_Request_other_cores_to_shutdown() \
140    do { } while ( 0 )
141#endif
142
143/** @} */
144
145#ifdef __cplusplus
146}
147#endif
148
149#endif
150/* end of include file */
Note: See TracBrowser for help on using the repository browser.