source: rtems/cpukit/rtems/include/rtems/rtems/dpmem.h @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/95 at 19:35:39

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 5.0 KB
Line 
1/*  dpmem.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the Dual Ported Memory Manager. This manager provides a mechanism
5 *  for converting addresses between internal and external representations
6 *  for multiple dual-ported memory areas.
7 *
8 *  Directives provided are:
9 *
10 *     + create a port
11 *     + get ID of a port
12 *     + delete a port
13 *     + convert external to internal address
14 *     + convert internal to external address
15 *
16 *
17 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
18 *  On-Line Applications Research Corporation (OAR).
19 *  All rights assigned to U.S. Government, 1994.
20 *
21 *  This material may be reproduced by or for the U.S. Government pursuant
22 *  to the copyright license under the clause at DFARS 252.227-7013.  This
23 *  notice must appear in all copies of this file and its derivatives.
24 *
25 *  $Id$
26 */
27
28#ifndef __RTEMS_DUAL_PORTED_MEMORY_h
29#define __RTEMS_DUAL_PORTED_MEMORY_h
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include <rtems/core/object.h>
36
37/*
38 *  The following structure defines the port control block.  Each port
39 *  has a control block associated with it.  This control block contains
40 *  all information required to support the port related operations.
41 */
42
43typedef struct {
44  Objects_Control  Object;
45  void            *internal_base; /* base internal address */
46  void            *external_base; /* base external address */
47  unsigned32       length;        /* length of dual-ported area */
48}   Dual_ported_memory_Control;
49
50/*
51 *  The following define the internal Dual Ported Memory information.
52 */
53
54EXTERN Objects_Information  _Dual_ported_memory_Information;
55
56/*
57 *  _Dual_ported_memory_Manager_initialization
58 *
59 *  DESCRIPTION:
60 *
61 *  This routine performs the initialization necessary for this manager.
62 */
63
64void _Dual_ported_memory_Manager_initialization(
65  unsigned32 maximum_ports
66);
67
68/*
69 *  rtems_port_create
70 *
71 *  DESCRIPTION:
72 *
73 *  This routine implements the rtems_port_create directive.  The port
74 *  will have the name name.  The port maps onto an area of dual ported
75 *  memory of length bytes which has internal_start and external_start
76 *  as the internal and external starting addresses, respectively.
77 *  It returns the id of the created port in ID.
78 */
79
80rtems_status_code rtems_port_create(
81  rtems_name    name,
82  void         *internal_start,
83  void         *external_start,
84  unsigned32    length,
85  Objects_Id   *id
86);
87
88/*
89 *  rtems_port_ident
90 *
91 *  DESCRIPTION:
92 *
93 *  This routine implements the rtems_port_ident directive.  This directive
94 *  returns the port ID associated with name.  If more than one port is
95 *  named name, then the port to which the ID belongs is arbitrary.
96 */
97
98rtems_status_code rtems_port_ident(
99  rtems_name    name,
100  Objects_Id   *id
101);
102
103/*
104 *  rtems_port_delete
105 *
106 *  DESCRIPTION:
107 *
108 *  This routine implements the rtems_port_delete directive.  It deletes
109 *  the port associated with ID.
110 */
111
112rtems_status_code rtems_port_delete(
113  Objects_Id id
114);
115
116/*
117 *  rtems_port_external_to_internal
118 *
119 *  DESCRIPTION:
120 *
121 *  This routine implements the rtems_port_external_to_internal directive.
122 *  It returns the internal port address which maps to the provided
123 *  external port address for the specified port ID.
124 */
125
126rtems_status_code rtems_port_external_to_internal(
127  Objects_Id   id,
128  void        *external,
129  void       **internal
130);
131
132/*
133 *  rtems_port_internal_to_external
134 *
135 *  DESCRIPTION:
136 *
137 *  This routine implements the Port_internal_to_external directive.
138 *  It returns the external port address which maps to the provided
139 *  internal port address for the specified port ID.
140 */
141
142rtems_status_code rtems_port_internal_to_external(
143  Objects_Id   id,
144  void        *internal,
145  void       **external
146);
147
148/*
149 *  _Dual_ported_memory_Allocate
150 *
151 *  DESCRIPTION:
152 *
153 *  This routine allocates a port control block from the inactive chain
154 *  of free port control blocks.
155 */
156
157STATIC INLINE Dual_ported_memory_Control
158  *_Dual_ported_memory_Allocate ( void );
159
160/*
161 *  _Dual_ported_memory_Free
162 *
163 *  DESCRIPTION:
164 *
165 *  This routine frees a port control block to the inactive chain
166 *  of free port control blocks.
167 */
168
169STATIC INLINE void _Dual_ported_memory_Free (
170   Dual_ported_memory_Control *the_port
171);
172
173/*
174 *  _Dual_ported_memory_Get
175 *
176 *  DESCRIPTION:
177 *
178 *  This function maps port IDs to port control blocks.  If ID
179 *  corresponds to a local port, then it returns the_port control
180 *  pointer which maps to ID and location is set to OBJECTS_LOCAL.
181 *  Global ports are not supported, thus if ID  does not map to a
182 *  local port, location is set to OBJECTS_ERROR and the_port is
183 *  undefined.
184 */
185
186STATIC INLINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
187  Objects_Id         id,
188  Objects_Locations *location
189);
190
191/*
192 *  _Dual_ported_memory_Is_null
193 *
194 *  DESCRIPTION:
195 *
196 *  This function returns TRUE if the_port is NULL and FALSE otherwise.
197 */
198
199STATIC INLINE boolean _Dual_ported_memory_Is_null(
200  Dual_ported_memory_Control *the_port
201);
202
203#include <rtems/rtems/dpmem.inl>
204
205#ifdef __cplusplus
206}
207#endif
208
209#endif
210/* end of include file */
Note: See TracBrowser for help on using the repository browser.