#include <pshpack1.h>
#include <poppack.h>
Go to the source code of this file.
◆ ATA_DEVICE_ATAPI
#define ATA_DEVICE_ATAPI (1 << 0) |
◆ ATA_DEVICE_CHS
#define ATA_DEVICE_CHS (1 << 5) |
◆ ATA_DEVICE_LBA
#define ATA_DEVICE_LBA (1 << 4) |
◆ ATA_DEVICE_LBA48
#define ATA_DEVICE_LBA48 (1 << 3) |
◆ ATA_DEVICE_NO_MEDIA
#define ATA_DEVICE_NO_MEDIA (1 << 1) |
◆ ATA_DEVICE_NOT_READY
#define ATA_DEVICE_NOT_READY (1 << 2) |
◆ ATA_PIO
◆ ATAPI_MAGIC_LSB
◆ ATAPI_MAGIC_MSB
◆ IDE_DC_A_4BIT
◆ IDE_DC_DISABLE_INTERRUPTS
#define IDE_DC_DISABLE_INTERRUPTS 0x02 |
◆ IDE_DC_REENABLE_CONTROLLER
#define IDE_DC_REENABLE_CONTROLLER 0x00 |
◆ IDE_DC_RESET_CONTROLLER
#define IDE_DC_RESET_CONTROLLER 0x04 |
◆ IDE_DC_USE_HOB
◆ IDE_DRIVE_1
◆ IDE_DRIVE_2
◆ IDE_DRIVE_MASK
◆ IDE_DRIVE_SELECT
◆ IDE_DRIVE_SELECT_1
◆ IDE_DRIVE_SELECT_2
◆ IDE_ERROR_BAD_BLOCK
#define IDE_ERROR_BAD_BLOCK 0x80 |
◆ IDE_ERROR_COMMAND_ABORTED
#define IDE_ERROR_COMMAND_ABORTED 0x04 |
◆ IDE_ERROR_DATA_ERROR
#define IDE_ERROR_DATA_ERROR 0x40 |
◆ IDE_ERROR_END_OF_MEDIA
#define IDE_ERROR_END_OF_MEDIA 0x02 |
◆ IDE_ERROR_ICRC
◆ IDE_ERROR_ID_NOT_FOUND
#define IDE_ERROR_ID_NOT_FOUND 0x10 |
◆ IDE_ERROR_ILLEGAL_LENGTH
#define IDE_ERROR_ILLEGAL_LENGTH 0x01 |
◆ IDE_ERROR_MEDIA_CHANGE
#define IDE_ERROR_MEDIA_CHANGE 0x20 |
◆ IDE_ERROR_MEDIA_CHANGE_REQ
#define IDE_ERROR_MEDIA_CHANGE_REQ 0x08 |
◆ IDE_ERROR_NO_MEDIA
#define IDE_ERROR_NO_MEDIA 0x02 |
◆ IDE_STATUS_BUSY
◆ IDE_STATUS_CORRECTED_ERROR
#define IDE_STATUS_CORRECTED_ERROR 0x04 |
◆ IDE_STATUS_DMA
#define IDE_STATUS_DMA 0x20 /* DMA ready */ |
◆ IDE_STATUS_DRDY
◆ IDE_STATUS_DRQ
◆ IDE_STATUS_DSC
◆ IDE_STATUS_DWF
◆ IDE_STATUS_ERROR
◆ IDE_STATUS_IDLE
◆ IDE_STATUS_INDEX
◆ IDE_STATUS_MASK
◆ IDE_STATUS_SUCCESS
#define IDE_STATUS_SUCCESS 0x00 |
◆ IDE_STATUS_WRONG
◆ IDE_USE_LBA
◆ IDENTIFY_DATA_SIZE
◆ IDX_ATAPI_IO1_i_ByteCountHigh
#define IDX_ATAPI_IO1_i_ByteCountHigh 0x05 |
◆ IDX_ATAPI_IO1_i_ByteCountLow
#define IDX_ATAPI_IO1_i_ByteCountLow 0x04 |
◆ IDX_ATAPI_IO1_i_Data
#define IDX_ATAPI_IO1_i_Data 0x00 |
◆ IDX_ATAPI_IO1_i_DriveSelect
#define IDX_ATAPI_IO1_i_DriveSelect 0x06 |
◆ IDX_ATAPI_IO1_i_Error
#define IDX_ATAPI_IO1_i_Error 0x01 |
◆ IDX_ATAPI_IO1_i_InterruptReason
#define IDX_ATAPI_IO1_i_InterruptReason 0x02 |
◆ IDX_ATAPI_IO1_i_Status
#define IDX_ATAPI_IO1_i_Status 0x07 |
◆ IDX_ATAPI_IO1_i_Unused1
#define IDX_ATAPI_IO1_i_Unused1 0x03 |
◆ IDX_ATAPI_IO1_o_ByteCountHigh
#define IDX_ATAPI_IO1_o_ByteCountHigh 0x05 |
◆ IDX_ATAPI_IO1_o_ByteCountLow
#define IDX_ATAPI_IO1_o_ByteCountLow 0x04 |
◆ IDX_ATAPI_IO1_o_Command
#define IDX_ATAPI_IO1_o_Command 0x07 |
◆ IDX_ATAPI_IO1_o_Data
#define IDX_ATAPI_IO1_o_Data 0x00 |
◆ IDX_ATAPI_IO1_o_DriveSelect
#define IDX_ATAPI_IO1_o_DriveSelect 0x06 |
◆ IDX_ATAPI_IO1_o_Feature
#define IDX_ATAPI_IO1_o_Feature 0x01 |
◆ IDX_ATAPI_IO1_o_Unused0
#define IDX_ATAPI_IO1_o_Unused0 0x02 |
◆ IDX_ATAPI_IO1_o_Unused1
#define IDX_ATAPI_IO1_o_Unused1 0x03 |
◆ IDX_IO1_i_BlockCount
#define IDX_IO1_i_BlockCount 0x02 |
◆ IDX_IO1_i_BlockNumber
#define IDX_IO1_i_BlockNumber 0x03 |
◆ IDX_IO1_i_CylinderHigh
#define IDX_IO1_i_CylinderHigh 0x05 |
◆ IDX_IO1_i_CylinderLow
#define IDX_IO1_i_CylinderLow 0x04 |
◆ IDX_IO1_i_Data
◆ IDX_IO1_i_DriveSelect
#define IDX_IO1_i_DriveSelect 0x06 |
◆ IDX_IO1_i_Error
◆ IDX_IO1_i_Status
◆ IDX_IO1_o_BlockCount
#define IDX_IO1_o_BlockCount 0x02 |
◆ IDX_IO1_o_BlockNumber
#define IDX_IO1_o_BlockNumber 0x03 |
◆ IDX_IO1_o_Command
#define IDX_IO1_o_Command 0x07 |
◆ IDX_IO1_o_CylinderHigh
#define IDX_IO1_o_CylinderHigh 0x05 |
◆ IDX_IO1_o_CylinderLow
#define IDX_IO1_o_CylinderLow 0x04 |
◆ IDX_IO1_o_Data
◆ IDX_IO1_o_DriveSelect
#define IDX_IO1_o_DriveSelect 0x06 |
◆ IDX_IO1_o_Feature
#define IDX_IO1_o_Feature 0x01 |
◆ IDX_IO2_i_AltStatus
#define IDX_IO2_i_AltStatus 0x206 |
◆ IDX_IO2_i_DriveAddress
#define IDX_IO2_i_DriveAddress 0x207 |
◆ IDX_IO2_o_Control
#define IDX_IO2_o_Control 0x206 |
◆ MAXIMUM_CDROM_SIZE
#define MAXIMUM_CDROM_SIZE 804 |
◆ DEVICE_UNIT
◆ IDENTIFY_DATA
◆ PDEVICE_UNIT
◆ PIDENTIFY_DATA
◆ AtaAtapiReadLogicalSectorsLBA()
Definition at line 187 of file hwide.c.
192{
195
198
200 {
202 {
203
204 for (RetryCount = 0; RetryCount < 4; ++RetryCount)
205 {
206
208 break;
209 }
210 if (RetryCount >= 4)
211 {
212 ERR(
"AtaAtapiReadLogicalSectorsLBA(): Device not ready.\n");
214 }
215 }
216 if (SectorNumber +
SectorCount > DeviceUnit->TotalSectors + 1)
217 {
218 ERR(
"AtaAtapiReadLogicalSectorsLBA(): Attempt to read more than there is to read.\n");
220 }
221
223 {
224
228
230 ++SectorNumber;
232 }
233 }
234 else
235 {
236
237 for (RetryCount = 0; RetryCount < 3; ++RetryCount)
238 {
239
243 }
245 }
246
248}
static BOOLEAN AtapiReadyCheck(IN OUT PDEVICE_UNIT DeviceUnit)
static BOOLEAN AtapiReadLogicalSectorLBA(IN PDEVICE_UNIT DeviceUnit, IN ULONGLONG SectorNumber, OUT PVOID Buffer)
static BOOLEAN AtaReadLogicalSectorsLBA(IN PDEVICE_UNIT DeviceUnit, IN ULONGLONG SectorNumber, IN ULONG SectorCount, OUT PVOID Buffer)
#define ATA_DEVICE_NOT_READY
#define ATA_DEVICE_NO_MEDIA
Referenced by Pc98DiskReadLogicalSectorsLBA(), and XboxDiskReadLogicalSectors().
◆ AtaFree()
◆ AtaGetDevice()
◆ AtaInit()
Definition at line 139 of file hwide.c.
140{
143
144 TRACE(
"AtaInit()\n");
145
146 *DetectedCount = 0;
147
149
150
152 {
154 {
156 {
157 Units[(*DetectedCount)++] = DeviceUnit;
158 }
159 }
160 }
161
162 return (*DetectedCount > 0);
163}
_In_ PCHAR _In_ ULONG DeviceNumber
static BOOLEAN IdentifyDevice(IN UCHAR Channel, IN UCHAR DeviceNumber, OUT PDEVICE_UNIT *DeviceUnit)
#define RtlZeroMemory(Destination, Length)
Referenced by Pc98InitializeBootDevices(), and XboxDiskInit().