RTEMS
mpci.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
11 /*
12  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions
16  * are met:
17  * 1. Redistributions of source code must retain the above copyright
18  * notice, this list of conditions and the following disclaimer.
19  * 2. Redistributions in binary form must reproduce the above copyright
20  * notice, this list of conditions and the following disclaimer in the
21  * documentation and/or other materials provided with the distribution.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
36 #ifndef _RTEMS_CONFDEFS_MPCI_H
37 #define _RTEMS_CONFDEFS_MPCI_H
38 
39 #ifndef __CONFIGURATION_TEMPLATE_h
40 #error "Do not include this file directly, use <rtems/confdefs.h> instead"
41 #endif
42 
43 #ifdef CONFIGURE_INIT
44 
45 #ifdef RTEMS_MULTIPROCESSING
46 
47 #ifdef CONFIGURE_MP_APPLICATION
48 
49 #include <rtems/confdefs/threads.h>
50 
51 #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
52  #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0
53 #endif
54 
55 #ifndef CONFIGURE_MP_NODE_NUMBER
56  #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER
57 #endif
58 
59 #ifndef CONFIGURE_MP_MAXIMUM_NODES
60  #define CONFIGURE_MP_MAXIMUM_NODES 2
61 #endif
62 
63 #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
64  #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32
65 #endif
66 
67 #ifndef CONFIGURE_MP_MAXIMUM_PROXIES
68  #define CONFIGURE_MP_MAXIMUM_PROXIES 32
69 #endif
70 
71 #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
72  #include <mpci.h>
73 
74  #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table
75 #endif
76 
77 #if CONFIGURE_MP_NODE_NUMBER < 1
78  #error "CONFIGURE_MP_NODE_NUMBER must be greater than or equal to one"
79 #endif
80 
81 #if CONFIGURE_MP_NODE_NUMBER > CONFIGURE_MP_MAXIMUM_NODES
82  #error "CONFIGURE_MP_NODE_NUMBER must be less than or equal to CONFIGURE_MP_MAXIMUM_NODES"
83 #endif
84 
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88 
89 Objects_MP_Control _Objects_MP_Controls[
91 ];
92 
93 struct Thread_Configured_proxy_control {
94  Thread_Proxy_control Control;
96 };
97 
98 static Thread_Configured_proxy_control _Thread_MP_Configured_proxies[
100 ];
101 
102 Thread_Configured_proxy_control * const _Thread_MP_Proxies =
103  &_Thread_MP_Configured_proxies[ 0 ];
104 
105 const MPCI_Configuration _MPCI_Configuration = {
112 };
113 
114 char _MPCI_Receive_server_stack[
119 ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT )
120 RTEMS_SECTION( ".rtemsstack.mpci" );
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif /* CONFIGURE_MP_APPLICATION */
127 
128 #else /* RTEMS_MULTIPROCESSING */
129 
130 #ifdef CONFIGURE_MP_APPLICATION
131  #error "CONFIGURE_MP_APPLICATION must not be defined if multiprocessing is disabled"
132 #endif
133 
134 #endif /* RTEMS_MULTIPROCESSING */
135 
136 #endif /* CONFIGURE_INIT */
137 
138 #endif /* _RTEMS_CONFDEFS_MPCI_H */
Evaluate MPCI Configuration Options.
#define CONTEXT_FP_SIZE
Size of floating point context area.
Definition: context.h:52
#define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
This configuration option is an integer define.
Definition: appl-config.h:3272
#define CONFIGURE_MP_MAXIMUM_PROXIES
This configuration option is an integer define.
Definition: appl-config.h:3372
Evaluate Thread Configuration Options.
#define CPU_ALL_TASKS_ARE_FP
Definition: cpu.h:121
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler in a declaration or definition to enforce the specified alignment.
Definition: basedefs.h:389
#define CONFIGURE_MP_MAXIMUM_NODES
This configuration option is an integer define.
Definition: appl-config.h:3342
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS
This configuration option is an integer define.
Definition: appl-config.h:3320
struct Thread_queue_Configured_heads Thread_queue_Configured_heads
The configured thread queue heads.
Definition: thread.h:981
#define CONFIGURE_MP_NODE_NUMBER
This configuration option is an integer define.
Definition: appl-config.h:3428
#define CONFIGURE_MP_MPCI_TABLE_POINTER
This configuration option is an initializer define.
Definition: appl-config.h:3399
#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK
Definition: cpu.h:661
#define RTEMS_SECTION(_section)
Instructs the compiler to place a specific variable or function in the specified section.
Definition: basedefs.h:817
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE
This configuration option is an integer define.
Definition: appl-config.h:2939