1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
13 #undef VOYAGER_CAT_DEBUG
16 #define VDEBUG(x) printk x
21 #define VOYAGER_LEVEL5_AND_ABOVE 0x3435
22 #define VOYAGER_LEVEL4 0x3360
24 #define VOYAGER_DINO 0x43
26 #define VOYAGER_MC_SETUP 0x96
28 #define VOYAGER_CAT_CONFIG_PORT 0x97
29 #define VOYAGER_CAT_DESELECT 0xff
30 #define VOYAGER_SSPB_RELOCATION_PORT 0x98
32 #define VOYAGER_CAT_IRCYC 0x01
34 #define VOYAGER_CAT_DRCYC 0x02
36 #define VOYAGER_CAT_RUN 0x0F
38 #define VOYAGER_CAT_END 0x80
40 #define VOYAGER_CAT_HOLD 0x90
42 #define VOYAGER_CAT_STEP 0xE0
44 #define VOYAGER_CAT_CLEMSON 0xFF
46 #define VOYAGER_CAT_HEADER 0x7F
48 #define VOYAGER_MIN_MODULE 0x10
49 #define VOYAGER_MAX_MODULE 0x1f
51 #define VOYAGER_ASIC_ID_REG 0x00
52 #define VOYAGER_ASIC_TYPE_REG 0x01
54 #define VOYAGER_AUTO_INC_REG 0x02
55 #define VOYAGER_AUTO_INC 0x04
56 #define VOYAGER_NO_AUTO_INC 0xfb
57 #define VOYAGER_SUBADDRDATA 0x03
58 #define VOYAGER_SCANPATH 0x05
59 #define VOYAGER_CONNECT_ASIC 0x01
60 #define VOYAGER_DISCONNECT_ASIC 0xfe
61 #define VOYAGER_SUBADDRLO 0x06
62 #define VOYAGER_SUBADDRHI 0x07
63 #define VOYAGER_SUBMODSELECT 0x08
64 #define VOYAGER_SUBMODPRESENT 0x09
66 #define VOYAGER_SUBADDR_LO 0xff
67 #define VOYAGER_SUBADDR_HI 0xffff
69 #define VOYAGER_MAX_SCAN_PATH 0x100
71 #define VOYAGER_MAX_REG_SIZE 4
73 #define VOYAGER_MAX_MODULES 16
75 #define VOYAGER_MAX_ASICS_PER_MODULE 7
77 #define VOYAGER_CAT_ID 0
78 #define VOYAGER_PSI 0x1a
80 #define VOYAGER_READ_CONFIG 0x1
81 #define VOYAGER_WRITE_CONFIG 0x2
82 #define VOYAGER_BYPASS 0xff
84 typedef struct voyager_asic
94 struct voyager_asic *next;
97 typedef struct voyager_module {
99 __u8 scan_path_connected;
105 voyager_asic_t *asic;
106 struct voyager_module *submodule;
107 struct voyager_module *next;
110 typedef struct voyager_eeprom_hdr {
119 __u16 assembly_cksum;
123 __u16 err_log_offset;
124 __u16 scan_path_offset;
130 __u8 part_number[13];
134 __u32 data_stamp_offset;
136 } __attribute__((packed)) voyager_eprom_hdr_t;
138 #define VOYAGER_EPROM_SIZE_OFFSET ((__u16)(&(((voyager_eprom_hdr_t *)0)->ee_size)))
139 #define VOYAGER_XSUM_END_OFFSET 0x2a
141 typedef struct voyager_sp_table {
144 __u16 asic_data_offset;
145 __u16 config_data_offset;
146 } __attribute__((packed)) voyager_sp_table_t;
148 typedef struct voyager_jtag_table {
154 } __attribute__((packed)) voyager_jtt_t;
156 typedef struct voyager_asic_data_table {
159 __u16 length_bist_reg;
165 } __attribute__((packed)) voyager_at_t;
167 #define VOYAGER_WCBIC0 0x41
168 #define VOYAGER_WCBIC1 0x49
169 #define VOYAGER_WCBIC2 0x51
170 #define VOYAGER_WCBIC3 0x59
171 #define VOYAGER_WCBIC4 0x61
172 #define VOYAGER_WCBIC5 0x69
173 #define VOYAGER_WCBIC6 0x71
174 #define VOYAGER_WCBIC7 0x79
176 #define VOYAGER_WCBIC_TOM_L 0x4
177 #define VOYAGER_WCBIC_TOM_H 0x5
179 #define VOYAGER_VMC1 0x81
180 #define VOYAGER_VMC2 0x91
181 #define VOYAGER_VMC3 0xa1
182 #define VOYAGER_VMC4 0xb1
184 #define VOYAGER_VMC_MEMORY_SETUP 0x9
185 #define VMC_Interleaving 0x01
186 #define VMC_4Way 0x02
187 #define VMC_EvenCacheLines 0x04
188 #define VMC_HighLine 0x08
189 #define VMC_Start0_Enable 0x20
190 #define VMC_Start1_Enable 0x40
191 #define VMC_Vremap 0x80
192 #define VOYAGER_VMC_BANK_DENSITY 0xa
193 #define VMC_BANK_EMPTY 0
194 #define VMC_BANK_4MB 1
195 #define VMC_BANK_16MB 2
196 #define VMC_BANK_64MB 3
197 #define VMC_BANK0_MASK 0x03
198 #define VMC_BANK1_MASK 0x0C
199 #define VMC_BANK2_MASK 0x30
200 #define VMC_BANK3_MASK 0xC0
202 #define VOYAGER_MMC_ASIC_ID 1
204 #define VOYAGER_MMC_MEMORY0_MODULE 0x14
205 #define VOYAGER_MMC_MEMORY1_MODULE 0x15
207 #define VOYAGER_MMA_ASIC_ID 2
209 #define VOYAGER_QUAD_BASEBOARD 1
211 #define VOYAGER_QUAD_QDATA0 1
212 #define VOYAGER_QUAD_QDATA1 2
213 #define VOYAGER_QUAD_QABC 3
215 #define VOYAGER_PROCESSOR_PRESENT_MASK 0x88a
216 #define VOYAGER_MEMORY_CLICKMAP 0xa23
217 #define VOYAGER_DUMP_LOCATION 0xb1a
219 #define VOYAGER_SUS_IN_CONTROL_PORT 0x3ff
220 #define VOYAGER_IN_CONTROL_FLAG 0x80
222 #define VOYAGER_PSI_STATUS_REG 0x08
223 #define PSI_DC_FAIL 0x01
225 #define PSI_FAULT 0x04
226 #define PSI_ALARM 0x08
227 #define PSI_CURRENT 0x10
229 #define PSI_PSCFAULT 0x40
230 #define PSI_STAT_CHG 0x80
232 #define VOYAGER_PSI_SUPPLY_REG 0x8000
234 #define PSI_FAIL_DC 0x01
235 #define PSI_FAIL_AC 0x02
236 #define PSI_MON_INT 0x04
237 #define PSI_SWITCH_OFF 0x08
238 #define PSI_HX_OFF 0x10
239 #define PSI_SECURITY 0x20
240 #define PSI_CMOS_BATT_LOW 0x40
241 #define PSI_CMOS_BATT_FAIL 0x80
243 #define PSI_CLR_SWITCH_OFF 0x13
244 #define PSI_CLR_HX_OFF 0x14
245 #define PSI_CLR_CMOS_BATT_FAIL 0x17
247 #define VOYAGER_PSI_MASK 0x8001
248 #define PSI_MASK_MASK 0x10
250 #define VOYAGER_PSI_AC_FAIL_REG 0x8004
251 #define AC_FAIL_STAT_CHANGE 0x80
253 #define VOYAGER_PSI_GENERAL_REG 0x8007
255 #define PSI_SWITCH_ON 0x01
256 #define PSI_SWITCH_ENABLED 0x02
257 #define PSI_ALARM_ENABLED 0x08
258 #define PSI_SECURE_ENABLED 0x10
259 #define PSI_COLD_RESET 0x20
260 #define PSI_COLD_START 0x80
262 #define PSI_POWER_DOWN 0x10
263 #define PSI_SWITCH_DISABLE 0x01
264 #define PSI_SWITCH_ENABLE 0x11
265 #define PSI_CLEAR 0x12
266 #define PSI_ALARM_DISABLE 0x03
267 #define PSI_ALARM_ENABLE 0x13
268 #define PSI_CLEAR_COLD_RESET 0x05
269 #define PSI_SET_COLD_RESET 0x15
270 #define PSI_CLEAR_COLD_START 0x07
271 #define PSI_SET_COLD_START 0x17
273 struct voyager_bios_info {
283 #define NUMBER_OF_MC_BUSSES 2
284 #define SLOTS_PER_MC_BUS 8
286 #define MAX_PROCESSOR_BOARDS 4
287 #define MAX_CACHE_LEVELS 4
288 #define MAX_SHARED_CPUS 4
289 #define NUMBER_OF_POS_REGS 8
293 __u8 POS_Values[NUMBER_OF_POS_REGS];
294 } __attribute__((packed)) MC_SlotInformation_t;
296 struct QuadDescription {
298 __u8 StructureVersion;
299 __u32 CPI_BaseAddress;
301 __u32 LocalMemoryStateBits;
303 } __attribute__((packed));
305 struct ProcBoardInfo {
307 __u8 StructureVersion;
309 struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS];
310 } __attribute__((packed));
312 struct CacheDescription {
319 __u8 Number_CPUs_SharedBy;
320 __u8 Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS];
322 } __attribute__((packed));
324 struct CPU_Description {
327 __u8 NumberOfCacheLevels;
328 struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS];
329 } __attribute__((packed));
333 __u8 StructureVersion;
335 struct CPU_Description CPU_Data[MAX_CPUS];
336 } __attribute__((packed));
341 __u8 SUS_MailboxVersion;
342 __u8 OS_MailboxVersion;
345 __u32 WatchDogPeriod;
347 __u32 MemoryFor_SUS_ErrorLog;
348 MC_SlotInformation_t MC_SlotInfo[NUMBER_OF_MC_BUSSES*SLOTS_PER_MC_BUS];
350 struct ProcBoardInfo *BoardData;
351 struct CPU_Info *CPU_Data;
353 } Voyager_KernelSUS_Mbox_t;
355 struct voyager_qic_cpi {
364 struct voyager_status {
367 __u32 request_from_kernel:1;
370 struct voyager_psi_regs {
389 struct voyager_psi_subregs {
401 struct voyager_psi_regs regs;
402 struct voyager_psi_subregs subregs;
406 #define VOYAGER_DUMP_BUTTON_NMI 0x1
407 #define VOYAGER_SUS_VALID 0x2
408 #define VOYAGER_SYSINT_COMPLETE 0x3
410 #define VOYAGER_NO_COMMAND 0x0
411 #define VOYAGER_IGNORE_DUMP 0x1
412 #define VOYAGER_DO_DUMP 0x2
413 #define VOYAGER_SYSINT_HANDSHAKE 0x3
414 #define VOYAGER_DO_MEM_DUMP 0x4
415 #define VOYAGER_SYSINT_WAS_RECOVERED 0x5
417 #define VOYAGER_MAILBOX_VERSION 0x10
420 #define VOYAGER_OS_HAS_SYSINT 0x1
421 #define VOYAGER_OS_IN_PROGRESS 0x2
422 #define VOYAGER_UPDATING_WDPERIOD 0x4
424 #define VOYAGER_SUS_BOOTING 0x1
425 #define VOYAGER_SUS_IN_PROGRESS 0x2
427 __u32 watchdog_period;
428 __u32 watchdog_count;
433 #define VOYAGER_PSI_READ 0
434 #define VOYAGER_PSI_WRITE 1
435 #define VOYAGER_PSI_SUBREAD 2
436 #define VOYAGER_PSI_SUBWRITE 3