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