27#define OS_LINUX_H_CVSID "$Id: os_linux.h 4842 2018-12-02 16:07:26Z chrfranke $\n"
39#define u32 unsigned int
40#define TW_OP_ATA_PASSTHRU 0x11
41#define MAX(x,y) ( (x)>(y)?(x):(y) )
56#define TW_ATA_PASS_SGL_MAX 60
86#define TW_ATA_PASSTHRU 0x1e
94 unsigned char cdb[16];
121#define TW_IOCTL_FIRMWARE_PASS_THROUGH 0x108
122#define TW_MAX_SGL_LENGTH_9000 61
227#define TW_MAX_SGL_LENGTH 62
228#define TW_CMD_PACKET_WITH_DATA 0x1f
283void my(
int x,
char *y){
284 printf(
"The size of %30s is: %5d\n",y, x);
302 printf(
"TW_Ioctl.table_id - start = %d (irrelevant)\n",
303 (
void *)&tmp.
table_id - (
void *)&tmp);
304 printf(
"TW_Ioctl.input_data - start = %d (input passthru location)\n",
306 printf(
"TW_Ioctl.output_data - start = %d (irrelevant)\n",
361#define TASKFILE_NO_DATA 0x0000
362#define TASKFILE_IN 0x0001
363#define TASKFILE_OUT 0x0004
364#define HDIO_DRIVE_TASK_HDR_SIZE 8*sizeof(task_ioreg_t)
365#define IDE_DRIVE_TASK_NO_DATA 0
366#define IDE_DRIVE_TASK_IN 2
367#define IDE_DRIVE_TASK_OUT 3
368#define HDIO_DRIVE_CMD 0x031f
369#define HDIO_DRIVE_TASK 0x031e
370#define HDIO_DRIVE_TASKFILE 0x031d
371#define HDIO_GET_IDENTITY 0x030d
373#define HPTIO_CTL 0x03ff
struct TAG_TW_Ioctl_Driver_Command_9000 TW_Ioctl_Driver_Command_9000
struct hd_drive_task_hdr task_struct_t
#define TW_ATA_PASS_SGL_MAX
struct ide_task_request_s ide_task_request_t
union ide_reg_valid_s ide_reg_valid_t
struct TAG_TW_Passthru TW_Passthru
#define TW_MAX_SGL_LENGTH
struct TAG_TW_SG_Entry TW_SG_Entry
struct TAG_TW_Ioctl TW_Ioctl
struct TAG_TW_Command_Apache TW_Command_Apache
#define TW_MAX_SGL_LENGTH_9000
struct TAG_TW_Command_Full_9000 TW_Command_Full_9000
struct TAG_TW_Ioctl_Apache TW_Ioctl_Buf_Apache
struct TAG_TW_Command_Apache_Header TW_Command_Apache_Header
struct TAG_TW_Output TW_Output
struct TAG_TW_New_Ioctl TW_New_Ioctl
unsigned char task_ioreg_t
int main(int argc, char **argv)
unsigned char sense_data[18]
unsigned char err_specific_desc[102]
struct TAG_TW_Command_Apache_Header::@61::@62 substatus_block
struct TAG_TW_Command_Apache_Header::@61 status_block
unsigned short sgl_entries
unsigned char sense_length
TW_SG_Entry sg_list[TW_MAX_SGL_LENGTH_9000]
struct TAG_TW_Command_Apache::@60 command
unsigned short request_id
union TAG_TW_Command_Full_9000::@63 command
TW_Command_Apache newcommand
TW_Command_Apache_Header header
unsigned char padding[384]
TW_Command_9000 oldcommand
TW_Command_Full_9000 firmware_command
TW_Ioctl_Driver_Command_9000 driver_command
unsigned int buffer_length
unsigned int control_code
unsigned char input_data[499]
unsigned char parameter_size_bytes
unsigned char parameter_id
unsigned char output_data[512]
unsigned char padding[508]
unsigned int data_buffer_length
TW_Command firmware_command
struct TAG_TW_Passthru::@51 byte0
unsigned short cylinder_hi
unsigned short cylinder_lo
TW_SG_Entry sg_list[TW_ATA_PASS_SGL_MAX]
unsigned short sector_num
unsigned short sector_count
unsigned char padding[12]
TW_SG_Entry sgl[TW_MAX_SGL_LENGTH_9000]
struct TW_Command_9000::@52 byte0
union TW_Command_9000::@54 byte6
unsigned short block_count
unsigned short parameter_count
unsigned short message_credits
struct TW_Command_9000::@55::@58 init_connection
struct TW_Command_9000::@55::@56 io
u32 response_queue_pointer
struct TW_Command_9000::@55::@57 param
struct TW_Command_9000::@55::@59 ioctl_miniport_version
struct TW_Command_9000::@53 byte3
union TW_Command_9000::@55 byte8
struct TW_Command::@64 byte0
struct TW_Command::@67::@71 ioctl_miniport_version
unsigned short message_credits
struct TW_Command::@65 byte3
struct TW_Command::@67::@68 io
unsigned short parameter_count
union TW_Command::@66 byte6
union TW_Command::@67 byte8
struct TW_Command::@67::@70 init_connection
u32 response_queue_pointer
struct TW_Command::@67::@69 param
unsigned short block_count
TW_SG_Entry sgl[TW_MAX_SGL_LENGTH]
task_ioreg_t sector_number
task_ioreg_t low_cylinder
task_ioreg_t high_cylinder
task_ioreg_t sector_count
task_ioreg_t hob_ports[8]
ide_reg_valid_t out_flags
struct ide_reg_valid_s::@72 b
unsigned error_feature_hob