ReactOS  0.4.13-dev-464-g6b95727
atapi.h File Reference
#include <srb.h>
#include <scsi.h>
Include dependency graph for atapi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  _IDE_REGISTERS_1
 
union  _IDE_REGISTERS_2
 
struct  _IDE_REGISTERS_3
 
struct  _MODE_SENSE_10
 
struct  _MODE_SELECT_10
 
struct  _MODE_PARAMETER_HEADER_10
 
union  _ATAPI_REGISTERS_1
 
struct  _ATAPI_REGISTERS_2
 
struct  _IDENTIFY_DATA
 
struct  _IDENTIFY_DATA2
 
struct  _BROKEN_CONTROLLER_INFORMATION
 
struct  _NATIVE_MODE_CONTROLLER_INFORMATION
 

Macros

#define DFLAGS_DEVICE_PRESENT   0x0001
 
#define DFLAGS_ATAPI_DEVICE   0x0002
 
#define DFLAGS_TAPE_DEVICE   0x0004
 
#define DFLAGS_INT_DRQ   0x0008
 
#define DFLAGS_REMOVABLE_DRIVE   0x0010
 
#define DFLAGS_MEDIA_STATUS_ENABLED   0x0020
 
#define DFLAGS_ATAPI_CHANGER   0x0040
 
#define DFLAGS_SANYO_ATAPI_CHANGER   0x0080
 
#define DFLAGS_CHANGER_INITED   0x0100
 
#define MAX_ERRORS   4
 
#define ATAPI_MODE_SENSE   0x5A
 
#define ATAPI_MODE_SELECT   0x55
 
#define ATAPI_FORMAT_UNIT   0x24
 
#define IDE_COMMAND_ATAPI_RESET   0x08
 
#define IDE_COMMAND_RECALIBRATE   0x10
 
#define IDE_COMMAND_READ   0x20
 
#define IDE_COMMAND_WRITE   0x30
 
#define IDE_COMMAND_VERIFY   0x40
 
#define IDE_COMMAND_SEEK   0x70
 
#define IDE_COMMAND_SET_DRIVE_PARAMETERS   0x91
 
#define IDE_COMMAND_ATAPI_PACKET   0xA0
 
#define IDE_COMMAND_ATAPI_IDENTIFY   0xA1
 
#define IDE_COMMAND_READ_MULTIPLE   0xC4
 
#define IDE_COMMAND_WRITE_MULTIPLE   0xC5
 
#define IDE_COMMAND_SET_MULTIPLE   0xC6
 
#define IDE_COMMAND_READ_DMA   0xC8
 
#define IDE_COMMAND_WRITE_DMA   0xCA
 
#define IDE_COMMAND_GET_MEDIA_STATUS   0xDA
 
#define IDE_COMMAND_ENABLE_MEDIA_STATUS   0xEF
 
#define IDE_COMMAND_IDENTIFY   0xEC
 
#define IDE_COMMAND_MEDIA_EJECT   0xED
 
#define IDE_STATUS_ERROR   0x01
 
#define IDE_STATUS_INDEX   0x02
 
#define IDE_STATUS_CORRECTED_ERROR   0x04
 
#define IDE_STATUS_DRQ   0x08
 
#define IDE_STATUS_DSC   0x10
 
#define IDE_STATUS_DRDY   0x40
 
#define IDE_STATUS_IDLE   0x50
 
#define IDE_STATUS_BUSY   0x80
 
#define IDE_DRIVE_SELECT_1   0xA0
 
#define IDE_DRIVE_SELECT_2   0x10
 
#define IDE_DC_DISABLE_INTERRUPTS   0x02
 
#define IDE_DC_RESET_CONTROLLER   0x04
 
#define IDE_DC_REENABLE_CONTROLLER   0x00
 
#define IDE_ERROR_BAD_BLOCK   0x80
 
#define IDE_ERROR_DATA_ERROR   0x40
 
#define IDE_ERROR_MEDIA_CHANGE   0x20
 
#define IDE_ERROR_ID_NOT_FOUND   0x10
 
#define IDE_ERROR_MEDIA_CHANGE_REQ   0x08
 
#define IDE_ERROR_COMMAND_ABORTED   0x04
 
#define IDE_ERROR_END_OF_MEDIA   0x02
 
#define IDE_ERROR_ILLEGAL_LENGTH   0x01
 
#define ATAPI_IR_COD   0x01
 
#define ATAPI_IR_IO   0x02
 
#define IDENTIFY_DATA_SIZE   sizeof(IDENTIFY_DATA)
 
#define IDENTIFY_CAPABILITIES_DMA_SUPPORTED   0x0100
 
#define IDENTIFY_CAPABILITIES_LBA_SUPPORTED   0x0200
 
#define IDENTIFY_DMA_CYCLES_MODE_0   0x00
 
#define IDENTIFY_DMA_CYCLES_MODE_1   0x01
 
#define IDENTIFY_DMA_CYCLES_MODE_2   0x02
 
#define BROKEN_ADAPTERS   (sizeof(BrokenAdapters) / sizeof(BROKEN_CONTROLLER_INFORMATION))
 
#define NUM_NATIVE_MODE_ADAPTERS   (sizeof(NativeModeAdapters) / sizeof(NATIVE_MODE_CONTROLLER_INFORMATION))
 
#define GetStatus(BaseIoAddress, Status)   Status = ScsiPortReadPortUchar(&BaseIoAddress->AlternateStatus);
 
#define GetBaseStatus(BaseIoAddress, Status)   Status = ScsiPortReadPortUchar(&BaseIoAddress->Command);
 
#define WriteCommand(BaseIoAddress, Command)   ScsiPortWritePortUchar(&BaseIoAddress->Command, Command);
 
#define ReadBuffer(BaseIoAddress, Buffer, Count)
 
#define WriteBuffer(BaseIoAddress, Buffer, Count)
 
#define ReadBuffer2(BaseIoAddress, Buffer, Count)
 
#define WriteBuffer2(BaseIoAddress, Buffer, Count)
 
#define WaitOnBusy(BaseIoAddress, Status)
 
#define WaitOnBaseBusy(BaseIoAddress, Status)
 
#define WaitForDrq(BaseIoAddress, Status)
 
#define WaitShortForDrq(BaseIoAddress, Status)
 
#define AtapiSoftReset(BaseIoAddress, DeviceNumber)
 
#define IdeHardReset(BaseIoAddress, result)
 
#define IS_RDP(OperationCode)
 

Typedefs

typedef struct _IDE_REGISTERS_1 IDE_REGISTERS_1
 
typedef struct _IDE_REGISTERS_1PIDE_REGISTERS_1
 
typedef struct _IDE_REGISTERS_2 IDE_REGISTERS_2
 
typedef struct _IDE_REGISTERS_2PIDE_REGISTERS_2
 
typedef struct _IDE_REGISTERS_3 IDE_REGISTERS_3
 
typedef struct _IDE_REGISTERS_3PIDE_REGISTERS_3
 
typedef struct _MODE_SENSE_10 MODE_SENSE_10
 
typedef struct _MODE_SENSE_10PMODE_SENSE_10
 
typedef struct _MODE_SELECT_10 MODE_SELECT_10
 
typedef struct _MODE_SELECT_10PMODE_SELECT_10
 
typedef struct _MODE_PARAMETER_HEADER_10 MODE_PARAMETER_HEADER_10
 
typedef struct _MODE_PARAMETER_HEADER_10PMODE_PARAMETER_HEADER_10
 
typedef struct _ATAPI_REGISTERS_1 ATAPI_REGISTERS_1
 
typedef struct _ATAPI_REGISTERS_1PATAPI_REGISTERS_1
 
typedef struct _ATAPI_REGISTERS_2 ATAPI_REGISTERS_2
 
typedef struct _ATAPI_REGISTERS_2PATAPI_REGISTERS_2
 
typedef struct _IDENTIFY_DATA IDENTIFY_DATA
 
typedef struct _IDENTIFY_DATAPIDENTIFY_DATA
 
typedef struct _IDENTIFY_DATA2 IDENTIFY_DATA2
 
typedef struct _IDENTIFY_DATA2PIDENTIFY_DATA2
 
typedef struct _BROKEN_CONTROLLER_INFORMATION BROKEN_CONTROLLER_INFORMATION
 
typedef struct _BROKEN_CONTROLLER_INFORMATIONPBROKEN_CONTROLLER_INFORMATION
 
typedef struct _NATIVE_MODE_CONTROLLER_INFORMATION NATIVE_MODE_CONTROLLER_INFORMATION
 
typedef struct _NATIVE_MODE_CONTROLLER_INFORMATIONPNATIVE_MODE_CONTROLLER_INFORMATION
 

Variables

BROKEN_CONTROLLER_INFORMATION const BrokenAdapters []
 
NATIVE_MODE_CONTROLLER_INFORMATION const NativeModeAdapters []
 

Macro Definition Documentation

◆ ATAPI_FORMAT_UNIT

#define ATAPI_FORMAT_UNIT   0x24

Definition at line 63 of file atapi.h.

◆ ATAPI_IR_COD

#define ATAPI_IR_COD   0x01

Definition at line 185 of file atapi.h.

◆ ATAPI_IR_IO

#define ATAPI_IR_IO   0x02

Definition at line 186 of file atapi.h.

◆ ATAPI_MODE_SELECT

#define ATAPI_MODE_SELECT   0x55

Definition at line 62 of file atapi.h.

◆ ATAPI_MODE_SENSE

#define ATAPI_MODE_SENSE   0x5A

Definition at line 61 of file atapi.h.

◆ AtapiSoftReset

#define AtapiSoftReset (   BaseIoAddress,
  DeviceNumber 
)
Value:
{\
UCHAR statusByte; \
ULONG i = 1000*1000;\
ScsiPortWritePortUchar(&BaseIoAddress->DriveSelect,(UCHAR)(((DeviceNumber & 0x1) << 4) | 0xA0)); \
ScsiPortStallExecution(500);\
ScsiPortWritePortUchar(&BaseIoAddress->Command, IDE_COMMAND_ATAPI_RESET); \
while ((ScsiPortReadPortUchar(&BaseIoAddress->Command) & IDE_STATUS_BUSY) && i--)\
ScsiPortStallExecution(30);\
ScsiPortWritePortUchar(&BaseIoAddress->DriveSelect,(UCHAR)((DeviceNumber << 4) | 0xA0)); \
WaitOnBusy( ((PIDE_REGISTERS_2)((PUCHAR)BaseIoAddress + 0x206)), statusByte); \
ScsiPortStallExecution(500);\
}
unsigned char * PUCHAR
Definition: retypes.h:3
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
#define IDE_COMMAND_ATAPI_RESET
Definition: atapi.h:102
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned char UCHAR
Definition: xmlstorage.h:181
#define IDE_STATUS_BUSY
Definition: atapi.h:132
UCHAR NTAPI ScsiPortReadPortUchar(IN PUCHAR Port)
Definition: scsiport.c:1346
_In_ PCHAR _In_ ULONG DeviceNumber
Definition: classpnp.h:1036

Definition at line 418 of file atapi.h.

◆ BROKEN_ADAPTERS

Definition at line 310 of file atapi.h.

◆ DFLAGS_ATAPI_CHANGER

#define DFLAGS_ATAPI_CHANGER   0x0040

Definition at line 48 of file atapi.h.

◆ DFLAGS_ATAPI_DEVICE

#define DFLAGS_ATAPI_DEVICE   0x0002

Definition at line 41 of file atapi.h.

◆ DFLAGS_CHANGER_INITED

#define DFLAGS_CHANGER_INITED   0x0100

Definition at line 50 of file atapi.h.

◆ DFLAGS_DEVICE_PRESENT

#define DFLAGS_DEVICE_PRESENT   0x0001

Definition at line 40 of file atapi.h.

◆ DFLAGS_INT_DRQ

#define DFLAGS_INT_DRQ   0x0008

Definition at line 43 of file atapi.h.

◆ DFLAGS_MEDIA_STATUS_ENABLED

#define DFLAGS_MEDIA_STATUS_ENABLED   0x0020

Definition at line 47 of file atapi.h.

◆ DFLAGS_REMOVABLE_DRIVE

#define DFLAGS_REMOVABLE_DRIVE   0x0010

Definition at line 45 of file atapi.h.

◆ DFLAGS_SANYO_ATAPI_CHANGER

#define DFLAGS_SANYO_ATAPI_CHANGER   0x0080

Definition at line 49 of file atapi.h.

◆ DFLAGS_TAPE_DEVICE

#define DFLAGS_TAPE_DEVICE   0x0004

Definition at line 42 of file atapi.h.

◆ GetBaseStatus

#define GetBaseStatus (   BaseIoAddress,
  Status 
)    Status = ScsiPortReadPortUchar(&BaseIoAddress->Command);

Definition at line 331 of file atapi.h.

◆ GetStatus

#define GetStatus (   BaseIoAddress,
  Status 
)    Status = ScsiPortReadPortUchar(&BaseIoAddress->AlternateStatus);

Definition at line 328 of file atapi.h.

◆ IDE_COMMAND_ATAPI_IDENTIFY

#define IDE_COMMAND_ATAPI_IDENTIFY   0xA1

Definition at line 110 of file atapi.h.

◆ IDE_COMMAND_ATAPI_PACKET

#define IDE_COMMAND_ATAPI_PACKET   0xA0

Definition at line 109 of file atapi.h.

◆ IDE_COMMAND_ATAPI_RESET

#define IDE_COMMAND_ATAPI_RESET   0x08

Definition at line 102 of file atapi.h.

◆ IDE_COMMAND_ENABLE_MEDIA_STATUS

#define IDE_COMMAND_ENABLE_MEDIA_STATUS   0xEF

Definition at line 117 of file atapi.h.

◆ IDE_COMMAND_GET_MEDIA_STATUS

#define IDE_COMMAND_GET_MEDIA_STATUS   0xDA

Definition at line 116 of file atapi.h.

◆ IDE_COMMAND_IDENTIFY

#define IDE_COMMAND_IDENTIFY   0xEC

Definition at line 118 of file atapi.h.

◆ IDE_COMMAND_MEDIA_EJECT

#define IDE_COMMAND_MEDIA_EJECT   0xED

Definition at line 119 of file atapi.h.

◆ IDE_COMMAND_READ

#define IDE_COMMAND_READ   0x20

Definition at line 104 of file atapi.h.

◆ IDE_COMMAND_READ_DMA

#define IDE_COMMAND_READ_DMA   0xC8

Definition at line 114 of file atapi.h.

◆ IDE_COMMAND_READ_MULTIPLE

#define IDE_COMMAND_READ_MULTIPLE   0xC4

Definition at line 111 of file atapi.h.

◆ IDE_COMMAND_RECALIBRATE

#define IDE_COMMAND_RECALIBRATE   0x10

Definition at line 103 of file atapi.h.

◆ IDE_COMMAND_SEEK

#define IDE_COMMAND_SEEK   0x70

Definition at line 107 of file atapi.h.

◆ IDE_COMMAND_SET_DRIVE_PARAMETERS

#define IDE_COMMAND_SET_DRIVE_PARAMETERS   0x91

Definition at line 108 of file atapi.h.

◆ IDE_COMMAND_SET_MULTIPLE

#define IDE_COMMAND_SET_MULTIPLE   0xC6

Definition at line 113 of file atapi.h.

◆ IDE_COMMAND_VERIFY

#define IDE_COMMAND_VERIFY   0x40

Definition at line 106 of file atapi.h.

◆ IDE_COMMAND_WRITE

#define IDE_COMMAND_WRITE   0x30

Definition at line 105 of file atapi.h.

◆ IDE_COMMAND_WRITE_DMA

#define IDE_COMMAND_WRITE_DMA   0xCA

Definition at line 115 of file atapi.h.

◆ IDE_COMMAND_WRITE_MULTIPLE

#define IDE_COMMAND_WRITE_MULTIPLE   0xC5

Definition at line 112 of file atapi.h.

◆ IDE_DC_DISABLE_INTERRUPTS

#define IDE_DC_DISABLE_INTERRUPTS   0x02

Definition at line 145 of file atapi.h.

◆ IDE_DC_REENABLE_CONTROLLER

#define IDE_DC_REENABLE_CONTROLLER   0x00

Definition at line 147 of file atapi.h.

◆ IDE_DC_RESET_CONTROLLER

#define IDE_DC_RESET_CONTROLLER   0x04

Definition at line 146 of file atapi.h.

◆ IDE_DRIVE_SELECT_1

#define IDE_DRIVE_SELECT_1   0xA0

Definition at line 138 of file atapi.h.

◆ IDE_DRIVE_SELECT_2

#define IDE_DRIVE_SELECT_2   0x10

Definition at line 139 of file atapi.h.

◆ IDE_ERROR_BAD_BLOCK

#define IDE_ERROR_BAD_BLOCK   0x80

Definition at line 153 of file atapi.h.

◆ IDE_ERROR_COMMAND_ABORTED

#define IDE_ERROR_COMMAND_ABORTED   0x04

Definition at line 158 of file atapi.h.

◆ IDE_ERROR_DATA_ERROR

#define IDE_ERROR_DATA_ERROR   0x40

Definition at line 154 of file atapi.h.

◆ IDE_ERROR_END_OF_MEDIA

#define IDE_ERROR_END_OF_MEDIA   0x02

Definition at line 159 of file atapi.h.

◆ IDE_ERROR_ID_NOT_FOUND

#define IDE_ERROR_ID_NOT_FOUND   0x10

Definition at line 156 of file atapi.h.

◆ IDE_ERROR_ILLEGAL_LENGTH

#define IDE_ERROR_ILLEGAL_LENGTH   0x01

Definition at line 160 of file atapi.h.

◆ IDE_ERROR_MEDIA_CHANGE

#define IDE_ERROR_MEDIA_CHANGE   0x20

Definition at line 155 of file atapi.h.

◆ IDE_ERROR_MEDIA_CHANGE_REQ

#define IDE_ERROR_MEDIA_CHANGE_REQ   0x08

Definition at line 157 of file atapi.h.

◆ IDE_STATUS_BUSY

#define IDE_STATUS_BUSY   0x80

Definition at line 132 of file atapi.h.

◆ IDE_STATUS_CORRECTED_ERROR

#define IDE_STATUS_CORRECTED_ERROR   0x04

Definition at line 127 of file atapi.h.

◆ IDE_STATUS_DRDY

#define IDE_STATUS_DRDY   0x40

Definition at line 130 of file atapi.h.

◆ IDE_STATUS_DRQ

#define IDE_STATUS_DRQ   0x08

Definition at line 128 of file atapi.h.

◆ IDE_STATUS_DSC

#define IDE_STATUS_DSC   0x10

Definition at line 129 of file atapi.h.

◆ IDE_STATUS_ERROR

#define IDE_STATUS_ERROR   0x01

Definition at line 125 of file atapi.h.

◆ IDE_STATUS_IDLE

#define IDE_STATUS_IDLE   0x50

Definition at line 131 of file atapi.h.

◆ IDE_STATUS_INDEX

#define IDE_STATUS_INDEX   0x02

Definition at line 126 of file atapi.h.

◆ IdeHardReset

#define IdeHardReset (   BaseIoAddress,
  result 
)
Value:
{\
UCHAR statusByte;\
ULONG i;\
ScsiPortWritePortUchar(&BaseIoAddress->AlternateStatus,IDE_DC_RESET_CONTROLLER );\
ScsiPortStallExecution(50 * 1000);\
ScsiPortWritePortUchar(&BaseIoAddress->AlternateStatus,IDE_DC_REENABLE_CONTROLLER);\
for (i = 0; i < 1000 * 1000; i++) {\
statusByte = ScsiPortReadPortUchar(&BaseIoAddress->AlternateStatus);\
if (statusByte != IDE_STATUS_IDLE && statusByte != 0x0) {\
ScsiPortStallExecution(5);\
} else {\
break;\
}\
}\
if (i == 1000*1000) {\
result = FALSE;\
}\
result = TRUE;\
}
#define IDE_DC_RESET_CONTROLLER
Definition: atapi.h:146
#define TRUE
Definition: types.h:120
GLint x0
Definition: linetemp.h:95
#define IDE_DC_REENABLE_CONTROLLER
Definition: atapi.h:147
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define IDE_STATUS_IDLE
Definition: atapi.h:131
UCHAR NTAPI ScsiPortReadPortUchar(IN PUCHAR Port)
Definition: scsiport.c:1346

Definition at line 432 of file atapi.h.

◆ IDENTIFY_CAPABILITIES_DMA_SUPPORTED

#define IDENTIFY_CAPABILITIES_DMA_SUPPORTED   0x0100

Definition at line 286 of file atapi.h.

◆ IDENTIFY_CAPABILITIES_LBA_SUPPORTED

#define IDENTIFY_CAPABILITIES_LBA_SUPPORTED   0x0200

Definition at line 287 of file atapi.h.

◆ IDENTIFY_DATA_SIZE

#define IDENTIFY_DATA_SIZE   sizeof(IDENTIFY_DATA)

Definition at line 280 of file atapi.h.

◆ IDENTIFY_DMA_CYCLES_MODE_0

#define IDENTIFY_DMA_CYCLES_MODE_0   0x00

Definition at line 293 of file atapi.h.

◆ IDENTIFY_DMA_CYCLES_MODE_1

#define IDENTIFY_DMA_CYCLES_MODE_1   0x01

Definition at line 294 of file atapi.h.

◆ IDENTIFY_DMA_CYCLES_MODE_2

#define IDENTIFY_DMA_CYCLES_MODE_2   0x02

Definition at line 295 of file atapi.h.

◆ IS_RDP

#define IS_RDP (   OperationCode)
Value:
((OperationCode == SCSIOP_ERASE)||\
(OperationCode == SCSIOP_LOAD_UNLOAD)||\
(OperationCode == SCSIOP_LOCATE)||\
(OperationCode == SCSIOP_REWIND) ||\
(OperationCode == SCSIOP_SPACE)||\
(OperationCode == SCSIOP_SEEK)||\
(OperationCode == SCSIOP_WRITE_FILEMARKS))
#define SCSIOP_SEEK
Definition: cdrw_hw.h:908
#define SCSIOP_SPACE
Definition: cdrw_hw.h:887
#define SCSIOP_ERASE
Definition: cdrw_hw.h:895
#define SCSIOP_REWIND
Definition: cdrw_hw.h:868
#define SCSIOP_WRITE_FILEMARKS
Definition: cdrw_hw.h:885
#define SCSIOP_LOCATE
Definition: cdrw_hw.h:909
#define SCSIOP_LOAD_UNLOAD
Definition: cdrw_hw.h:899

Definition at line 453 of file atapi.h.

◆ MAX_ERRORS

#define MAX_ERRORS   4

Definition at line 55 of file atapi.h.

◆ NUM_NATIVE_MODE_ADAPTERS

Definition at line 322 of file atapi.h.

◆ ReadBuffer

#define ReadBuffer (   BaseIoAddress,
  Buffer,
  Count 
)
Value:
ScsiPortReadPortBufferUshort(&BaseIoAddress->Data, \
Buffer, \
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
VOID NTAPI ScsiPortReadPortBufferUshort(IN PUSHORT Port, OUT PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1336
Definition: bufpool.h:45

Definition at line 339 of file atapi.h.

◆ ReadBuffer2

#define ReadBuffer2 (   BaseIoAddress,
  Buffer,
  Count 
)
Value:
ScsiPortReadPortBufferUlong(&BaseIoAddress->Data, \
Buffer, \
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
Definition: bufpool.h:45
VOID NTAPI ScsiPortReadPortBufferUlong(IN PULONG Port, OUT PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1326

Definition at line 349 of file atapi.h.

◆ WaitForDrq

#define WaitForDrq (   BaseIoAddress,
  Status 
)
Value:
{ \
ULONG i; \
for (i=0; i<1000; i++) { \
GetStatus(BaseIoAddress, Status); \
ScsiPortStallExecution(100); \
} else if (Status & IDE_STATUS_DRQ) { \
break; \
} else { \
ScsiPortStallExecution(200); \
} \
} \
}
#define IDE_STATUS_DRQ
Definition: atapi.h:128
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Status
Definition: gdiplustypes.h:24
#define IDE_STATUS_BUSY
Definition: atapi.h:132

Definition at line 387 of file atapi.h.

◆ WaitOnBaseBusy

#define WaitOnBaseBusy (   BaseIoAddress,
  Status 
)
Value:
{ \
ULONG i; \
for (i=0; i<20000; i++) { \
GetBaseStatus(BaseIoAddress, Status); \
ScsiPortStallExecution(150); \
continue; \
} else { \
break; \
} \
} \
}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Status
Definition: gdiplustypes.h:24
#define IDE_STATUS_BUSY
Definition: atapi.h:132

Definition at line 373 of file atapi.h.

◆ WaitOnBusy

#define WaitOnBusy (   BaseIoAddress,
  Status 
)
Value:
{ \
ULONG i; \
for (i=0; i<20000; i++) { \
GetStatus(BaseIoAddress, Status); \
ScsiPortStallExecution(150); \
continue; \
} else { \
break; \
} \
} \
}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Status
Definition: gdiplustypes.h:24
#define IDE_STATUS_BUSY
Definition: atapi.h:132

Definition at line 359 of file atapi.h.

◆ WaitShortForDrq

#define WaitShortForDrq (   BaseIoAddress,
  Status 
)
Value:
{ \
ULONG i; \
for (i=0; i<2; i++) { \
GetStatus(BaseIoAddress, Status); \
ScsiPortStallExecution(100); \
} else if (Status & IDE_STATUS_DRQ) { \
break; \
} else { \
ScsiPortStallExecution(100); \
} \
} \
}
#define IDE_STATUS_DRQ
Definition: atapi.h:128
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Status
Definition: gdiplustypes.h:24
#define IDE_STATUS_BUSY
Definition: atapi.h:132

Definition at line 403 of file atapi.h.

◆ WriteBuffer

#define WriteBuffer (   BaseIoAddress,
  Buffer,
  Count 
)
Value:
ScsiPortWritePortBufferUshort(&BaseIoAddress->Data, \
Buffer, \
VOID NTAPI ScsiPortWritePortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1493
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
Definition: bufpool.h:45

Definition at line 344 of file atapi.h.

◆ WriteBuffer2

#define WriteBuffer2 (   BaseIoAddress,
  Buffer,
  Count 
)
Value:
ScsiPortWritePortBufferUlong(&BaseIoAddress->Data, \
Buffer, \
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
Definition: bufpool.h:45
VOID NTAPI ScsiPortWritePortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1483

Definition at line 354 of file atapi.h.

◆ WriteCommand

#define WriteCommand (   BaseIoAddress,
  Command 
)    ScsiPortWritePortUchar(&BaseIoAddress->Command, Command);

Definition at line 334 of file atapi.h.

Typedef Documentation

◆ ATAPI_REGISTERS_1

◆ ATAPI_REGISTERS_2

◆ BROKEN_CONTROLLER_INFORMATION

◆ IDE_REGISTERS_1

◆ IDE_REGISTERS_2

◆ IDE_REGISTERS_3

◆ IDENTIFY_DATA

◆ IDENTIFY_DATA2

◆ MODE_PARAMETER_HEADER_10

◆ MODE_SELECT_10

◆ MODE_SENSE_10

◆ NATIVE_MODE_CONTROLLER_INFORMATION

◆ PATAPI_REGISTERS_1

◆ PATAPI_REGISTERS_2

◆ PBROKEN_CONTROLLER_INFORMATION

◆ PIDE_REGISTERS_1

◆ PIDE_REGISTERS_2

◆ PIDE_REGISTERS_3

◆ PIDENTIFY_DATA

◆ PIDENTIFY_DATA2

◆ PMODE_PARAMETER_HEADER_10

◆ PMODE_SELECT_10

◆ PMODE_SENSE_10

◆ PNATIVE_MODE_CONTROLLER_INFORMATION

Variable Documentation

◆ BrokenAdapters

Initial value:
= {
{ "1095", 4, "0640", 4},
{ "1039", 4, "0601", 4}
}

Definition at line 305 of file atapi.h.

Referenced by AtapiFindPCIController().

◆ NativeModeAdapters

Initial value:
= {
{ "10ad", 4, "0105", 4}
}

Definition at line 319 of file atapi.h.

Referenced by AtapiFindNativeModeController(), and DriverEntry().