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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [itron/] [include/] [itronsys/] [sysmgmt.h] - Blame information for rev 389

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

Line No. Rev Author Line
1 30 unneback
/*
2
 *  COPYRIGHT (c) 1989-1999.
3
 *  On-Line Applications Research Corporation (OAR).
4
 *
5
 *  The license and distribution terms for this file may be
6
 *  found in the file LICENSE in this distribution or at
7
 *  http://www.OARcorp.com/rtems/license.html.
8
 *
9
 *  $Id: sysmgmt.h,v 1.2 2001-09-27 11:59:12 chris Exp $
10
 */
11
 
12
#ifndef __ITRON_SYSTEM_MANAGEMENT_h_
13
#define __ITRON_SYSTEM_MANAGEMENT_h_
14
 
15
#ifdef __cplusplus
16
extern "C" {
17
#endif
18
 
19
/*
20
 *  Get Version (get_ver) Structure
21
 */
22
 
23
typedef struct t_ver {
24
  UH   maker;     /* vendor */
25
  UH   id;        /* format number */
26
  UH   spver;     /* specification version */
27
  UH   prver;     /* product version */
28
  UH   prno[4];   /* product control information */
29
  UH   cpu;       /* CPU information */
30
  UH   var;       /* variation descriptor */
31
} T_VER;
32
 
33
/*
34
 *  Specific MAKER codes established as of March, 1993 are as follows.
35
 *  Due to restrictions on the assignment of CPU codes described below, it is
36
 *  necessary to use maker codes in the range 0x000 through 0x00ff for vendors
37
 *  developing CPUs.
38
 */
39
 
40
/*
41
 *  CPU defines XXX need to name the constants
42
 */
43
 
44
#if 0
45
#define 0x000  /* No version (test systems, etc.) */
46
#define 0x001  /* University of Tokyo */
47
#define 0x009  /* FUJITSU LIMITED */
48
#define 0x00a  /* Hitachi, Ltd. */
49
#define 0x00b  /* Matsushita Electric Industrial Co., Ltd. */
50
#define 0x00c  /* Mitsubishi Electric Corporation */
51
#define 0x00d  /* NEC Corporation */
52
#define 0x00e  /* Oki Electric Industry Co., Ltd. */
53
#define 0x00f  /* TOSHIBA CORPORATION */
54
#endif
55
 
56
/*
57
 * The above have been assigned in alphabetical order.
58
 */
59
 
60
#if 0
61
#define 0x010  /* ALPS ELECTRIC CO., LTD. */
62
#define 0x011  /* WACOM Co., Ltd. */
63
#define 0x012  /* Personal Media Corporation */
64
#define 0x101  /* OMRON CORPORATION */
65
#define 0x102  /* SEIKOSHA CO., LTD. */
66
#define 0x103  /* SYSTEM ALGO CO., LTD. */
67
#define 0x104  /* Tokyo Computer Service Co., Ltd. */
68
#define 0x105  /* YAMAHA CORPORATION */
69
#define 0x106  /* MORSON JAPAN */
70
#define 0x107  /* TOSHIBA INFORMATION SYSTEMS (JAPAN) CORP. */
71
#define 0x108  /* Miyazaki System Planning Office */
72
#define 0x109  /* Three Ace Computer Corporation */
73
#endif
74
 
75
/*
76
 *  CPU Codes
77
 *
78
 *  Figure 47 shows the format of cpu code.  Some processors use the format
79
 *  given in Figure 47(1).  The format given in Figure 47(2) is used for all
80
 *  other proprietary processors.
81
 *
82
 *  The code assignment of the CPU1 region in the format given in Figure 47(1)
83
 *  is common to ITRON and BTRON specifications.  The same number is used in
84
 *  the CPU type of the standard object format of BTRON specification
85
 *  operating systems implemented on a TRON-specification chip.
86
 *
87
 *  When using the format given in Figure 47(2) the code used for MAKER1 is
88
 *  assigned by using the lower 8 bits of MAKER described in the previous
89
 *  subsection.  The code assignment of CPU2 is left up to each maker.
90
 *
91
 *
92
 *
93
 *        +---------------+---------------+---------------+---------------+
94
 *    (1) | 0   0   0   0   0   0   0   0 |              CPU1             |
95
 *        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
96
 *        +---------------+---------------+---------------+---------------+
97
 *    (2) |             MAKER1            |              CPU2             |
98
 *        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
99
 *
100
 *                   Figure 47 Format of cpu Returned by get_ver
101
 *
102
 *
103
 *  Specific CPU codes established as of March, 1993 are as follows.
104
 */
105
 
106
#if 0
107
/*
108
 * XXX CONVERT THESE to #defines
109
 */
110
 
111
 
112
/*
113
 *  Contents of the CPU1 field
114
 */
115
 
116
#define (0x0)   CPU unspecified, no CPU information given
117
#define (0x1)   TRONCHIP32 shared
118
#define (0x2)   reserved
119
#define (0x3)   reserved
120
#define (0x4)   reserved
121
#define (0x5)   reserved (<<L1R>> TRON-specification chip)
122
#define (0x6)   reserved (<<L1>> TRON-specification chip)
123
#define (0x7)   reserved (TRON-specification chip supporting the
124
                             LSID function)
125
/* CPU vendors are unspecified for codes B'00000000 through B'00000111. */
126
 
127
#define (0x8)  reserved
128
#define (0x9)  GMICRO/100
129
#define (0xa)  GMICRO/200
130
#define (0xb)  GMICRO/300
131
#define (0xc)  reserved
132
#define (0xd)  TX1
133
#define (0xe)  TX2
134
#define (0xf)  reserved
135
 
136
#define (0x10)  reserved
137
#define (0x11)  reserved
138
#define (0x12)  reserved
139
#define (0x13)  O32
140
#define (0x14)  reserved
141
#define (0x15)  MN10400
142
#define (0x16)  reserved
143
#define (0x17)  reserved
144
 
145
#define (0x18)  GMICRO/400
146
#define (0x19)  GMICRO/500
147
#define (0x1a)  reserved
148
#define (0x1b-0x3f)
149
                            reserved
150
          * For GMICRO extended, TX series extended, and TRONCHIP64 chips.
151
 
152
#define (0x40)   Motorola 68000
153
#define (0x41)   Motorola 68010
154
#define (0x42)   Motorola 68020
155
#define (0x43)   Motorola 68030
156
#define (0x44)   Motorola 68040
157
#define -(0x40-0x4f)
158
#define                       Motorola 68000 family
159
#define (0x50)   National Semiconductor NS32032
160
#define (0x50-0x5f)
161
                              National Semiconductor NS32000 family
162
#define (0x60)   Intel 8086, 8088
163
#define (0x61)   Intel 80186
164
#define (0x62)   Intel 80286
165
#define (0x63)   Intel 80386
166
#define (0x64)   Intel 80486
167
#define (0x60-0x6f)
168
                              Intel iAPX86 family
169
 
170
#define (0x70-0x7f)
171
                              NEC V Series
172
 
173
#define (0x80-0xff)
174
                              reserved
175
#endif
176
 
177
/*
178
 *  Assigning Version Numbers
179
 *
180
 *  The version numbers of ITRON and uITRON specifications take the following
181
 *  form.
182
 *
183
 *          Ver X.YY.ZZ[.WW]
184
 *
185
 *  where "X" represents major version number of the ITRON specification to
186
 *  distinguish ITRON1, ITRON2 and uITRON 3.0 specifications.  Specific
187
 *  assignment is as follows.
188
 *
189
 *          "X" = 1  ITRON1 specification
190
 *              = 2  ITRON2 or uITRON 2.0 specification
191
 *              = 3  uITRON 3.0 specification
192
 *
193
 *  "YY" is a number used to distinguish versions according to changes and
194
 *  additions made to the specification.  After the specification is published,
195
 *  this number is incremented in order "YY" = 00, 01, 02... according to
196
 *  version upgrades.  The first digit of "YY" is 'A', 'B' or 'C' for draft
197
 *  standard versions and test versions within the TRON Association before the
198
 *  specification have been published.
199
 *
200
 *  The "X.YY" part of the specification version numbers is returned by spver
201
 *  to get_ver system call.  The corresponding hexadecimal value is used when
202
 *  "YY" includes 'A', 'B' or 'C'.
203
 *
204
 *  "ZZ" represents a number used to distinguish versions related to the written
205
 *  style of a specification.  This number is incremented in order
206
 *  "ZZ" = 00, 01, 02... when there have been changes in specification
207
 *  configuration, reordering of chapters or corrections of misprints.
208
 *  When a further distinction of the written style of specifications is
209
 *  desired, ".WW" may be added optionally after "ZZ".  WW will be assumed
210
 *  to be zero if ".WW" is omitted.
211
 */
212
 
213
/*
214
 *  Reference System (ref_sys) Structure
215
 */
216
 
217
typedef struct t_rsys {
218
  INT   sysstat;   /* system state */
219
  /* additional information may be included depending on the implementation */
220
} T_RSYS;
221
 
222
/*
223
 *  sysstat
224
 */
225
 
226
#define TSS_TSK    0   /* normal state in which dispatching is enabled during
227
                          task portion execution */
228
#define TSS_DDSP   1   /* state after dis_dsp has been executed during task
229
                          portion execution (dispatch disabled) */
230
#define TSS_LOC    3   /* state after loc_cpu has been executed during task
231
                          portion execution (interrupt and dispatch disabled)
232
                          */
233
#define TSS_INDP   4   /* state during execution of task-independent portions
234
                          (interrupt and timer handlers) */
235
 
236
/*
237
 *  Reference Configuration (ref_cfg) Structure
238
 */
239
 
240
typedef struct t_rcfg {
241
  /* details concerning members are implementation dependent */
242
} T_RCFG;
243
 
244
/*
245
 *  Define Service (def_svc) Structure
246
 */
247
 
248
typedef struct t_dsvc {
249
  ATR   svcatr;   /* extended SVC handler attributes */
250
  FP    svchdr;   /* extended SVC handler address */
251
  /* additional information may be included depending on the implementation */
252
} T_DSVC;
253
 
254
/*
255
 *  Define Exception (def_exc) Structure
256
 */
257
 
258
typedef struct t_dexc {
259
  ATR   excatr;   /* exception handler attributes */
260
  FP    exchdr;   /* exception handler address */
261
  /* additional information may be included depending on the implementation */
262
} T_DEXC;
263
 
264
/*
265
 *  System Management Functions
266
 */
267
 
268
/*
269
 *  get_ver - Get Version Information
270
 */
271
 
272
ER get_ver(
273
  T_VER *pk_ver
274
);
275
 
276
/*
277
 *  ref_sys - Reference Semaphore Status
278
 */
279
 
280
ER ref_sys(
281
  T_RSYS *pk_rsys
282
);
283
 
284
/*
285
 *  ref_cfg - Reference Configuration Information
286
 */
287
 
288
ER ref_cfg(
289
  T_RCFG *pk_rcfg
290
);
291
 
292
/*
293
 *  def_svc - Define Extended SVC Handler
294
 */
295
 
296
ER def_svc(
297
  FN s_fncd,
298
  T_DSVC *pk_dsvc
299
);
300
 
301
/*
302
 *  def_exc - Define Exception Handler
303
 */
304
 
305
ER def_exc(
306
  UINT exckind,
307
  T_DEXC *pk_dexc
308
);
309
 
310
 
311
 
312
 
313
#ifdef __cplusplus
314
}
315
#endif
316
 
317
#endif
318
/* end of include file */
319
 

powered by: WebSVN 2.1.0

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