OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [include/] [rtems/] [rtems/] [dpmem.h] - Blame information for rev 219

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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-1999.
18
 *  On-Line Applications Research Corporation (OAR).
19
 *
20
 *  The license and distribution terms for this file may be
21
 *  found in the file LICENSE in this distribution or at
22
 *  http://www.OARcorp.com/rtems/license.html.
23
 *
24
 *  $Id: dpmem.h,v 1.2 2001-09-27 11:59:18 chris Exp $
25
 */
26
 
27
#ifndef __RTEMS_DUAL_PORTED_MEMORY_h
28
#define __RTEMS_DUAL_PORTED_MEMORY_h
29
 
30
#ifdef __cplusplus
31
extern "C" {
32
#endif
33
 
34
#include <rtems/score/object.h>
35
 
36
/*
37
 *  The following structure defines the port control block.  Each port
38
 *  has a control block associated with it.  This control block contains
39
 *  all information required to support the port related operations.
40
 */
41
 
42
typedef struct {
43
  Objects_Control  Object;
44
  void            *internal_base; /* base internal address */
45
  void            *external_base; /* base external address */
46
  unsigned32       length;        /* length of dual-ported area */
47
}   Dual_ported_memory_Control;
48
 
49
/*
50
 *  The following define the internal Dual Ported Memory information.
51
 */
52
 
53
RTEMS_EXTERN Objects_Information  _Dual_ported_memory_Information;
54
 
55
/*
56
 *  _Dual_ported_memory_Manager_initialization
57
 *
58
 *  DESCRIPTION:
59
 *
60
 *  This routine performs the initialization necessary for this manager.
61
 */
62
 
63
void _Dual_ported_memory_Manager_initialization(
64
  unsigned32 maximum_ports
65
);
66
 
67
/*
68
 *  rtems_port_create
69
 *
70
 *  DESCRIPTION:
71
 *
72
 *  This routine implements the rtems_port_create directive.  The port
73
 *  will have the name name.  The port maps onto an area of dual ported
74
 *  memory of length bytes which has internal_start and external_start
75
 *  as the internal and external starting addresses, respectively.
76
 *  It returns the id of the created port in ID.
77
 */
78
 
79
rtems_status_code rtems_port_create(
80
  rtems_name    name,
81
  void         *internal_start,
82
  void         *external_start,
83
  unsigned32    length,
84
  Objects_Id   *id
85
);
86
 
87
/*
88
 *  rtems_port_ident
89
 *
90
 *  DESCRIPTION:
91
 *
92
 *  This routine implements the rtems_port_ident directive.  This directive
93
 *  returns the port ID associated with name.  If more than one port is
94
 *  named name, then the port to which the ID belongs is arbitrary.
95
 */
96
 
97
rtems_status_code rtems_port_ident(
98
  rtems_name    name,
99
  Objects_Id   *id
100
);
101
 
102
/*
103
 *  rtems_port_delete
104
 *
105
 *  DESCRIPTION:
106
 *
107
 *  This routine implements the rtems_port_delete directive.  It deletes
108
 *  the port associated with ID.
109
 */
110
 
111
rtems_status_code rtems_port_delete(
112
  Objects_Id id
113
);
114
 
115
/*
116
 *  rtems_port_external_to_internal
117
 *
118
 *  DESCRIPTION:
119
 *
120
 *  This routine implements the rtems_port_external_to_internal directive.
121
 *  It returns the internal port address which maps to the provided
122
 *  external port address for the specified port ID.
123
 */
124
 
125
rtems_status_code rtems_port_external_to_internal(
126
  Objects_Id   id,
127
  void        *external,
128
  void       **internal
129
);
130
 
131
/*
132
 *  rtems_port_internal_to_external
133
 *
134
 *  DESCRIPTION:
135
 *
136
 *  This routine implements the Port_internal_to_external directive.
137
 *  It returns the external port address which maps to the provided
138
 *  internal port address for the specified port ID.
139
 */
140
 
141
rtems_status_code rtems_port_internal_to_external(
142
  Objects_Id   id,
143
  void        *internal,
144
  void       **external
145
);
146
 
147
#ifndef __RTEMS_APPLICATION__
148
#include <rtems/rtems/dpmem.inl>
149
#endif
150
 
151
#ifdef __cplusplus
152
}
153
#endif
154
 
155
#endif
156
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.