Go to the source code of this file.
|
#define | TAG_ATA_DEVICE 'dATA' |
|
#define | ATA_STATUS_SUCCESS 0 |
|
#define | ATA_STATUS_PENDING 1 |
|
#define | ATA_STATUS_ERROR 2 |
|
#define | ATA_STATUS_RESET 3 |
|
#define | ATA_STATUS_RETRY 4 |
|
#define | CHANNEL_MAX_DEVICES 2 |
|
#define | DEV_SLAVE(DeviceNumber) (DeviceNumber) |
|
#define | ATA_IO_WAIT() StallExecutionProcessor(1) |
|
#define | ATA_MAX_LBA_28 0x0FFFFFFFULL |
|
#define | ATA_MAX_LBA_48 (1ULL << 48) |
|
#define | IDE_FEATURE_PIO 0x00 |
|
#define | IDE_DC_ALWAYS 0x08 |
|
#define | IDE_DRIVE_SELECT 0xA0 |
|
#define | ATAPI_INT_REASON_COD 0x01 |
|
#define | ATAPI_INT_REASON_IO 0x02 |
|
#define | ATAPI_INT_REASON_MASK (ATAPI_INT_REASON_IO | ATAPI_INT_REASON_COD) |
|
#define | ATAPI_INT_REASON_STATUS_NEC 0x00 |
|
#define | ATAPI_INT_REASON_STATUS (ATAPI_INT_REASON_IO | ATAPI_INT_REASON_COD) |
|
#define | ATAPI_INT_REASON_AWAIT_CDB (IDE_STATUS_DRQ | ATAPI_INT_REASON_COD) |
|
#define | ATAPI_INT_REASON_DATA_IN (ATAPI_INT_REASON_IO | IDE_STATUS_DRQ) |
|
#define | MAXIMUM_CDROM_SIZE 804 |
|
#define | ATA_TIME_BUSY_SELECT 2000 |
| 20 ms
|
|
#define | ATA_TIME_BUSY_POLL 500000 |
| 5 s
|
|
#define | ATA_TIME_BUSY_ENUM 100 |
| 1 ms
|
|
#define | ATA_TIME_BUSY_RESET 1000000 |
| 10 s
|
|
#define | ATA_TIME_RESET_SELECT 200000 |
| 2 s
|
|
#define | ATA_TIME_DRQ_CLEAR 100 |
| 200 us
|
|
#define | ATA_TIME_PHASE_CHANGE 100 |
| 1 ms
|
|
#define | ATA_WRITE(Port, Value) WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)(Port), (Value)) |
|
#define | ATA_WRITE_BLOCK_16(Port, Buffer, Count) WRITE_PORT_BUFFER_USHORT((PUSHORT)(ULONG_PTR)(Port), (PUSHORT)(Buffer), (Count)) |
|
#define | ATA_WRITE_BLOCK_32(Port, Buffer, Count) WRITE_PORT_BUFFER_ULONG((PULONG)(ULONG_PTR)(Port), (PULONG)(Buffer), (Count)) |
|
#define | ATA_READ(Port) READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)(Port)) |
|
#define | ATA_READ_BLOCK_16(Port, Buffer, Count) READ_PORT_BUFFER_USHORT((PUSHORT)(ULONG_PTR)(Port), (PUSHORT)(Buffer), (Count)) |
|
#define | ATA_READ_BLOCK_32(Port, Buffer, Count) READ_PORT_BUFFER_ULONG((PULONG)(ULONG_PTR)(Port), (PULONG)(Buffer), (Count)) |
|
#define | REQUEST_FLAG_LBA48 0x00000001 |
|
#define | REQUEST_FLAG_READ_WRITE_MULTIPLE 0x00000002 |
|
#define | REQUEST_FLAG_PACKET_COMMAND 0x00000004 |
|
#define | REQUEST_FLAG_SET_DEVICE_REGISTER 0x00000008 |
|
#define | REQUEST_FLAG_AWAIT_CDB 0x00000010 |
|
#define | REQUEST_FLAG_READ_COMMAND 0x00000020 |
|
#define | REQUEST_FLAG_IDENTIFY_COMMAND 0x00000040 |
|
◆ ATA_IO_WAIT
◆ ATA_MAX_LBA_28
#define ATA_MAX_LBA_28 0x0FFFFFFFULL |
◆ ATA_MAX_LBA_48
◆ ATA_READ
◆ ATA_READ_BLOCK_16
◆ ATA_READ_BLOCK_32
◆ ATA_STATUS_ERROR
◆ ATA_STATUS_PENDING
◆ ATA_STATUS_RESET
◆ ATA_STATUS_RETRY
◆ ATA_STATUS_SUCCESS
◆ ATA_TIME_BUSY_ENUM
#define ATA_TIME_BUSY_ENUM 100 |
◆ ATA_TIME_BUSY_POLL
#define ATA_TIME_BUSY_POLL 500000 |
◆ ATA_TIME_BUSY_RESET
#define ATA_TIME_BUSY_RESET 1000000 |
◆ ATA_TIME_BUSY_SELECT
#define ATA_TIME_BUSY_SELECT 2000 |
◆ ATA_TIME_DRQ_CLEAR
#define ATA_TIME_DRQ_CLEAR 100 |
◆ ATA_TIME_PHASE_CHANGE
#define ATA_TIME_PHASE_CHANGE 100 |
◆ ATA_TIME_RESET_SELECT
#define ATA_TIME_RESET_SELECT 200000 |
◆ ATA_WRITE
◆ ATA_WRITE_BLOCK_16
◆ ATA_WRITE_BLOCK_32
◆ ATAPI_INT_REASON_AWAIT_CDB
◆ ATAPI_INT_REASON_COD
#define ATAPI_INT_REASON_COD 0x01 |
◆ ATAPI_INT_REASON_DATA_IN
◆ ATAPI_INT_REASON_IO
#define ATAPI_INT_REASON_IO 0x02 |
◆ ATAPI_INT_REASON_MASK
◆ ATAPI_INT_REASON_STATUS
◆ ATAPI_INT_REASON_STATUS_NEC
#define ATAPI_INT_REASON_STATUS_NEC 0x00 |
◆ CHANNEL_MAX_DEVICES
◆ DEV_SLAVE
◆ IDE_DC_ALWAYS
◆ IDE_DRIVE_SELECT
◆ IDE_FEATURE_PIO
◆ MAXIMUM_CDROM_SIZE
#define MAXIMUM_CDROM_SIZE 804 |
◆ REQUEST_FLAG_AWAIT_CDB
#define REQUEST_FLAG_AWAIT_CDB 0x00000010 |
◆ REQUEST_FLAG_IDENTIFY_COMMAND
#define REQUEST_FLAG_IDENTIFY_COMMAND 0x00000040 |
◆ REQUEST_FLAG_LBA48
#define REQUEST_FLAG_LBA48 0x00000001 |
◆ REQUEST_FLAG_PACKET_COMMAND
#define REQUEST_FLAG_PACKET_COMMAND 0x00000004 |
◆ REQUEST_FLAG_READ_COMMAND
#define REQUEST_FLAG_READ_COMMAND 0x00000020 |
◆ REQUEST_FLAG_READ_WRITE_MULTIPLE
#define REQUEST_FLAG_READ_WRITE_MULTIPLE 0x00000002 |
◆ REQUEST_FLAG_SET_DEVICE_REGISTER
#define REQUEST_FLAG_SET_DEVICE_REGISTER 0x00000008 |
◆ TAG_ATA_DEVICE
◆ ATA_DEVICE_CLASS
◆ ATA_DEVICE_REQUEST
◆ ATA_TASKFILE
◆ HW_DEVICE_UNIT
◆ IDE_REG
◆ IDE_REGISTERS
◆ PATA_DEVICE_CLASS
◆ PATA_DEVICE_REQUEST
◆ PATA_TASKFILE
◆ PHW_DEVICE_UNIT
◆ PIDE_REGISTERS
◆ _ATA_DEVICE_CLASS
Enumerator |
---|
DEV_ATA | |
DEV_ATAPI | |
DEV_NONE | |
Definition at line 93 of file hwidep.h.
94{
enum _ATA_DEVICE_CLASS ATA_DEVICE_CLASS
enum _ATA_DEVICE_CLASS * PATA_DEVICE_CLASS
◆ AtaCommandUseLba48()
◆ AtaDevBytesPerLogicalSector()
Definition at line 357 of file hwidep.h.
359{
361
362
363 if (IdentifyData->PhysicalLogicalSectorSize.Reserved1 == 1 &&
364 IdentifyData->PhysicalLogicalSectorSize.LogicalSectorLongerThan256Words)
365 {
366
367 WordCount = IdentifyData->WordsPerLogicalSector[0];
368 WordCount |= (
ULONG)IdentifyData->WordsPerLogicalSector[1] << 16;
369 }
370 else
371 {
372
373 WordCount = 256;
374 }
375
376 return WordCount *
sizeof(
USHORT);
377}
Referenced by AtapAtaInitDevice().
◆ AtaDevCdbSizeInWords()
Definition at line 221 of file hwidep.h.
223{
224
225 return (IdentifyPacketData->GeneralConfiguration.PacketType != 0) ? 8 : 6;
226}
Referenced by AtapAtapiInitDevice().
◆ AtaDevCurrentChsTranslation()
Definition at line 303 of file hwidep.h.
308{
309
310 *Cylinders = IdentifyData->NumberOfCurrentCylinders;
311
312
313 *Heads = IdentifyData->NumberOfCurrentHeads;
314
315
317}
_In_ ULONG _In_ ULONG SectorsPerTrack
Referenced by AtapAtaInitDevice().
◆ AtaDevCurrentSectorsPerDrq()
Definition at line 321 of file hwidep.h.
323{
324 UCHAR MultiSectorCurrent;
325
326
327 if (!(IdentifyData->MultiSectorSettingValid))
328 return 0;
329
330
331 MultiSectorCurrent = IdentifyData->CurrentMultiSectorSetting;
332
333 if ((MultiSectorCurrent > 0) && ((MultiSectorCurrent & (MultiSectorCurrent - 1)) == 0))
334 return MultiSectorCurrent;
335
336 return 0;
337}
Referenced by AtapAtaSetMultipleMode().
◆ AtaDevDefaultChsTranslation()
Definition at line 285 of file hwidep.h.
290{
291
292 *Cylinders = IdentifyData->NumCylinders;
293
294
295 *Heads = IdentifyData->NumHeads;
296
297
299}
Referenced by AtapAtaInitDevice().
◆ AtaDevHas48BitAddressFeature()
Definition at line 257 of file hwidep.h.
259{
260
261 if (IdentifyData->CommandSetSupport.WordValid83 == 1)
262 {
263
264 return IdentifyData->CommandSetSupport.BigLba;
265 }
266
268}
Referenced by AtapAtaInitDevice().
◆ AtaDevHasLbaTranslation()
◆ AtaDevIsCurrentGeometryValid()
Definition at line 272 of file hwidep.h.
274{
275 return ((IdentifyData->TranslationFieldsValid & 1) &&
276 (IdentifyData->NumberOfCurrentCylinders != 0) &&
277 (IdentifyData->NumberOfCurrentCylinders <= 63) &&
278 (IdentifyData->NumberOfCurrentHeads != 0) &&
279 (IdentifyData->NumberOfCurrentHeads <= 16) &&
280 (IdentifyData->CurrentSectorsPerTrack != 0));
281}
Referenced by AtapAtaInitDevice().
◆ AtaDevIsIdentifyDataValid()
Definition at line 196 of file hwidep.h.
198{
201
202
203 if (IdentifyData->Signature != 0xA5)
204 {
205
207 }
208
209
210 Crc = 0;
211 for (
i = 0;
i <
sizeof(*IdentifyData); ++
i)
212 {
213 Crc += ((
PUCHAR)IdentifyData)[
i];
214 }
215
216 return (Crc == 0);
217}
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
Referenced by AtapAnalyzeIdentifyData().
◆ AtaDevMaximumSectorsPerDrq()
Definition at line 341 of file hwidep.h.
343{
344 UCHAR MultiSectorMax;
345
346
347 MultiSectorMax = IdentifyData->MaximumBlockTransfer;
348
349 if ((MultiSectorMax > 0) && ((MultiSectorMax & (MultiSectorMax - 1)) == 0))
350 return MultiSectorMax;
351
352 return 0;
353}
Referenced by AtapAtaSetMultipleMode().
◆ AtaDevUserAddressableSectors28Bit()
◆ AtaDevUserAddressableSectors48Bit()