📄 gdth.h
字号:
unchar striping; /* Striping (RAID-0) supp. */ unchar mirroring; /* Mirroring (RAID-1) supp. */ unchar raid; /* RAID-4/5/10 supported */} PACKED gdth_bfeat_str;/* board info IOCTL */typedef struct { ulong32 ser_no; /* serial no. */ unchar oem_id[2]; /* OEM ID */ ushort ep_flags; /* eprom flags */ ulong32 proc_id; /* processor ID */ ulong32 memsize; /* memory size (bytes) */ unchar mem_banks; /* memory banks */ unchar chan_type; /* channel type */ unchar chan_count; /* channel count */ unchar rdongle_pres; /* dongle present? */ ulong32 epr_fw_ver; /* (eprom) firmware version */ ulong32 upd_fw_ver; /* (update) firmware version */ ulong32 upd_revision; /* update revision */ char type_string[16]; /* controller name */ char raid_string[16]; /* RAID firmware name */ unchar update_pres; /* update present? */ unchar xor_pres; /* XOR engine present? */ unchar prom_type; /* ROM type (eprom/flash) */ unchar prom_count; /* number of ROM devices */ ulong32 dup_pres; /* duplexing module present? */ ulong32 chan_pres; /* number of expansion chn. */ ulong32 mem_pres; /* memory expansion inst. ? */ unchar ft_bus_system; /* fault bus supported? */ unchar subtype_valid; /* board_subtype valid? */ unchar board_subtype; /* subtype/hardware level */ unchar ramparity_pres; /* RAM parity check hardware? */} PACKED gdth_binfo_str; /* get host drive info */typedef struct { char name[8]; /* host drive name */ ulong32 size; /* size (sectors) */ unchar host_drive; /* host drive number */ unchar log_drive; /* log. drive (master) */ unchar reserved; unchar rw_attribs; /* r/w attribs */ ulong32 start_sec; /* start sector */} PACKED gdth_hentry_str;typedef struct { ulong32 entries; /* entry count */ ulong32 offset; /* offset of entries */ unchar secs_p_head; /* sectors/head */ unchar heads_p_cyl; /* heads/cylinder */ unchar reserved; unchar clust_drvtype; /* cluster drive type */ ulong32 location; /* controller number */ gdth_hentry_str entry[MAX_HDRIVES]; /* entries */} PACKED gdth_hget_str; /* scatter/gather element */typedef struct { ulong32 sg_ptr; /* address */ ulong32 sg_len; /* length */} PACKED gdth_sg_str;/* command structure */typedef struct { ulong32 BoardNode; /* board node (always 0) */ ulong32 CommandIndex; /* command number */ ushort OpCode; /* the command (READ,..) */ union { struct { ushort DeviceNo; /* number of cache drive */ ulong32 BlockNo; /* block number */ ulong32 BlockCnt; /* block count */ ulong32 DestAddr; /* dest. addr. (if s/g: -1) */ ulong32 sg_canz; /* s/g element count */ gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */ } PACKED cache; /* cache service cmd. str. */ struct { ushort param_size; /* size of p_param buffer */ ulong32 subfunc; /* IOCTL function */ ulong32 channel; /* device */ ulong32 p_param; /* buffer */ } PACKED ioctl; /* IOCTL command structure */ struct { ushort reserved; ulong32 msg_handle; /* message handle */ ulong32 msg_addr; /* message buffer address */ } PACKED screen; /* screen service cmd. str. */ struct { ushort reserved; ulong32 direction; /* data direction */ ulong32 mdisc_time; /* disc. time (0: no timeout)*/ ulong32 mcon_time; /* connect time(0: no to.) */ ulong32 sdata; /* dest. addr. (if s/g: -1) */ ulong32 sdlen; /* data length (bytes) */ ulong32 clen; /* SCSI cmd. length(6,10,12) */ unchar cmd[12]; /* SCSI command */ unchar target; /* target ID */ unchar lun; /* LUN */ unchar bus; /* SCSI bus number */ unchar priority; /* only 0 used */ ulong32 sense_len; /* sense data length */ ulong32 sense_data; /* sense data addr. */ struct raw *link_p; /* linked cmds (not supp.) */ ulong32 sg_ranz; /* s/g element count */ gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */ } PACKED raw; /* raw service cmd. struct. */ } u; /* additional variables */ unchar Service; /* controller service */ ushort Status; /* command result */ ulong32 Info; /* additional information */ Scsi_Cmnd *RequestBuffer; /* request buffer */} PACKED gdth_cmd_str;/* controller event structure */#define ES_ASYNC 1#define ES_DRIVER 2#define ES_TEST 3#define ES_SYNC 4typedef struct { ushort size; /* size of structure */ union { char stream[16]; struct { ushort ionode; ushort service; ulong32 index; } PACKED driver; struct { ushort ionode; ushort service; ushort status; ulong32 info; unchar scsi_coord[3]; } PACKED async; struct { ushort ionode; ushort service; ushort status; ulong32 info; ushort hostdrive; unchar scsi_coord[3]; unchar sense_key; } PACKED sync; struct { ulong32 l1, l2, l3, l4; } PACKED test; } eu;} PACKED gdth_evt_data;typedef struct { ulong32 first_stamp; ulong32 last_stamp; ushort same_count; ushort event_source; ushort event_idx; unchar application; unchar reserved; gdth_evt_data event_data;} PACKED gdth_evt_str;/* DPRAM structures *//* interface area ISA/PCI */typedef struct { unchar S_Cmd_Indx; /* special command */ unchar volatile S_Status; /* status special command */ ushort reserved1; ulong32 S_Info[4]; /* add. info special command */ unchar volatile Sema0; /* command semaphore */ unchar reserved2[3]; unchar Cmd_Index; /* command number */ unchar reserved3[3]; ushort volatile Status; /* command status */ ushort Service; /* service(for async.events) */ ulong32 Info[2]; /* additional info */ struct { ushort offset; /* command offs. in the DPRAM*/ ushort serv_id; /* service */ } PACKED comm_queue[MAXOFFSETS]; /* command queue */ ulong32 bios_reserved[2]; unchar gdt_dpr_cmd[1]; /* commands */} PACKED gdt_dpr_if;/* SRAM structure PCI controllers */typedef struct { ulong32 magic; /* controller ID from BIOS */ ushort need_deinit; /* switch betw. BIOS/driver */ unchar switch_support; /* see need_deinit */ unchar padding[9]; unchar os_used[16]; /* OS code per service */ unchar unused[28]; unchar fw_magic; /* contr. ID from firmware */} PACKED gdt_pci_sram;/* SRAM structure EISA controllers (but NOT GDT3000/3020) */typedef struct { unchar os_used[16]; /* OS code per service */ ushort need_deinit; /* switch betw. BIOS/driver */ unchar switch_support; /* see need_deinit */ unchar padding;} PACKED gdt_eisa_sram;/* DPRAM ISA controllers */typedef struct { union { struct { unchar bios_used[0x3c00-32]; /* 15KB - 32Bytes BIOS */ ulong32 magic; /* controller (EISA) ID */ ushort need_deinit; /* switch betw. BIOS/driver */ unchar switch_support; /* see need_deinit */ unchar padding[9]; unchar os_used[16]; /* OS code per service */ } PACKED dp_sram; unchar bios_area[0x4000]; /* 16KB reserved for BIOS */ } bu; union { gdt_dpr_if ic; /* interface area */ unchar if_area[0x3000]; /* 12KB for interface */ } u; struct { unchar memlock; /* write protection DPRAM */ unchar event; /* release event */ unchar irqen; /* board interrupts enable */ unchar irqdel; /* acknowledge board int. */ unchar volatile Sema1; /* status semaphore */ unchar rq; /* IRQ/DRQ configuration */ } PACKED io;} PACKED gdt2_dpram_str;/* DPRAM PCI controllers */typedef struct { union { gdt_dpr_if ic; /* interface area */ unchar if_area[0xff0-sizeof(gdt_pci_sram)]; } u; gdt_pci_sram gdt6sr; /* SRAM structure */ struct { unchar unused0[1]; unchar volatile Sema1; /* command semaphore */ unchar unused1[3]; unchar irqen; /* board interrupts enable */ unchar unused2[2]; unchar event; /* release event */ unchar unused3[3]; unchar irqdel; /* acknowledge board int. */ unchar unused4[3]; } PACKED io;} PACKED gdt6_dpram_str;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -