![]() |
|
|||
File indexing completed on 2025-05-11 08:24:13
0001 /* SPDX-License-Identifier: BSD-2-Clause */ 0002 0003 /** 0004 * @file 0005 * 0006 * @ingroup RTEMSScoreMPCI 0007 * 0008 * @brief This header file provides interfaces of the 0009 * @ref RTEMSScoreMPCI which are used by the implementation and the 0010 * @ref RTEMSImplApplConfig. 0011 */ 0012 0013 /* 0014 * COPYRIGHT (c) 1989-2009. 0015 * On-Line Applications Research Corporation (OAR). 0016 * 0017 * Redistribution and use in source and binary forms, with or without 0018 * modification, are permitted provided that the following conditions 0019 * are met: 0020 * 1. Redistributions of source code must retain the above copyright 0021 * notice, this list of conditions and the following disclaimer. 0022 * 2. Redistributions in binary form must reproduce the above copyright 0023 * notice, this list of conditions and the following disclaimer in the 0024 * documentation and/or other materials provided with the distribution. 0025 * 0026 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0027 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0028 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0029 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 0030 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0031 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0032 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0033 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0034 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0035 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0036 * POSSIBILITY OF SUCH DAMAGE. 0037 */ 0038 0039 #ifndef _RTEMS_SCORE_MPCI_H 0040 #define _RTEMS_SCORE_MPCI_H 0041 0042 #include <rtems/score/mppkt.h> 0043 0044 #ifdef __cplusplus 0045 extern "C" { 0046 #endif 0047 0048 /** 0049 * @defgroup RTEMSScoreMPCI MPCI Handler 0050 * 0051 * @ingroup RTEMSScore 0052 * 0053 * @brief This group contains the MPCI Handler implementation. 0054 * 0055 * The MPCI Handler encapsulates functionality which is related to the 0056 * generation, receipt, and processing of remote operations in a 0057 * multiprocessor system. This handler contains the message passing 0058 * support for making remote service calls as well as the server thread 0059 * which processes requests from remote nodes. 0060 * 0061 * @{ 0062 */ 0063 0064 /** 0065 * The following defines the node number used when a broadcast is desired. 0066 */ 0067 #define MPCI_ALL_NODES 0 0068 0069 /** 0070 * This type is returned by all user provided MPCI routines. 0071 */ 0072 typedef void MPCI_Entry; 0073 0074 /** 0075 * This type defines the prototype for the initization entry point 0076 * in an Multiprocessor Communications Interface. 0077 */ 0078 typedef MPCI_Entry ( *MPCI_initialization_entry )( void ); 0079 0080 /** 0081 * This type defines the prototype for the get packet entry point 0082 * in an Multiprocessor Communications Interface. The single 0083 * parameter will point to the packet allocated. 0084 */ 0085 typedef MPCI_Entry ( *MPCI_get_packet_entry )( 0086 MP_packet_Prefix ** 0087 ); 0088 0089 /** 0090 * This type defines the prototype for the return packet entry point 0091 * in an Multiprocessor Communications Interface. The single 0092 * parameter will point to a packet previously allocated by the 0093 * get packet MPCI entry. 0094 */ 0095 typedef MPCI_Entry ( *MPCI_return_packet_entry )( 0096 MP_packet_Prefix * 0097 ); 0098 0099 /** 0100 * This type defines the prototype for send get packet entry point 0101 * in an Multiprocessor Communications Interface. The single 0102 * parameter will point to a packet previously allocated by the 0103 * get packet entry point that has been filled in by the caller. 0104 */ 0105 typedef MPCI_Entry ( *MPCI_send_entry )( 0106 uint32_t, 0107 MP_packet_Prefix * 0108 ); 0109 0110 /** 0111 * This type defines the prototype for the receive packet entry point 0112 * in an Multiprocessor Communications Interface. The single 0113 * parameter will point to a packet allocated and filled in by the 0114 * receive packet handler. The caller will block until a packet is 0115 * received. 0116 */ 0117 typedef MPCI_Entry ( *MPCI_receive_entry )( 0118 MP_packet_Prefix ** 0119 ); 0120 0121 /** 0122 * This type defines the Multiprocessor Communications 0123 * Interface (MPCI) Table. This table defines the user-provided 0124 * MPCI which is a required part of a multiprocessor system. 0125 * 0126 * For non-blocking local operations that become remote operations, 0127 * we need a timeout. This is a per-driver timeout: default_timeout 0128 */ 0129 typedef struct { 0130 /** This fields contains the timeout for MPCI operations in ticks. */ 0131 uint32_t default_timeout; 0132 /** This field contains the maximum size of a packet supported by this 0133 * MPCI layer. This size places a limit on the size of a message 0134 * which can be transmitted over this interface. 0135 **/ 0136 size_t maximum_packet_size; 0137 /** This field points to the MPCI initialization entry point. */ 0138 MPCI_initialization_entry initialization; 0139 /** This field points to the MPCI get packet entry point. */ 0140 MPCI_get_packet_entry get_packet; 0141 /** This field points to the MPCI return packet entry point. */ 0142 MPCI_return_packet_entry return_packet; 0143 /** This field points to the MPCI send packet entry point. */ 0144 MPCI_send_entry send_packet; 0145 /** This field points to the MPCI receive packet entry point. */ 0146 MPCI_receive_entry receive_packet; 0147 } MPCI_Control; 0148 0149 /* 0150 * The following records define the Multiprocessor Configuration 0151 * Table. This table defines the multiprocessor system 0152 * characteristics which must be known by RTEMS in a multiprocessor 0153 * system. 0154 */ 0155 typedef struct { 0156 /** This is the local node number. */ 0157 uint32_t node; 0158 /** This is the maximum number of nodes in system. */ 0159 uint32_t maximum_nodes; 0160 /** This is the maximum number of global objects. */ 0161 uint32_t maximum_global_objects; 0162 /** This is the maximum number of proxies. */ 0163 uint32_t maximum_proxies; 0164 0165 /** 0166 * The MPCI Receive server is assumed to have a stack of at least 0167 * minimum stack size. This field specifies the amount of extra 0168 * stack this task will be given in bytes. 0169 */ 0170 uint32_t extra_mpci_receive_server_stack; 0171 0172 /** This is a pointer to User/BSP provided MPCI Table. */ 0173 MPCI_Control *User_mpci_table; 0174 } MPCI_Configuration; 0175 0176 /** 0177 * @brief The MPCI configuration. 0178 * 0179 * Provided by the application via <rtems/confdefs.h>. 0180 */ 0181 extern const MPCI_Configuration _MPCI_Configuration; 0182 0183 /** 0184 * @brief The MPCI receive server stack. 0185 * 0186 * Provided by the application via <rtems/confdefs.h> 0187 */ 0188 extern char _MPCI_Receive_server_stack[]; 0189 0190 /** @} */ 0191 0192 #ifdef __cplusplus 0193 } 0194 #endif 0195 0196 #endif 0197 /* end of include file */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |