Code scrub for IdeBusDxe driver

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8663 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jchen20 2009-06-26 03:23:08 +00:00
parent 8e8227d1a3
commit cd57e8889c
6 changed files with 104 additions and 82 deletions

View File

@ -1281,7 +1281,7 @@ AtaPioDataInExt (
return CheckErrorStatus (IdeDev); return CheckErrorStatus (IdeDev);
} }
/** /**
Send ATA Ext command into device with NON_DATA protocol Send ATA Ext command into device with NON_DATA protocol.
@param IdeDev Standard IDE device private data structure @param IdeDev Standard IDE device private data structure
@param AtaCommand The ATA command to be sent @param AtaCommand The ATA command to be sent
@ -2027,7 +2027,7 @@ AtaReadSectorsExt (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the read request is for. @param MediaId The media id that the read request is for.
@param LBA The starting logical block address to read from on the device. @param Lba The starting logical block address to read from on the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@ -2052,7 +2052,7 @@ EFI_STATUS
AtaBlkIoReadBlocks ( AtaBlkIoReadBlocks (
IN IDE_BLK_IO_DEV *IdeBlkIoDevice, IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
IN UINT32 MediaId, IN UINT32 MediaId,
IN EFI_LBA LBA, IN EFI_LBA Lba,
IN UINTN BufferSize, IN UINTN BufferSize,
OUT VOID *Buffer OUT VOID *Buffer
) )
@ -2092,11 +2092,11 @@ AtaBlkIoReadBlocks (
return EFI_NO_MEDIA; return EFI_NO_MEDIA;
} }
if (LBA > Media->LastBlock) { if (Lba > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if ((LBA + NumberOfBlocks - 1) > Media->LastBlock) { if ((Lba + NumberOfBlocks - 1) > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -2110,18 +2110,18 @@ AtaBlkIoReadBlocks (
// For ATA/ATAPI-6 device(capcity > 120GB), use ATA-6 read block mechanism // For ATA/ATAPI-6 device(capcity > 120GB), use ATA-6 read block mechanism
// //
if (IdeBlkIoDevice->UdmaMode.Valid) { if (IdeBlkIoDevice->UdmaMode.Valid) {
Status = AtaUdmaReadExt (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaUdmaReadExt (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} else { } else {
Status = AtaReadSectorsExt (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaReadSectorsExt (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} }
} else { } else {
// //
// For ATA-3 compatible device, use ATA-3 read block mechanism // For ATA-3 compatible device, use ATA-3 read block mechanism
// //
if (IdeBlkIoDevice->UdmaMode.Valid) { if (IdeBlkIoDevice->UdmaMode.Valid) {
Status = AtaUdmaRead (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaUdmaRead (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} else { } else {
Status = AtaReadSectors (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaReadSectors (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} }
} }
@ -2419,7 +2419,7 @@ AtaWriteSectorsExt (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the write request is for. @param MediaId The media id that the write request is for.
@param LBA The starting logical block address to write onto the device. @param Lba The starting logical block address to write onto the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@param Buffer A pointer to the source buffer for the data.The caller @param Buffer A pointer to the source buffer for the data.The caller
@ -2443,7 +2443,7 @@ EFI_STATUS
AtaBlkIoWriteBlocks ( AtaBlkIoWriteBlocks (
IN IDE_BLK_IO_DEV *IdeBlkIoDevice, IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
IN UINT32 MediaId, IN UINT32 MediaId,
IN EFI_LBA LBA, IN EFI_LBA Lba,
IN UINTN BufferSize, IN UINTN BufferSize,
OUT VOID *Buffer OUT VOID *Buffer
) )
@ -2479,11 +2479,11 @@ AtaBlkIoWriteBlocks (
return EFI_BAD_BUFFER_SIZE; return EFI_BAD_BUFFER_SIZE;
} }
if (LBA > Media->LastBlock) { if (Lba > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if ((LBA + NumberOfBlocks - 1) > Media->LastBlock) { if ((Lba + NumberOfBlocks - 1) > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -2497,18 +2497,18 @@ AtaBlkIoWriteBlocks (
// For ATA/ATAPI-6 device(capcity > 120GB), use ATA-6 write block mechanism // For ATA/ATAPI-6 device(capcity > 120GB), use ATA-6 write block mechanism
// //
if (IdeBlkIoDevice->UdmaMode.Valid) { if (IdeBlkIoDevice->UdmaMode.Valid) {
Status = AtaUdmaWriteExt (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaUdmaWriteExt (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} else { } else {
Status = AtaWriteSectorsExt (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaWriteSectorsExt (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} }
} else { } else {
// //
// For ATA-3 compatible device, use ATA-3 write block mechanism // For ATA-3 compatible device, use ATA-3 write block mechanism
// //
if (IdeBlkIoDevice->UdmaMode.Valid) { if (IdeBlkIoDevice->UdmaMode.Valid) {
Status = AtaUdmaWrite (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaUdmaWrite (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} else { } else {
Status = AtaWriteSectors (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtaWriteSectors (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
} }
} }
@ -2619,7 +2619,7 @@ AtaNonDataCommandIn (
} }
// //
// Select device (bit4), set LBA mode(bit6) (use 0xe0 for compatibility) // Select device (bit4), set Lba mode(bit6) (use 0xe0 for compatibility)
// //
IDEWritePortB ( IDEWritePortB (
IdeDev->PciIo, IdeDev->PciIo,

View File

@ -1698,7 +1698,7 @@ AtapiSoftReset (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the read request is for. @param MediaId The media id that the read request is for.
@param LBA The starting logical block address to read from on the device. @param Lba The starting logical block address to read from on the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@param Buffer A pointer to the destination buffer for the data. The caller @param Buffer A pointer to the destination buffer for the data. The caller
@ -1718,7 +1718,7 @@ EFI_STATUS
AtapiBlkIoReadBlocks ( AtapiBlkIoReadBlocks (
IN IDE_BLK_IO_DEV *IdeBlkIoDevice, IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
IN UINT32 MediaId, IN UINT32 MediaId,
IN EFI_LBA LBA, IN EFI_LBA Lba,
IN UINTN BufferSize, IN UINTN BufferSize,
OUT VOID *Buffer OUT VOID *Buffer
) )
@ -1784,11 +1784,11 @@ AtapiBlkIoReadBlocks (
return EFI_BAD_BUFFER_SIZE; return EFI_BAD_BUFFER_SIZE;
} }
if (LBA > Media->LastBlock) { if (Lba > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if ((LBA + NumberOfBlocks - 1) > Media->LastBlock) { if ((Lba + NumberOfBlocks - 1) > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -1800,7 +1800,7 @@ AtapiBlkIoReadBlocks (
// if all the parameters are valid, then perform read sectors command // if all the parameters are valid, then perform read sectors command
// to transfer data from device to host. // to transfer data from device to host.
// //
Status = AtapiReadSectors (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtapiReadSectors (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
@ -1812,7 +1812,7 @@ AtapiBlkIoReadBlocks (
// //
// save the first block to the cache for performance // save the first block to the cache for performance
// //
if (LBA == 0 && (IdeBlkIoDevice->Cache == NULL)) { if (Lba == 0 && (IdeBlkIoDevice->Cache == NULL)) {
IdeBlkIoDevice->Cache = AllocatePool (BlockSize); IdeBlkIoDevice->Cache = AllocatePool (BlockSize);
if (IdeBlkIoDevice->Cache!= NULL) { if (IdeBlkIoDevice->Cache!= NULL) {
CopyMem ((UINT8 *) IdeBlkIoDevice->Cache, (UINT8 *) Buffer, BlockSize); CopyMem ((UINT8 *) IdeBlkIoDevice->Cache, (UINT8 *) Buffer, BlockSize);
@ -1828,7 +1828,7 @@ AtapiBlkIoReadBlocks (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the write request is for. @param MediaId The media id that the write request is for.
@param LBA The starting logical block address to write onto the device. @param Lba The starting logical block address to write onto the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@param Buffer A pointer to the source buffer for the data. The caller @param Buffer A pointer to the source buffer for the data. The caller
@ -1850,7 +1850,7 @@ EFI_STATUS
AtapiBlkIoWriteBlocks ( AtapiBlkIoWriteBlocks (
IN IDE_BLK_IO_DEV *IdeBlkIoDevice, IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
IN UINT32 MediaId, IN UINT32 MediaId,
IN EFI_LBA LBA, IN EFI_LBA Lba,
IN UINTN BufferSize, IN UINTN BufferSize,
OUT VOID *Buffer OUT VOID *Buffer
) )
@ -1862,7 +1862,7 @@ AtapiBlkIoWriteBlocks (
EFI_STATUS Status; EFI_STATUS Status;
BOOLEAN MediaChange; BOOLEAN MediaChange;
if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) { if (Lba == 0 && IdeBlkIoDevice->Cache != NULL) {
gBS->FreePool (IdeBlkIoDevice->Cache); gBS->FreePool (IdeBlkIoDevice->Cache);
IdeBlkIoDevice->Cache = NULL; IdeBlkIoDevice->Cache = NULL;
} }
@ -1883,7 +1883,7 @@ AtapiBlkIoWriteBlocks (
Status = AtapiDetectMedia (IdeBlkIoDevice, &MediaChange); Status = AtapiDetectMedia (IdeBlkIoDevice, &MediaChange);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) { if (Lba == 0 && IdeBlkIoDevice->Cache != NULL) {
gBS->FreePool (IdeBlkIoDevice->Cache); gBS->FreePool (IdeBlkIoDevice->Cache);
IdeBlkIoDevice->Cache = NULL; IdeBlkIoDevice->Cache = NULL;
} }
@ -1899,7 +1899,7 @@ AtapiBlkIoWriteBlocks (
if (!(Media->MediaPresent)) { if (!(Media->MediaPresent)) {
if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) { if (Lba == 0 && IdeBlkIoDevice->Cache != NULL) {
gBS->FreePool (IdeBlkIoDevice->Cache); gBS->FreePool (IdeBlkIoDevice->Cache);
IdeBlkIoDevice->Cache = NULL; IdeBlkIoDevice->Cache = NULL;
} }
@ -1908,7 +1908,7 @@ AtapiBlkIoWriteBlocks (
if ((MediaId != Media->MediaId) || MediaChange) { if ((MediaId != Media->MediaId) || MediaChange) {
if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) { if (Lba == 0 && IdeBlkIoDevice->Cache != NULL) {
gBS->FreePool (IdeBlkIoDevice->Cache); gBS->FreePool (IdeBlkIoDevice->Cache);
IdeBlkIoDevice->Cache = NULL; IdeBlkIoDevice->Cache = NULL;
} }
@ -1923,11 +1923,11 @@ AtapiBlkIoWriteBlocks (
return EFI_BAD_BUFFER_SIZE; return EFI_BAD_BUFFER_SIZE;
} }
if (LBA > Media->LastBlock) { if (Lba > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if ((LBA + NumberOfBlocks - 1) > Media->LastBlock) { if ((Lba + NumberOfBlocks - 1) > Media->LastBlock) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -1939,7 +1939,7 @@ AtapiBlkIoWriteBlocks (
// if all the parameters are valid, // if all the parameters are valid,
// then perform write sectors command to transfer data from host to device. // then perform write sectors command to transfer data from host to device.
// //
Status = AtapiWriteSectors (IdeBlkIoDevice, Buffer, LBA, NumberOfBlocks); Status = AtapiWriteSectors (IdeBlkIoDevice, Buffer, Lba, NumberOfBlocks);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }

View File

@ -21,12 +21,12 @@ BOOLEAN MasterDeviceExist = FALSE;
UINT8 MasterDeviceType = INVALID_DEVICE_TYPE; UINT8 MasterDeviceType = INVALID_DEVICE_TYPE;
/** /**
read a one-byte data from a IDE port read a one-byte data from a IDE port.
@param PciIo The PCI IO protocol instance @param PciIo The PCI IO protocol instance
@param Port the IDE Port number @param Port the IDE Port number
return the one-byte data read from IDE port @return the one-byte data read from IDE port
**/ **/
UINT8 UINT8
IDEReadPortB ( IDEReadPortB (
@ -109,7 +109,7 @@ IDEReadPortWMultiple (
} }
/** /**
write a 1-byte data to a specific IDE port write a 1-byte data to a specific IDE port.
@param PciIo PCI IO protocol instance @param PciIo PCI IO protocol instance
@param Port The IDE port to be writen @param Port The IDE port to be writen
@ -137,7 +137,7 @@ IDEWritePortB (
} }
/** /**
write a 1-word data to a specific IDE port write a 1-word data to a specific IDE port.
@param PciIo PCI IO protocol instance @param PciIo PCI IO protocol instance
@param Port The IDE port to be writen @param Port The IDE port to be writen
@ -269,7 +269,11 @@ IDEWritePortWMultiple (
@param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance @param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance
@param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to @param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to
receive IDE IO port registers' base addresses receive IDE IO port registers' base addresses
@retval EFI_UNSUPPORTED return this value when the BARs is not IO type
@retval EFI_SUCCESS Get the Base address successfully
@retval other read the pci configureation data error
**/ **/
EFI_STATUS EFI_STATUS
@ -347,6 +351,10 @@ GetIdeRegistersBaseAddr (
succeess. succeess.
@param IdeDev The BLK_IO private data which specifies the IDE device @param IdeDev The BLK_IO private data which specifies the IDE device
@retval EFI_INVALID_PARAMETER return this value when the channel is invalid
@retval EFI_SUCCESS reassign the IDE IO resource successfully
@retval other get the IDE current base address effor
**/ **/
EFI_STATUS EFI_STATUS
@ -585,6 +593,9 @@ DetectIDEController (
Detect if there is disk attached to this port Detect if there is disk attached to this port
@param IdeDev The BLK_IO private data which specifies the IDE device. @param IdeDev The BLK_IO private data which specifies the IDE device.
@retval EFI_NOT_FOUND The device or channel is not found
@retval EFI_SUCCESS The device is found
**/ **/
EFI_STATUS EFI_STATUS
@ -1007,7 +1018,7 @@ WaitForBSYClear (
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
all the information of the IDE device. all the information of the IDE device.
@paramTimeoutInMilliSeconds used to designate the timeout for the DRQ ready. @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
@retval EFI_SUCCESS BSY bit clear within the time out. @retval EFI_SUCCESS BSY bit clear within the time out.
@retval EFI_TIMEOUT BSY bit not clear within the time out. @retval EFI_TIMEOUT BSY bit not clear within the time out.
@ -1212,7 +1223,7 @@ ReleaseIdeResources (
return ; return ;
} }
/** /**
Set the calculated Best transfer mode to a detected device Set the calculated Best transfer mode to a detected device.
@param IdeDev Standard IDE device private data structure @param IdeDev Standard IDE device private data structure
@param TransferMode The device transfer mode to be set @param TransferMode The device transfer mode to be set
@ -1250,7 +1261,7 @@ SetDeviceTransferMode (
return Status; return Status;
} }
/** /**
Set drive parameters for devices not support PACKETS command Set drive parameters for devices not support PACKETS command.
@param IdeDev Standard IDE device private data structure @param IdeDev Standard IDE device private data structure
@param DriveParameters The device parameters to be set into the disk @param DriveParameters The device parameters to be set into the disk
@ -1300,7 +1311,7 @@ SetDriveParameters (
} }
/** /**
Enable Interrupt on IDE controller Enable Interrupt on IDE controller.
@param IdeDev Standard IDE device private data structure @param IdeDev Standard IDE device private data structure

View File

@ -25,7 +25,7 @@
// Helper functions Prototype // Helper functions Prototype
// //
/** /**
read a one-byte data from a IDE port read a one-byte data from a IDE port.
@param PciIo The PCI IO protocol instance @param PciIo The PCI IO protocol instance
@param Port the IDE Port number @param Port the IDE Port number
@ -41,7 +41,7 @@ IDEReadPortB (
/** /**
Reads multiple words of data from the IDE data port. Reads multiple words of data from the IDE data port.
Call the IO abstraction once to do the complete read, Call the IO abstraction once to do the complete read,
not one word at a time not one word at a time.
@param PciIo Pointer to the EFI_PCI_IO instance @param PciIo Pointer to the EFI_PCI_IO instance
@param Port IO port to read @param Port IO port to read
@ -58,7 +58,7 @@ IDEReadPortWMultiple (
); );
/** /**
write a 1-byte data to a specific IDE port write a 1-byte data to a specific IDE port.
@param PciIo PCI IO protocol instance @param PciIo PCI IO protocol instance
@param Port The IDE port to be writen @param Port The IDE port to be writen
@ -72,7 +72,7 @@ IDEWritePortB (
); );
/** /**
write a 1-word data to a specific IDE port write a 1-word data to a specific IDE port.
@param PciIo PCI IO protocol instance @param PciIo PCI IO protocol instance
@param Port The IDE port to be writen @param Port The IDE port to be writen
@ -88,7 +88,7 @@ IDEWritePortW (
/** /**
Write multiple words of data to the IDE data port. Write multiple words of data to the IDE data port.
Call the IO abstraction once to do the complete read, Call the IO abstraction once to do the complete read,
not one word at a time not one word at a time.
@param PciIo Pointer to the EFI_PCI_IO instance @param PciIo Pointer to the EFI_PCI_IO instance
@param Port IO port to read @param Port IO port to read
@ -152,7 +152,11 @@ IDEWritePortWMultiple (
@param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance @param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance
@param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to @param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to
receive IDE IO port registers' base addresses receive IDE IO port registers' base addresses
@retval EFI_UNSUPPORTED return this value when the BARs is not IO type
@retval EFI_SUCCESS Get the Base address successfully
@retval other read the pci configureation data error
**/ **/
EFI_STATUS EFI_STATUS
@ -169,6 +173,10 @@ GetIdeRegistersBaseAddr (
@param IdeDev The BLK_IO private data which specifies the IDE device @param IdeDev The BLK_IO private data which specifies the IDE device
@retval EFI_INVALID_PARAMETER return this value when the channel is invalid
@retval EFI_SUCCESS reassign the IDE IO resource successfully
@retval other get the IDE current base address effor
**/ **/
EFI_STATUS EFI_STATUS
ReassignIdeResources ( ReassignIdeResources (
@ -176,9 +184,12 @@ ReassignIdeResources (
); );
/** /**
Detect if there is disk attached to this port Detect if there is disk attached to this port.
@param IdeDev The BLK_IO private data which specifies the IDE device. @param IdeDev The BLK_IO private data which specifies the IDE device.
@retval EFI_NOT_FOUND The device or channel is not found
@retval EFI_SUCCESS The device is found
**/ **/
EFI_STATUS EFI_STATUS
@ -317,7 +328,7 @@ WaitForBSYClear (
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
all the information of the IDE device. all the information of the IDE device.
@paramTimeoutInMilliSeconds used to designate the timeout for the DRQ ready. @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
@retval EFI_SUCCESS BSY bit clear within the time out. @retval EFI_SUCCESS BSY bit clear within the time out.
@retval EFI_TIMEOUT BSY bit not clear within the time out. @retval EFI_TIMEOUT BSY bit not clear within the time out.
@ -519,7 +530,7 @@ AtaSoftReset (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the read request is for. @param MediaId The media id that the read request is for.
@param LBA The starting logical block address to read from on the device. @param Lba The starting logical block address to read from on the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@ -555,7 +566,7 @@ AtaBlkIoReadBlocks (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the write request is for. @param MediaId The media id that the write request is for.
@param LBA The starting logical block address to write onto the device. @param Lba The starting logical block address to write onto the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@param Buffer A pointer to the source buffer for the data.The caller @param Buffer A pointer to the source buffer for the data.The caller
@ -649,7 +660,7 @@ AtapiSoftReset (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the read request is for. @param MediaId The media id that the read request is for.
@param LBA The starting logical block address to read from on the device. @param Lba The starting logical block address to read from on the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@param Buffer A pointer to the destination buffer for the data. The caller @param Buffer A pointer to the destination buffer for the data. The caller
@ -680,7 +691,7 @@ AtapiBlkIoReadBlocks (
@param IdeBlkIoDevice Indicates the calling context. @param IdeBlkIoDevice Indicates the calling context.
@param MediaId The media id that the write request is for. @param MediaId The media id that the write request is for.
@param LBA The starting logical block address to write onto the device. @param Lba The starting logical block address to write onto the device.
@param BufferSize The size of the Buffer in bytes. This must be a multiple @param BufferSize The size of the Buffer in bytes. This must be a multiple
of the intrinsic block size of the device. of the intrinsic block size of the device.
@param Buffer A pointer to the source buffer for the data. The caller @param Buffer A pointer to the source buffer for the data. The caller
@ -731,7 +742,7 @@ SetDeviceTransferMode (
IN ATA_TRANSFER_MODE *TransferMode IN ATA_TRANSFER_MODE *TransferMode
); );
/** /**
Send ATA command into device with NON_DATA protocol Send ATA command into device with NON_DATA protocol.
@param IdeDev Standard IDE device private data structure @param IdeDev Standard IDE device private data structure
@param AtaCommand The ATA command to be sent @param AtaCommand The ATA command to be sent
@ -760,14 +771,14 @@ AtaNonDataCommandIn (
); );
/** /**
Send ATA Ext command into device with NON_DATA protocol Send ATA Ext command into device with NON_DATA protocol.
@param IdeDev Standard IDE device private data structure @param IdeDev Standard IDE device private data structure
@param AtaCommand The ATA command to be sent @param AtaCommand The ATA command to be sent
@param Device The value in Device register @param Device The value in Device register
@param Feature The value in Feature register @param Feature The value in Feature register
@param SectorCount The value in SectorCount register @param SectorCount The value in SectorCount register
@param LbaAddress The LBA address in 48-bit mode @param LbaAddress The Lba address in 48-bit mode
@retval EFI_SUCCESS Reading succeed @retval EFI_SUCCESS Reading succeed
@retval EFI_ABORTED Command failed @retval EFI_ABORTED Command failed
@ -799,7 +810,7 @@ AtaEnableLongPhysicalSector (
); );
/** /**
Set drive parameters for devices not support PACKETS command Set drive parameters for devices not support PACKETS command.
@param IdeDev Standard IDE device private data structure @param IdeDev Standard IDE device private data structure
@param DriveParameters The device parameters to be set into the disk @param DriveParameters The device parameters to be set into the disk

View File

@ -1087,7 +1087,7 @@ Done:
@param This Block IO protocol instance pointer. @param This Block IO protocol instance pointer.
@param MediaId The media ID of the device @param MediaId The media ID of the device
@param LBA Starting LBA address to read data @param Lba Starting LBA address to read data
@param BufferSize The size of data to be read @param BufferSize The size of data to be read
@param Buffer Caller supplied buffer to save data @param Buffer Caller supplied buffer to save data
@ -1100,7 +1100,7 @@ EFIAPI
IDEBlkIoReadBlocks ( IDEBlkIoReadBlocks (
IN EFI_BLOCK_IO_PROTOCOL *This, IN EFI_BLOCK_IO_PROTOCOL *This,
IN UINT32 MediaId, IN UINT32 MediaId,
IN EFI_LBA LBA, IN EFI_LBA Lba,
IN UINTN BufferSize, IN UINTN BufferSize,
OUT VOID *Buffer OUT VOID *Buffer
) )
@ -1126,7 +1126,7 @@ IDEBlkIoReadBlocks (
Status = AtaBlkIoReadBlocks ( Status = AtaBlkIoReadBlocks (
IdeBlkIoDevice, IdeBlkIoDevice,
MediaId, MediaId,
LBA, Lba,
BufferSize, BufferSize,
Buffer Buffer
); );
@ -1144,7 +1144,7 @@ IDEBlkIoReadBlocks (
Status = AtapiBlkIoReadBlocks ( Status = AtapiBlkIoReadBlocks (
IdeBlkIoDevice, IdeBlkIoDevice,
MediaId, MediaId,
LBA, Lba,
BufferSize, BufferSize,
Buffer Buffer
); );
@ -1156,11 +1156,11 @@ Done:
} }
/** /**
Write data to block io device Write data to block io device.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param MediaId The media ID of the device @param MediaId The media ID of the device
@param LBA Starting LBA address to write data @param Lba Starting LBA address to write data
@param BufferSize The size of data to be written @param BufferSize The size of data to be written
@param Buffer Caller supplied buffer to save data @param Buffer Caller supplied buffer to save data
@ -1173,7 +1173,7 @@ EFIAPI
IDEBlkIoWriteBlocks ( IDEBlkIoWriteBlocks (
IN EFI_BLOCK_IO_PROTOCOL *This, IN EFI_BLOCK_IO_PROTOCOL *This,
IN UINT32 MediaId, IN UINT32 MediaId,
IN EFI_LBA LBA, IN EFI_LBA Lba,
IN UINTN BufferSize, IN UINTN BufferSize,
IN VOID *Buffer IN VOID *Buffer
) )
@ -1199,7 +1199,7 @@ IDEBlkIoWriteBlocks (
Status = AtaBlkIoWriteBlocks ( Status = AtaBlkIoWriteBlocks (
IdeBlkIoDevice, IdeBlkIoDevice,
MediaId, MediaId,
LBA, Lba,
BufferSize, BufferSize,
Buffer Buffer
); );
@ -1217,7 +1217,7 @@ IDEBlkIoWriteBlocks (
Status = AtapiBlkIoWriteBlocks ( Status = AtapiBlkIoWriteBlocks (
IdeBlkIoDevice, IdeBlkIoDevice,
MediaId, MediaId,
LBA, Lba,
BufferSize, BufferSize,
Buffer Buffer
); );
@ -1250,13 +1250,13 @@ IDEBlkIoFlushBlocks (
Return the results of the Inquiry command to a drive in InquiryData. Return the results of the Inquiry command to a drive in InquiryData.
Data format of Inquiry data is defined by the Interface GUID. Data format of Inquiry data is defined by the Interface GUID.
@param This Protocol instance pointer. @param This Protocol Instance pointer.
@param InquiryData Results of Inquiry command to device @param InquiryData Results of Inquiry command to device
@param InquiryDataSize Size of InquiryData in bytes. @param InquiryDataSize Size of InquiryData in bytes.
@retval EFI_SUCCESS InquiryData valid @retval EFI_SUCCESS InquiryData valid
@retval EFI_NOT_FOUND Device does not support this data class @retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device @retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough @retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough
**/ **/

View File

@ -384,11 +384,11 @@ IDEBlkIoReset (
); );
/** /**
Read data from a block IO device Read data from a block IO device.
@param This Block IO protocol instance pointer. @param This Block IO protocol instance pointer.
@param MediaId The media ID of the device @param MediaId The media ID of the device
@param LBA Starting LBA address to read data @param Lba Starting LBA address to read data
@param BufferSize The size of data to be read @param BufferSize The size of data to be read
@param Buffer Caller supplied buffer to save data @param Buffer Caller supplied buffer to save data
@ -411,7 +411,7 @@ IDEBlkIoReadBlocks (
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param MediaId The media ID of the device @param MediaId The media ID of the device
@param LBA Starting LBA address to write data @param Lba Starting LBA address to write data
@param BufferSize The size of data to be written @param BufferSize The size of data to be written
@param Buffer Caller supplied buffer to save data @param Buffer Caller supplied buffer to save data
@ -446,14 +446,14 @@ IDEBlkIoFlushBlocks (
Return the results of the Inquiry command to a drive in InquiryData. Return the results of the Inquiry command to a drive in InquiryData.
Data format of Inquiry data is defined by the Interface GUID. Data format of Inquiry data is defined by the Interface GUID.
@param This Protocol instance pointer. @param This Protocol instance pointer.
@param InquiryData Results of Inquiry command to device @param InquiryData Results of Inquiry command to device
@param InquiryDataSize Size of InquiryData in bytes. @param InquiryDataSize Size of InquiryData in bytes.
@retval EFI_SUCCESS InquiryData valid @retval EFI_SUCCESS InquiryData valid
@retval EFI_NOT_FOUND Device does not support this data class @retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device @retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
**/ **/
EFI_STATUS EFI_STATUS
@ -461,7 +461,7 @@ EFIAPI
IDEDiskInfoInquiry ( IDEDiskInfoInquiry (
IN EFI_DISK_INFO_PROTOCOL *This, IN EFI_DISK_INFO_PROTOCOL *This,
IN OUT VOID *InquiryData, IN OUT VOID *InquiryData,
IN OUT UINT32 *IntquiryDataSize IN OUT UINT32 *InquiryDataSize
); );
/** /**