Home | History | Annotate | Download | only in asm
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      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.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #undef VOYAGER_DEBUG
     13 #undef VOYAGER_CAT_DEBUG
     14 
     15 #ifdef VOYAGER_DEBUG
     16 #define VDEBUG(x) printk x
     17 #else
     18 #define VDEBUG(x)
     19 #endif
     20 
     21 #define VOYAGER_LEVEL5_AND_ABOVE 0x3435
     22 #define VOYAGER_LEVEL4 0x3360
     23 
     24 #define VOYAGER_DINO 0x43
     25 
     26 #define VOYAGER_MC_SETUP 0x96
     27 
     28 #define VOYAGER_CAT_CONFIG_PORT 0x97
     29 #define VOYAGER_CAT_DESELECT 0xff
     30 #define VOYAGER_SSPB_RELOCATION_PORT 0x98
     31 
     32 #define VOYAGER_CAT_IRCYC 0x01
     33 
     34 #define VOYAGER_CAT_DRCYC 0x02
     35 
     36 #define VOYAGER_CAT_RUN 0x0F
     37 
     38 #define VOYAGER_CAT_END 0x80
     39 
     40 #define VOYAGER_CAT_HOLD 0x90
     41 
     42 #define VOYAGER_CAT_STEP 0xE0
     43 
     44 #define VOYAGER_CAT_CLEMSON 0xFF
     45 
     46 #define VOYAGER_CAT_HEADER 0x7F
     47 
     48 #define VOYAGER_MIN_MODULE 0x10
     49 #define VOYAGER_MAX_MODULE 0x1f
     50 
     51 #define VOYAGER_ASIC_ID_REG 0x00
     52 #define VOYAGER_ASIC_TYPE_REG 0x01
     53 
     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
     65 
     66 #define VOYAGER_SUBADDR_LO 0xff
     67 #define VOYAGER_SUBADDR_HI 0xffff
     68 
     69 #define VOYAGER_MAX_SCAN_PATH 0x100
     70 
     71 #define VOYAGER_MAX_REG_SIZE 4
     72 
     73 #define VOYAGER_MAX_MODULES 16
     74 
     75 #define VOYAGER_MAX_ASICS_PER_MODULE 7
     76 
     77 #define VOYAGER_CAT_ID 0
     78 #define VOYAGER_PSI 0x1a
     79 
     80 #define VOYAGER_READ_CONFIG 0x1
     81 #define VOYAGER_WRITE_CONFIG 0x2
     82 #define VOYAGER_BYPASS 0xff
     83 
     84 typedef struct voyager_asic
     85 {
     86  __u8 asic_addr;
     87  __u8 asic_type;
     88  __u8 asic_id;
     89  __u8 jtag_id[4];
     90  __u8 asic_location;
     91  __u8 bit_location;
     92  __u8 ireg_length;
     93  __u16 subaddr;
     94  struct voyager_asic *next;
     95 } voyager_asic_t;
     96 
     97 typedef struct voyager_module {
     98  __u8 module_addr;
     99  __u8 scan_path_connected;
    100  __u16 ee_size;
    101  __u16 num_asics;
    102  __u16 inst_bits;
    103  __u16 largest_reg;
    104  __u16 smallest_reg;
    105  voyager_asic_t *asic;
    106  struct voyager_module *submodule;
    107  struct voyager_module *next;
    108 } voyager_module_t;
    109 
    110 typedef struct voyager_eeprom_hdr {
    111  __u8 module_id[4];
    112  __u8 version_id;
    113  __u8 config_id;
    114  __u16 boundry_id;
    115  __u16 ee_size;
    116  __u8 assembly[11];
    117  __u8 assembly_rev;
    118  __u8 tracer[4];
    119  __u16 assembly_cksum;
    120  __u16 power_consump;
    121  __u16 num_asics;
    122  __u16 bist_time;
    123  __u16 err_log_offset;
    124  __u16 scan_path_offset;
    125  __u16 cct_offset;
    126  __u16 log_length;
    127  __u16 xsum_end;
    128  __u8 reserved[4];
    129  __u8 sflag;
    130  __u8 part_number[13];
    131  __u8 version[10];
    132  __u8 signature[8];
    133  __u16 eeprom_chksum;
    134  __u32 data_stamp_offset;
    135  __u8 eflag ;
    136 } __attribute__((packed)) voyager_eprom_hdr_t;
    137 
    138 #define VOYAGER_EPROM_SIZE_OFFSET ((__u16)(&(((voyager_eprom_hdr_t *)0)->ee_size)))
    139 #define VOYAGER_XSUM_END_OFFSET 0x2a
    140 
    141 typedef struct voyager_sp_table {
    142  __u8 asic_id;
    143  __u8 bypass_flag;
    144  __u16 asic_data_offset;
    145  __u16 config_data_offset;
    146 } __attribute__((packed)) voyager_sp_table_t;
    147 
    148 typedef struct voyager_jtag_table {
    149  __u8 icode[4];
    150  __u8 runbist[4];
    151  __u8 intest[4];
    152  __u8 samp_preld[4];
    153  __u8 ireg_len;
    154 } __attribute__((packed)) voyager_jtt_t;
    155 
    156 typedef struct voyager_asic_data_table {
    157  __u8 jtag_id[4];
    158  __u16 length_bsr;
    159  __u16 length_bist_reg;
    160  __u32 bist_clk;
    161  __u16 subaddr_bits;
    162  __u16 seed_bits;
    163  __u16 sig_bits;
    164  __u16 jtag_offset;
    165 } __attribute__((packed)) voyager_at_t;
    166 
    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
    175 
    176 #define VOYAGER_WCBIC_TOM_L 0x4
    177 #define VOYAGER_WCBIC_TOM_H 0x5
    178 
    179 #define VOYAGER_VMC1 0x81
    180 #define VOYAGER_VMC2 0x91
    181 #define VOYAGER_VMC3 0xa1
    182 #define VOYAGER_VMC4 0xb1
    183 
    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
    201 
    202 #define VOYAGER_MMC_ASIC_ID 1
    203 
    204 #define VOYAGER_MMC_MEMORY0_MODULE 0x14
    205 #define VOYAGER_MMC_MEMORY1_MODULE 0x15
    206 
    207 #define VOYAGER_MMA_ASIC_ID 2
    208 
    209 #define VOYAGER_QUAD_BASEBOARD 1
    210 
    211 #define VOYAGER_QUAD_QDATA0 1
    212 #define VOYAGER_QUAD_QDATA1 2
    213 #define VOYAGER_QUAD_QABC 3
    214 
    215 #define VOYAGER_PROCESSOR_PRESENT_MASK 0x88a
    216 #define VOYAGER_MEMORY_CLICKMAP 0xa23
    217 #define VOYAGER_DUMP_LOCATION 0xb1a
    218 
    219 #define VOYAGER_SUS_IN_CONTROL_PORT 0x3ff
    220 #define VOYAGER_IN_CONTROL_FLAG 0x80
    221 
    222 #define VOYAGER_PSI_STATUS_REG 0x08
    223 #define PSI_DC_FAIL 0x01
    224 #define PSI_MON 0x02
    225 #define PSI_FAULT 0x04
    226 #define PSI_ALARM 0x08
    227 #define PSI_CURRENT 0x10
    228 #define PSI_DVM 0x20
    229 #define PSI_PSCFAULT 0x40
    230 #define PSI_STAT_CHG 0x80
    231 
    232 #define VOYAGER_PSI_SUPPLY_REG 0x8000
    233 
    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
    242 
    243 #define PSI_CLR_SWITCH_OFF 0x13
    244 #define PSI_CLR_HX_OFF 0x14
    245 #define PSI_CLR_CMOS_BATT_FAIL 0x17
    246 
    247 #define VOYAGER_PSI_MASK 0x8001
    248 #define PSI_MASK_MASK 0x10
    249 
    250 #define VOYAGER_PSI_AC_FAIL_REG 0x8004
    251 #define AC_FAIL_STAT_CHANGE 0x80
    252 
    253 #define VOYAGER_PSI_GENERAL_REG 0x8007
    254 
    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
    261 
    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
    272 
    273 struct voyager_bios_info {
    274  __u8 len;
    275  __u8 major;
    276  __u8 minor;
    277  __u8 debug;
    278  __u8 num_classes;
    279  __u8 class_1;
    280  __u8 class_2;
    281 };
    282 
    283 #define NUMBER_OF_MC_BUSSES 2
    284 #define SLOTS_PER_MC_BUS 8
    285 #define MAX_CPUS 16
    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
    290 
    291 typedef struct {
    292  __u8 MC_Slot;
    293  __u8 POS_Values[NUMBER_OF_POS_REGS];
    294 } __attribute__((packed)) MC_SlotInformation_t;
    295 
    296 struct QuadDescription {
    297  __u8 Type;
    298  __u8 StructureVersion;
    299  __u32 CPI_BaseAddress;
    300  __u32 LARC_BankSize;
    301  __u32 LocalMemoryStateBits;
    302  __u8 Slot;
    303 } __attribute__((packed));
    304 
    305 struct ProcBoardInfo {
    306  __u8 Type;
    307  __u8 StructureVersion;
    308  __u8 NumberOfBoards;
    309  struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS];
    310 } __attribute__((packed));
    311 
    312 struct CacheDescription {
    313  __u8 Level;
    314  __u32 TotalSize;
    315  __u16 LineSize;
    316  __u8 Associativity;
    317  __u8 CacheType;
    318  __u8 WriteType;
    319  __u8 Number_CPUs_SharedBy;
    320  __u8 Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS];
    321 
    322 } __attribute__((packed));
    323 
    324 struct CPU_Description {
    325  __u8 CPU_HardwareId;
    326  char *FRU_String;
    327  __u8 NumberOfCacheLevels;
    328  struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS];
    329 } __attribute__((packed));
    330 
    331 struct CPU_Info {
    332  __u8 Type;
    333  __u8 StructureVersion;
    334  __u8 NumberOf_CPUs;
    335  struct CPU_Description CPU_Data[MAX_CPUS];
    336 } __attribute__((packed));
    337 
    338 typedef struct {
    339  __u8 Mailbox_SUS;
    340  __u8 Mailbox_OS;
    341  __u8 SUS_MailboxVersion;
    342  __u8 OS_MailboxVersion;
    343  __u32 OS_Flags;
    344  __u32 SUS_Flags;
    345  __u32 WatchDogPeriod;
    346  __u32 WatchDogCount;
    347  __u32 MemoryFor_SUS_ErrorLog;
    348  MC_SlotInformation_t MC_SlotInfo[NUMBER_OF_MC_BUSSES*SLOTS_PER_MC_BUS];
    349 
    350  struct ProcBoardInfo *BoardData;
    351  struct CPU_Info *CPU_Data;
    352 
    353 } Voyager_KernelSUS_Mbox_t;
    354 
    355 struct voyager_qic_cpi {
    356 
    357  struct {
    358  __u32 pad1[3];
    359  __u32 cpi;
    360  __u32 pad2[4];
    361  } qic_cpi[8];
    362 };
    363 
    364 struct voyager_status {
    365  __u32 power_fail:1;
    366  __u32 switch_off:1;
    367  __u32 request_from_kernel:1;
    368 };
    369 
    370 struct voyager_psi_regs {
    371  __u8 cat_id;
    372  __u8 cat_dev;
    373  __u8 cat_control;
    374  __u8 subaddr;
    375  __u8 dummy4;
    376  __u8 checkbit;
    377  __u8 subaddr_low;
    378  __u8 subaddr_high;
    379  __u8 intstatus;
    380  __u8 stat1;
    381  __u8 stat3;
    382  __u8 fault;
    383  __u8 tms;
    384  __u8 gen;
    385  __u8 sysconf;
    386  __u8 dummy15;
    387 };
    388 
    389 struct voyager_psi_subregs {
    390  __u8 supply;
    391  __u8 mask;
    392  __u8 present;
    393  __u8 DCfail;
    394  __u8 ACfail;
    395  __u8 fail;
    396  __u8 UPSfail;
    397  __u8 genstatus;
    398 };
    399 
    400 struct voyager_psi {
    401  struct voyager_psi_regs regs;
    402  struct voyager_psi_subregs subregs;
    403 };
    404 
    405 struct voyager_SUS {
    406 #define VOYAGER_DUMP_BUTTON_NMI 0x1
    407 #define VOYAGER_SUS_VALID 0x2
    408 #define VOYAGER_SYSINT_COMPLETE 0x3
    409  __u8 SUS_mbox;
    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
    416  __u8 kernel_mbox;
    417 #define VOYAGER_MAILBOX_VERSION 0x10
    418  __u8 SUS_version;
    419  __u8 kernel_version;
    420 #define VOYAGER_OS_HAS_SYSINT 0x1
    421 #define VOYAGER_OS_IN_PROGRESS 0x2
    422 #define VOYAGER_UPDATING_WDPERIOD 0x4
    423  __u32 kernel_flags;
    424 #define VOYAGER_SUS_BOOTING 0x1
    425 #define VOYAGER_SUS_IN_PROGRESS 0x2
    426  __u32 SUS_flags;
    427  __u32 watchdog_period;
    428  __u32 watchdog_count;
    429  __u32 SUS_errorlog;
    430 
    431 };
    432 
    433 #define VOYAGER_PSI_READ 0
    434 #define VOYAGER_PSI_WRITE 1
    435 #define VOYAGER_PSI_SUBREAD 2
    436 #define VOYAGER_PSI_SUBWRITE 3
    437 
    438