ReactOS 0.4.16-dev-2207-geb15453
hwidep.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _IDE_REGISTERS
 
struct  _ATA_TASKFILE
 
struct  _ATA_DEVICE_REQUEST
 
struct  _HW_DEVICE_UNIT
 

Macros

#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   1000
 10 ms
 
#define ATA_TIME_PHASE_CHANGE   100
 1 ms
 
#define ATA_TIME_DRQ_ASSERT   15
 150 us
 
#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
 

Typedefs

typedef ULONG_PTR IDE_REG
 
typedef enum _ATA_DEVICE_CLASS ATA_DEVICE_CLASS
 
typedef enum _ATA_DEVICE_CLASSPATA_DEVICE_CLASS
 
typedef struct _IDE_REGISTERS IDE_REGISTERS
 
typedef struct _IDE_REGISTERSPIDE_REGISTERS
 
typedef struct _ATA_TASKFILE ATA_TASKFILE
 
typedef struct _ATA_TASKFILEPATA_TASKFILE
 
typedef struct _ATA_DEVICE_REQUEST ATA_DEVICE_REQUEST
 
typedef struct _ATA_DEVICE_REQUESTPATA_DEVICE_REQUEST
 
typedef struct _HW_DEVICE_UNIT HW_DEVICE_UNIT
 
typedef struct _HW_DEVICE_UNITPHW_DEVICE_UNIT
 

Enumerations

enum  _ATA_DEVICE_CLASS { DEV_ATA , DEV_ATAPI , DEV_NONE }
 

Functions

FORCEINLINE BOOLEAN AtaDevIsIdentifyDataValid (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE UCHAR AtaDevCdbSizeInWords (_In_ PIDENTIFY_PACKET_DATA IdentifyPacketData)
 
FORCEINLINE BOOLEAN AtaDevHasLbaTranslation (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE ULONG AtaDevUserAddressableSectors28Bit (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE ULONG64 AtaDevUserAddressableSectors48Bit (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE BOOLEAN AtaDevHas48BitAddressFeature (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE BOOLEAN AtaDevIsCurrentGeometryValid (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE VOID AtaDevDefaultChsTranslation (_In_ PIDENTIFY_DEVICE_DATA IdentifyData, _Out_ PUSHORT Cylinders, _Out_ PUSHORT Heads, _Out_ PUSHORT SectorsPerTrack)
 
FORCEINLINE VOID AtaDevCurrentChsTranslation (_In_ PIDENTIFY_DEVICE_DATA IdentifyData, _Out_ PUSHORT Cylinders, _Out_ PUSHORT Heads, _Out_ PUSHORT SectorsPerTrack)
 
FORCEINLINE UCHAR AtaDevCurrentSectorsPerDrq (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE UCHAR AtaDevMaximumSectorsPerDrq (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE ULONG AtaDevBytesPerLogicalSector (_In_ PIDENTIFY_DEVICE_DATA IdentifyData)
 
FORCEINLINE BOOLEAN AtaCommandUseLba48 (_In_ ULONG64 SectorNumber, _In_ ULONG SectorCount)
 

Macro Definition Documentation

◆ ATA_IO_WAIT

#define ATA_IO_WAIT ( )    StallExecutionProcessor(1)

Definition at line 39 of file hwidep.h.

◆ ATA_MAX_LBA_28

#define ATA_MAX_LBA_28   0x0FFFFFFFULL

Definition at line 49 of file hwidep.h.

◆ ATA_MAX_LBA_48

#define ATA_MAX_LBA_48   (1ULL << 48)

Definition at line 50 of file hwidep.h.

◆ ATA_READ

#define ATA_READ (   Port)     READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)(Port))

Definition at line 89 of file hwidep.h.

◆ ATA_READ_BLOCK_16

#define ATA_READ_BLOCK_16 (   Port,
  Buffer,
  Count 
)     READ_PORT_BUFFER_USHORT((PUSHORT)(ULONG_PTR)(Port), (PUSHORT)(Buffer), (Count))

Definition at line 92 of file hwidep.h.

◆ ATA_READ_BLOCK_32

#define ATA_READ_BLOCK_32 (   Port,
  Buffer,
  Count 
)     READ_PORT_BUFFER_ULONG((PULONG)(ULONG_PTR)(Port), (PULONG)(Buffer), (Count))

Definition at line 95 of file hwidep.h.

◆ ATA_STATUS_ERROR

#define ATA_STATUS_ERROR   2

Definition at line 14 of file hwidep.h.

◆ ATA_STATUS_PENDING

#define ATA_STATUS_PENDING   1

Definition at line 13 of file hwidep.h.

◆ ATA_STATUS_RESET

#define ATA_STATUS_RESET   3

Definition at line 15 of file hwidep.h.

◆ ATA_STATUS_RETRY

#define ATA_STATUS_RETRY   4

Definition at line 16 of file hwidep.h.

◆ ATA_STATUS_SUCCESS

#define ATA_STATUS_SUCCESS   0

Definition at line 12 of file hwidep.h.

◆ ATA_TIME_BUSY_ENUM

#define ATA_TIME_BUSY_ENUM   100

1 ms

Definition at line 71 of file hwidep.h.

◆ ATA_TIME_BUSY_POLL

#define ATA_TIME_BUSY_POLL   500000

5 s

Definition at line 70 of file hwidep.h.

◆ ATA_TIME_BUSY_RESET

#define ATA_TIME_BUSY_RESET   1000000

10 s

Definition at line 72 of file hwidep.h.

◆ ATA_TIME_BUSY_SELECT

#define ATA_TIME_BUSY_SELECT   2000

20 ms

Definition at line 69 of file hwidep.h.

◆ ATA_TIME_DRQ_ASSERT

#define ATA_TIME_DRQ_ASSERT   15

150 us

Definition at line 78 of file hwidep.h.

◆ ATA_TIME_DRQ_CLEAR

#define ATA_TIME_DRQ_CLEAR   1000

10 ms

Definition at line 74 of file hwidep.h.

◆ ATA_TIME_PHASE_CHANGE

#define ATA_TIME_PHASE_CHANGE   100

1 ms

Definition at line 75 of file hwidep.h.

◆ ATA_TIME_RESET_SELECT

#define ATA_TIME_RESET_SELECT   200000

2 s

Definition at line 73 of file hwidep.h.

◆ ATA_WRITE

#define ATA_WRITE (   Port,
  Value 
)     WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)(Port), (Value))

Definition at line 80 of file hwidep.h.

◆ ATA_WRITE_BLOCK_16

#define ATA_WRITE_BLOCK_16 (   Port,
  Buffer,
  Count 
)     WRITE_PORT_BUFFER_USHORT((PUSHORT)(ULONG_PTR)(Port), (PUSHORT)(Buffer), (Count))

Definition at line 83 of file hwidep.h.

◆ ATA_WRITE_BLOCK_32

#define ATA_WRITE_BLOCK_32 (   Port,
  Buffer,
  Count 
)     WRITE_PORT_BUFFER_ULONG((PULONG)(ULONG_PTR)(Port), (PULONG)(Buffer), (Count))

Definition at line 86 of file hwidep.h.

◆ ATAPI_INT_REASON_AWAIT_CDB

#define ATAPI_INT_REASON_AWAIT_CDB   (IDE_STATUS_DRQ | ATAPI_INT_REASON_COD)

Definition at line 64 of file hwidep.h.

◆ ATAPI_INT_REASON_COD

#define ATAPI_INT_REASON_COD   0x01

Definition at line 58 of file hwidep.h.

◆ ATAPI_INT_REASON_DATA_IN

#define ATAPI_INT_REASON_DATA_IN   (ATAPI_INT_REASON_IO | IDE_STATUS_DRQ)

Definition at line 65 of file hwidep.h.

◆ ATAPI_INT_REASON_IO

#define ATAPI_INT_REASON_IO   0x02

Definition at line 59 of file hwidep.h.

◆ ATAPI_INT_REASON_MASK

#define ATAPI_INT_REASON_MASK   (ATAPI_INT_REASON_IO | ATAPI_INT_REASON_COD)

Definition at line 60 of file hwidep.h.

◆ ATAPI_INT_REASON_STATUS

#define ATAPI_INT_REASON_STATUS   (ATAPI_INT_REASON_IO | ATAPI_INT_REASON_COD)

Definition at line 63 of file hwidep.h.

◆ ATAPI_INT_REASON_STATUS_NEC

#define ATAPI_INT_REASON_STATUS_NEC   0x00

Definition at line 62 of file hwidep.h.

◆ CHANNEL_MAX_DEVICES

#define CHANNEL_MAX_DEVICES   2

Definition at line 24 of file hwidep.h.

◆ DEV_SLAVE

#define DEV_SLAVE (   DeviceNumber)    (DeviceNumber)

Definition at line 25 of file hwidep.h.

◆ IDE_DC_ALWAYS

#define IDE_DC_ALWAYS   0x08

Definition at line 54 of file hwidep.h.

◆ IDE_DRIVE_SELECT

#define IDE_DRIVE_SELECT   0xA0

Definition at line 56 of file hwidep.h.

◆ IDE_FEATURE_PIO

#define IDE_FEATURE_PIO   0x00

Definition at line 52 of file hwidep.h.

◆ MAXIMUM_CDROM_SIZE

#define MAXIMUM_CDROM_SIZE   804

Definition at line 67 of file hwidep.h.

◆ REQUEST_FLAG_AWAIT_CDB

#define REQUEST_FLAG_AWAIT_CDB   0x00000010

Definition at line 171 of file hwidep.h.

◆ REQUEST_FLAG_IDENTIFY_COMMAND

#define REQUEST_FLAG_IDENTIFY_COMMAND   0x00000040

Definition at line 173 of file hwidep.h.

◆ REQUEST_FLAG_LBA48

#define REQUEST_FLAG_LBA48   0x00000001

Definition at line 167 of file hwidep.h.

◆ REQUEST_FLAG_PACKET_COMMAND

#define REQUEST_FLAG_PACKET_COMMAND   0x00000004

Definition at line 169 of file hwidep.h.

◆ REQUEST_FLAG_READ_COMMAND

#define REQUEST_FLAG_READ_COMMAND   0x00000020

Definition at line 172 of file hwidep.h.

◆ REQUEST_FLAG_READ_WRITE_MULTIPLE

#define REQUEST_FLAG_READ_WRITE_MULTIPLE   0x00000002

Definition at line 168 of file hwidep.h.

◆ REQUEST_FLAG_SET_DEVICE_REGISTER

#define REQUEST_FLAG_SET_DEVICE_REGISTER   0x00000008

Definition at line 170 of file hwidep.h.

◆ TAG_ATA_DEVICE

#define TAG_ATA_DEVICE   'dATA'

Definition at line 10 of file hwidep.h.

Typedef Documentation

◆ ATA_DEVICE_CLASS

◆ ATA_DEVICE_REQUEST

◆ ATA_TASKFILE

◆ HW_DEVICE_UNIT

◆ IDE_REG

typedef ULONG_PTR IDE_REG

Definition at line 46 of file hwidep.h.

◆ IDE_REGISTERS

◆ PATA_DEVICE_CLASS

◆ PATA_DEVICE_REQUEST

◆ PATA_TASKFILE

◆ PHW_DEVICE_UNIT

◆ PIDE_REGISTERS

Enumeration Type Documentation

◆ _ATA_DEVICE_CLASS

Enumerator
DEV_ATA 
DEV_ATAPI 
DEV_NONE 

Definition at line 98 of file hwidep.h.

99{
100 DEV_ATA,
101 DEV_ATAPI,
102 DEV_NONE,
enum _ATA_DEVICE_CLASS ATA_DEVICE_CLASS
@ DEV_ATA
Definition: hwidep.h:100
@ DEV_ATAPI
Definition: hwidep.h:101
@ DEV_NONE
Definition: hwidep.h:102
enum _ATA_DEVICE_CLASS * PATA_DEVICE_CLASS

Function Documentation

◆ AtaCommandUseLba48()

FORCEINLINE BOOLEAN AtaCommandUseLba48 ( _In_ ULONG64  SectorNumber,
_In_ ULONG  SectorCount 
)

Definition at line 386 of file hwidep.h.

389{
390 /* Use the 48-bit command when reasonable */
391 return (((SectorNumber + SectorCount) >= ATA_MAX_LBA_28) || (SectorCount > 0x100));
392}
#define ATA_MAX_LBA_28
Definition: hwidep.h:49
ULONG SectorCount
Definition: part_xbox.c:31

Referenced by AtapBuildReadTaskFile().

◆ AtaDevBytesPerLogicalSector()

FORCEINLINE ULONG AtaDevBytesPerLogicalSector ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 362 of file hwidep.h.

364{
365 ULONG WordCount;
366
367 /* Word 106: 15 = 0, 14 = 1, 12 = 1 */
368 if (IdentifyData->PhysicalLogicalSectorSize.Reserved1 == 1 &&
369 IdentifyData->PhysicalLogicalSectorSize.LogicalSectorLongerThan256Words)
370 {
371 /* Words 116-117 */
372 WordCount = IdentifyData->WordsPerLogicalSector[0];
373 WordCount |= (ULONG)IdentifyData->WordsPerLogicalSector[1] << 16;
374 }
375 else
376 {
377 /* 256 words = 512 bytes */
378 WordCount = 256;
379 }
380
381 return WordCount * sizeof(USHORT);
382}
unsigned short USHORT
Definition: pedump.c:61
uint32_t ULONG
Definition: typedefs.h:59

Referenced by AtapAtaInitDevice().

◆ AtaDevCdbSizeInWords()

FORCEINLINE UCHAR AtaDevCdbSizeInWords ( _In_ PIDENTIFY_PACKET_DATA  IdentifyPacketData)

Definition at line 226 of file hwidep.h.

228{
229 /* Bits 0:2 of word 0 */
230 return (IdentifyPacketData->GeneralConfiguration.PacketType != 0) ? 8 : 6;
231}

Referenced by AtapAtapiInitDevice().

◆ AtaDevCurrentChsTranslation()

FORCEINLINE VOID AtaDevCurrentChsTranslation ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData,
_Out_ PUSHORT  Cylinders,
_Out_ PUSHORT  Heads,
_Out_ PUSHORT  SectorsPerTrack 
)

Definition at line 308 of file hwidep.h.

313{
314 /* Word 54 */
315 *Cylinders = IdentifyData->NumberOfCurrentCylinders;
316
317 /* Word 55 */
318 *Heads = IdentifyData->NumberOfCurrentHeads;
319
320 /* Word 55 */
321 *SectorsPerTrack = IdentifyData->CurrentSectorsPerTrack;
322}
_In_ ULONG _In_ ULONG SectorsPerTrack
Definition: iofuncs.h:2071

Referenced by AtapAtaInitDevice().

◆ AtaDevCurrentSectorsPerDrq()

FORCEINLINE UCHAR AtaDevCurrentSectorsPerDrq ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 326 of file hwidep.h.

328{
329 UCHAR MultiSectorCurrent;
330
331 /* Bit 8 of word 59 */
332 if (!(IdentifyData->MultiSectorSettingValid))
333 return 0;
334
335 /* The word 59 should be a power of 2 */
336 MultiSectorCurrent = IdentifyData->CurrentMultiSectorSetting;
337
338 if ((MultiSectorCurrent > 0) && ((MultiSectorCurrent & (MultiSectorCurrent - 1)) == 0))
339 return MultiSectorCurrent;
340
341 return 0;
342}
unsigned char UCHAR
Definition: xmlstorage.h:181

Referenced by AtapAtaSetMultipleMode().

◆ AtaDevDefaultChsTranslation()

FORCEINLINE VOID AtaDevDefaultChsTranslation ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData,
_Out_ PUSHORT  Cylinders,
_Out_ PUSHORT  Heads,
_Out_ PUSHORT  SectorsPerTrack 
)

Definition at line 290 of file hwidep.h.

295{
296 /* Word 1 */
297 *Cylinders = IdentifyData->NumCylinders;
298
299 /* Word 3 */
300 *Heads = IdentifyData->NumHeads;
301
302 /* Word 6 */
303 *SectorsPerTrack = IdentifyData->NumSectorsPerTrack;
304}

Referenced by AtapAtaInitDevice().

◆ AtaDevHas48BitAddressFeature()

FORCEINLINE BOOLEAN AtaDevHas48BitAddressFeature ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 262 of file hwidep.h.

264{
265 /* Word 83: 15 = 0, 14 = 1 */
266 if (IdentifyData->CommandSetSupport.WordValid83 == 1)
267 {
268 /* Bit 10 of word 83 */
269 return IdentifyData->CommandSetSupport.BigLba;
270 }
271
272 return FALSE;
273}
#define FALSE
Definition: types.h:117

Referenced by AtapAtaInitDevice().

◆ AtaDevHasLbaTranslation()

FORCEINLINE BOOLEAN AtaDevHasLbaTranslation ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 235 of file hwidep.h.

237{
238 /* Bit 9 of word 49 */
239 return IdentifyData->Capabilities.LbaSupported;
240}

Referenced by AtapAtaInitDevice().

◆ AtaDevIsCurrentGeometryValid()

FORCEINLINE BOOLEAN AtaDevIsCurrentGeometryValid ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 277 of file hwidep.h.

279{
280 return ((IdentifyData->TranslationFieldsValid & 1) &&
281 (IdentifyData->NumberOfCurrentCylinders != 0) &&
282 (IdentifyData->NumberOfCurrentCylinders <= 63) &&
283 (IdentifyData->NumberOfCurrentHeads != 0) &&
284 (IdentifyData->NumberOfCurrentHeads <= 16) &&
285 (IdentifyData->CurrentSectorsPerTrack != 0));
286}

Referenced by AtapAtaInitDevice().

◆ AtaDevIsIdentifyDataValid()

FORCEINLINE BOOLEAN AtaDevIsIdentifyDataValid ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 201 of file hwidep.h.

203{
204 ULONG i;
205 UCHAR Crc;
206
207 /* Bits 0:8 of word 255 */
208 if (IdentifyData->Signature != 0xA5)
209 {
210 /* The integrity word is missing, assume the data provided by the device is valid */
211 return TRUE;
212 }
213
214 /* Verify the checksum */
215 Crc = 0;
216 for (i = 0; i < sizeof(*IdentifyData); ++i)
217 {
218 Crc += ((PUCHAR)IdentifyData)[i];
219 }
220
221 return (Crc == 0);
222}
#define TRUE
Definition: types.h:120
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 * PUCHAR
Definition: typedefs.h:53

Referenced by AtapAnalyzeIdentifyData().

◆ AtaDevMaximumSectorsPerDrq()

FORCEINLINE UCHAR AtaDevMaximumSectorsPerDrq ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 346 of file hwidep.h.

348{
349 UCHAR MultiSectorMax;
350
351 /* The word 47 should be a power of 2 */
352 MultiSectorMax = IdentifyData->MaximumBlockTransfer;
353
354 if ((MultiSectorMax > 0) && ((MultiSectorMax & (MultiSectorMax - 1)) == 0))
355 return MultiSectorMax;
356
357 return 0;
358}

Referenced by AtapAtaSetMultipleMode().

◆ AtaDevUserAddressableSectors28Bit()

FORCEINLINE ULONG AtaDevUserAddressableSectors28Bit ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 244 of file hwidep.h.

246{
247 /* Words 60-61 */
248 return IdentifyData->UserAddressableSectors;
249}

Referenced by AtapAtaInitDevice().

◆ AtaDevUserAddressableSectors48Bit()

FORCEINLINE ULONG64 AtaDevUserAddressableSectors48Bit ( _In_ PIDENTIFY_DEVICE_DATA  IdentifyData)

Definition at line 253 of file hwidep.h.

255{
256 /* Words 100-103 */
257 return ((ULONG64)IdentifyData->Max48BitLBA[1] << 32) | IdentifyData->Max48BitLBA[0];
258}
unsigned __int64 ULONG64
Definition: imports.h:198

Referenced by AtapAtaInitDevice().