9ae8feb80de781a4650d2be191a9f2355462b711
[linux-flexiantxendom0-3.2.10.git] / include / asm-ia64 / sn / arc / hinv.h
1 /*
2  *
3  * This file is subject to the terms and conditions of the GNU General Public
4  * License.  See the file "COPYING" in the main directory of this archive
5  * for more details.
6  *
7  * Copyright (C) 2000-2001 Silicon Graphics, Inc. All rights reserved.
8  */
9
10
11 /* $Id$
12  *
13  * ARCS hardware/memory inventory/configuration and system ID definitions.
14  */
15 #ifndef _ASM_SN_ARC_HINV_H
16 #define _ASM_SN_ARC_HINV_H
17
18 #include <asm/sn/arc/types.h>
19
20 /* configuration query defines */
21 typedef enum configclass {
22         SystemClass,
23         ProcessorClass,
24         CacheClass,
25 #ifndef _NT_PROM
26         MemoryClass,
27         AdapterClass,
28         ControllerClass,
29         PeripheralClass
30 #else   /* _NT_PROM */
31         AdapterClass,
32         ControllerClass,
33         PeripheralClass,
34         MemoryClass
35 #endif  /* _NT_PROM */
36 } CONFIGCLASS;
37
38 typedef enum configtype {
39         ARC,
40         CPU,
41         FPU,
42         PrimaryICache,
43         PrimaryDCache,
44         SecondaryICache,
45         SecondaryDCache,
46         SecondaryCache,
47 #ifndef _NT_PROM
48         Memory,
49 #endif
50         EISAAdapter,
51         TCAdapter,
52         SCSIAdapter,
53         DTIAdapter,
54         MultiFunctionAdapter,
55         DiskController,
56         TapeController,
57         CDROMController,
58         WORMController,
59         SerialController,
60         NetworkController,
61         DisplayController,
62         ParallelController,
63         PointerController,
64         KeyboardController,
65         AudioController,
66         OtherController,
67         DiskPeripheral,
68         FloppyDiskPeripheral,
69         TapePeripheral,
70         ModemPeripheral,
71         MonitorPeripheral,
72         PrinterPeripheral,
73         PointerPeripheral,
74         KeyboardPeripheral,
75         TerminalPeripheral,
76         LinePeripheral,
77         NetworkPeripheral,
78 #ifdef  _NT_PROM
79         Memory,
80 #endif
81         OtherPeripheral,
82
83         /* new stuff for IP30 */
84         /* added without moving anything */
85         /* except ANONYMOUS. */
86
87         XTalkAdapter,
88         PCIAdapter,
89         GIOAdapter,
90         TPUAdapter,
91         TernaryCache,
92         Anonymous
93 } CONFIGTYPE;
94
95 typedef enum {
96         Failed = 1,
97         ReadOnly = 2,
98         Removable = 4,
99         ConsoleIn = 8,
100         ConsoleOut = 16,
101         Input = 32,
102         Output = 64
103 } IDENTIFIERFLAG;
104
105 #ifndef NULL                    /* for GetChild(NULL); */
106 #define NULL    0
107 #endif
108
109 union key_u {
110         struct {
111 #ifdef  _MIPSEB
112                 unsigned char  c_bsize;         /* block size in lines */
113                 unsigned char  c_lsize;         /* line size in bytes/tag */
114                 unsigned short c_size;          /* cache size in 4K pages */
115 #else   /* _MIPSEL */
116                 unsigned short c_size;          /* cache size in 4K pages */
117                 unsigned char  c_lsize;         /* line size in bytes/tag */
118                 unsigned char  c_bsize;         /* block size in lines */
119 #endif  /* _MIPSEL */
120         } cache;
121         ULONG FullKey;
122 };
123
124 #if _MIPS_SIM == _ABI64
125 #define SGI_ARCS_VERS   64                      /* sgi 64-bit version */
126 #define SGI_ARCS_REV    0                       /* rev .00 */
127 #else
128 #define SGI_ARCS_VERS   1                       /* first version */
129 #define SGI_ARCS_REV    10                      /* rev .10, 3/04/92 */
130 #endif
131
132 typedef struct component {
133         CONFIGCLASS     Class;
134         CONFIGTYPE      Type;
135         IDENTIFIERFLAG  Flags;
136         USHORT          Version;
137         USHORT          Revision;
138         ULONG           Key;
139         ULONG           AffinityMask;
140         ULONG           ConfigurationDataSize;
141         ULONG           IdentifierLength;
142         char            *Identifier;
143 } COMPONENT;
144
145 /* internal structure that holds pathname parsing data */
146 struct cfgdata {
147         char *name;                     /* full name */
148         int minlen;                     /* minimum length to match */
149         CONFIGTYPE type;                /* type of token */
150 };
151
152 /* System ID */
153 typedef struct systemid {
154         CHAR VendorId[8];
155         CHAR ProductId[8];
156 } SYSTEMID;
157
158 /* memory query functions */
159 typedef enum memorytype {
160         ExceptionBlock,
161         SPBPage,                        /* ARCS == SystemParameterBlock */
162 #ifndef _NT_PROM
163         FreeContiguous,
164         FreeMemory,
165         BadMemory,
166         LoadedProgram,
167         FirmwareTemporary,
168         FirmwarePermanent
169 #else   /* _NT_PROM */
170         FreeMemory,
171         BadMemory,
172         LoadedProgram,
173         FirmwareTemporary,
174         FirmwarePermanent,
175         FreeContiguous
176 #endif  /* _NT_PROM */
177 } MEMORYTYPE;
178
179 typedef struct memorydescriptor {
180         MEMORYTYPE      Type;
181         LONG            BasePage;
182         LONG            PageCount;
183 } MEMORYDESCRIPTOR;
184
185 #endif /* _ASM_SN_ARC_HINV_H */