2 Header file for IDE Bus Driver, containing the helper functions'
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Revision Reference:
15 2002-6: Add Atapi6 enhancement, support >120GB hard disk, including
16 Add - IDEBlkIoReadBlocksExt() func definition
17 Add - IDEBlkIoWriteBlocksExt() func definition
25 // Helper functions Prototype
28 read a one-byte data from a IDE port.
30 @param PciIo The PCI IO protocol instance
31 @param Port the IDE Port number
33 return the one-byte data read from IDE port
37 IN EFI_PCI_IO_PROTOCOL
*PciIo
,
42 Reads multiple words of data from the IDE data port.
43 Call the IO abstraction once to do the complete read,
44 not one word at a time.
46 @param PciIo Pointer to the EFI_PCI_IO instance
47 @param Port IO port to read
48 @param Count No. of UINT16's to read
49 @param Buffer Pointer to the data buffer for read
53 IDEReadPortWMultiple (
54 IN EFI_PCI_IO_PROTOCOL
*PciIo
,
61 write a 1-byte data to a specific IDE port.
63 @param PciIo PCI IO protocol instance
64 @param Port The IDE port to be writen
65 @param Data The data to write to the port
69 IN EFI_PCI_IO_PROTOCOL
*PciIo
,
75 write a 1-word data to a specific IDE port.
77 @param PciIo PCI IO protocol instance
78 @param Port The IDE port to be writen
79 @param Data The data to write to the port
83 IN EFI_PCI_IO_PROTOCOL
*PciIo
,
89 Write multiple words of data to the IDE data port.
90 Call the IO abstraction once to do the complete read,
91 not one word at a time.
93 @param PciIo Pointer to the EFI_PCI_IO instance
94 @param Port IO port to read
95 @param Count No. of UINT16's to read
96 @param Buffer Pointer to the data buffer for read
100 IDEWritePortWMultiple (
101 IN EFI_PCI_IO_PROTOCOL
*PciIo
,
108 Get IDE IO port registers' base addresses by mode. In 'Compatibility' mode,
109 use fixed addresses. In Native-PCI mode, get base addresses from BARs in
110 the PCI IDE controller's Configuration Space.
112 The steps to get IDE IO port registers' base addresses for each channel
115 1. Examine the Programming Interface byte of the Class Code fields in PCI IDE
116 controller's Configuration Space to determine the operating mode.
118 2. a) In 'Compatibility' mode, use fixed addresses shown in the Table 1 below.
120 ___________________________________________
121 | | Command Block | Control Block |
122 | Channel | Registers | Registers |
123 |___________|_______________|_______________|
124 | Primary | 1F0h - 1F7h | 3F6h - 3F7h |
125 |___________|_______________|_______________|
126 | Secondary | 170h - 177h | 376h - 377h |
127 |___________|_______________|_______________|
129 Table 1. Compatibility resource mappings
132 b) In Native-PCI mode, IDE registers are mapped into IO space using the BARs
133 in IDE controller's PCI Configuration Space, shown in the Table 2 below.
135 ___________________________________________________
136 | | Command Block | Control Block |
137 | Channel | Registers | Registers |
138 |___________|___________________|___________________|
139 | Primary | BAR at offset 0x10| BAR at offset 0x14|
140 |___________|___________________|___________________|
141 | Secondary | BAR at offset 0x18| BAR at offset 0x1C|
142 |___________|___________________|___________________|
144 Table 2. BARs for Register Mapping
146 @note Refer to Intel ICH4 datasheet, Control Block Offset: 03F4h for
147 primary, 0374h for secondary. So 2 bytes extra offset should be
148 added to the base addresses read from BARs.
150 For more details, please refer to PCI IDE Controller Specification and Intel
153 @param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance
154 @param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to
155 receive IDE IO port registers' base addresses
157 @retval EFI_UNSUPPORTED return this value when the BARs is not IO type
158 @retval EFI_SUCCESS Get the Base address successfully
159 @retval other read the pci configureation data error
163 GetIdeRegistersBaseAddr (
164 IN EFI_PCI_IO_PROTOCOL
*PciIo
,
165 OUT IDE_REGISTERS_BASE_ADDR
*IdeRegsBaseAddr
169 This function is used to requery IDE resources. The IDE controller will
170 probably switch between native and legacy modes during the EFI->CSM->OS
171 transfer. We do this everytime before an BlkIo operation to ensure its
174 @param IdeDev The BLK_IO private data which specifies the IDE device
176 @retval EFI_INVALID_PARAMETER return this value when the channel is invalid
177 @retval EFI_SUCCESS reassign the IDE IO resource successfully
178 @retval other get the IDE current base address effor
182 ReassignIdeResources (
183 IN IDE_BLK_IO_DEV
*IdeDev
187 Detect if there is disk attached to this port.
189 @param IdeDev The BLK_IO private data which specifies the IDE device.
191 @retval EFI_NOT_FOUND The device or channel is not found
192 @retval EFI_SUCCESS The device is found
197 IN IDE_BLK_IO_DEV
*IdeDev
201 This interface is used to initialize all state data related to the
202 detection of one channel.
206 InitializeIDEChannelData (
211 This function is used to poll for the DRQ bit clear in the Status
212 Register. DRQ is cleared when the device is finished transferring data.
213 So this function is called after data transfer is finished.
215 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
216 to record all the information of the IDE device.
217 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
219 @retval EFI_SUCCESS DRQ bit clear within the time out.
221 @retval EFI_TIMEOUT DRQ bit not clear within the time out.
224 Read Status Register will clear interrupt status.
229 IN IDE_BLK_IO_DEV
*IdeDev
,
230 IN UINTN TimeoutInMilliSeconds
234 This function is used to poll for the DRQ bit clear in the Alternate
235 Status Register. DRQ is cleared when the device is finished
236 transferring data. So this function is called after data transfer
239 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
240 to record all the information of the IDE device.
242 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
244 @retval EFI_SUCCESS DRQ bit clear within the time out.
246 @retval EFI_TIMEOUT DRQ bit not clear within the time out.
248 Read Alternate Status Register will not clear interrupt status.
253 IN IDE_BLK_IO_DEV
*IdeDev
,
254 IN UINTN TimeoutInMilliSeconds
258 This function is used to poll for the DRQ bit set in the
260 DRQ is set when the device is ready to transfer data. So this function
261 is called after the command is sent to the device and before required
264 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to
265 record all the information of the IDE device.
266 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
268 @retval EFI_SUCCESS DRQ bit set within the time out.
269 @retval EFI_TIMEOUT DRQ bit not set within the time out.
270 @retval EFI_ABORTED DRQ bit not set caused by the command abort.
272 @note Read Status Register will clear interrupt status.
277 IN IDE_BLK_IO_DEV
*IdeDev
,
278 IN UINTN TimeoutInMilliSeconds
282 This function is used to poll for the DRQ bit set in the Alternate Status Register.
283 DRQ is set when the device is ready to transfer data. So this function is called after
284 the command is sent to the device and before required data is transferred.
286 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
287 record all the information of the IDE device.
289 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
291 @retval EFI_SUCCESS DRQ bit set within the time out.
292 @retval EFI_TIMEOUT DRQ bit not set within the time out.
293 @retval EFI_ABORTED DRQ bit not set caused by the command abort.
294 @note Read Alternate Status Register will not clear interrupt status.
299 IN IDE_BLK_IO_DEV
*IdeDev
,
300 IN UINTN TimeoutInMilliSeconds
304 This function is used to poll for the BSY bit clear in the Status Register. BSY
305 is clear when the device is not busy. Every command must be sent after device is not busy.
307 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
308 to record all the information of the IDE device.
309 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
311 @retval EFI_SUCCESS BSY bit clear within the time out.
312 @retval EFI_TIMEOUT BSY bit not clear within the time out.
314 @note Read Status Register will clear interrupt status.
318 IN IDE_BLK_IO_DEV
*IdeDev
,
319 IN UINTN TimeoutInMilliSeconds
323 This function is used to poll for the BSY bit clear in the Alternate Status Register.
324 BSY is clear when the device is not busy. Every command must be sent after device is
327 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
328 all the information of the IDE device.
329 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
331 @retval EFI_SUCCESS BSY bit clear within the time out.
332 @retval EFI_TIMEOUT BSY bit not clear within the time out.
333 @note Read Alternate Status Register will not clear interrupt status.
338 IN IDE_BLK_IO_DEV
*IdeDev
,
339 IN UINTN TimeoutInMilliSeconds
343 This function is used to poll for the DRDY bit set in the Status Register. DRDY
344 bit is set when the device is ready to accept command. Most ATA commands must be
345 sent after DRDY set except the ATAPI Packet Command.
347 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
348 to record all the information of the IDE device.
349 @param DelayInMilliSeconds used to designate the timeout for the DRQ ready.
351 @retval EFI_SUCCESS DRDY bit set within the time out.
352 @retval EFI_TIMEOUT DRDY bit not set within the time out.
354 @note Read Status Register will clear interrupt status.
358 IN IDE_BLK_IO_DEV
*IdeDev
,
359 IN UINTN DelayInMilliSeconds
363 This function is used to poll for the DRDY bit set in the Alternate Status Register.
364 DRDY bit is set when the device is ready to accept command. Most ATA commands must
365 be sent after DRDY set except the ATAPI Packet Command.
367 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
368 to record all the information of the IDE device.
369 @param DelayInMilliSeconds used to designate the timeout for the DRQ ready.
371 @retval EFI_SUCCESS DRDY bit set within the time out.
372 @retval EFI_TIMEOUT DRDY bit not set within the time out.
374 @note Read Alternate Status Register will clear interrupt status.
379 IN IDE_BLK_IO_DEV
*IdeDev
,
380 IN UINTN DelayInMilliSeconds
384 // ATA device functions' prototype
387 Sends out an ATA Identify Command to the specified device.
389 This function is called by DiscoverIdeDevice() during its device
390 identification. It sends out the ATA Identify Command to the
391 specified device. Only ATA device responses to this command. If
392 the command succeeds, it returns the Identify data structure which
393 contains information about the device. This function extracts the
394 information it needs to fill the IDE_BLK_IO_DEV data structure,
395 including device type, media block size, media capacity, and etc.
397 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
398 all the information of the IDE device.
400 @retval EFI_SUCCESS Identify ATA device successfully.
401 @retval EFI_DEVICE_ERROR ATA Identify Device Command failed or device is not ATA device.
402 @note parameter IdeDev will be updated in this function.
407 IN IDE_BLK_IO_DEV
*IdeDev
411 This function is called by ATAIdentify() or ATAPIIdentify() to print device's module name.
413 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
414 all the information of the IDE device.
418 IN IDE_BLK_IO_DEV
*IdeDev
421 This function is used to send out ATA commands conforms to the PIO Data In Protocol.
423 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
424 all the information of the IDE device.
425 @param Buffer buffer contained data transferred from device to host.
426 @param ByteCount data size in byte unit of the buffer.
427 @param AtaCommand value of the Command Register
428 @param Head value of the Head/Device Register
429 @param SectorCount value of the Sector Count Register
430 @param SectorNumber value of the Sector Number Register
431 @param CylinderLsb value of the low byte of the Cylinder Register
432 @param CylinderMsb value of the high byte of the Cylinder Register
434 @retval EFI_SUCCESS send out the ATA command and device send required data successfully.
435 @retval EFI_DEVICE_ERROR command sent failed.
440 IN IDE_BLK_IO_DEV
*IdeDev
,
445 IN UINT8 SectorCount
,
446 IN UINT8 SectorNumber
,
447 IN UINT8 CylinderLsb
,
452 This function is used to send out ATA commands conforms to the
453 PIO Data Out Protocol.
455 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
456 to record all the information of the IDE device.
457 @param *Buffer buffer contained data transferred from host to device.
458 @param ByteCount data size in byte unit of the buffer.
459 @param AtaCommand value of the Command Register
460 @param Head value of the Head/Device Register
461 @param SectorCount value of the Sector Count Register
462 @param SectorNumber value of the Sector Number Register
463 @param CylinderLsb value of the low byte of the Cylinder Register
464 @param CylinderMsb value of the high byte of the Cylinder Register
466 @retval EFI_SUCCESS send out the ATA command and device received required
468 @retval EFI_DEVICE_ERROR command sent failed.
473 IN IDE_BLK_IO_DEV
*IdeDev
,
478 IN UINT8 SectorCount
,
479 IN UINT8 SectorNumber
,
480 IN UINT8 CylinderLsb
,
485 This function is used to analyze the Status Register and print out
486 some debug information and if there is ERR bit set in the Status
487 Register, the Error Register's value is also be parsed and print out.
489 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
490 record all the information of the IDE device.
492 @retval EFI_SUCCESS No err information in the Status Register.
493 @retval EFI_DEVICE_ERROR Any err information in the Status Register.
498 IN IDE_BLK_IO_DEV
*IdeDev
502 This function is used to implement the Soft Reset on the specified device. But,
503 the ATA Soft Reset mechanism is so strong a reset method that it will force
504 resetting on both devices connected to the same cable.
506 It is called by IdeBlkIoReset(), a interface function of Block
509 This function can also be used by the ATAPI device to perform reset when
510 ATAPI Reset command is failed.
512 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
513 all the information of the IDE device.
514 @retval EFI_SUCCESS Soft reset completes successfully.
515 @retval EFI_DEVICE_ERROR Any step during the reset process is failed.
517 @note The registers initial values after ATA soft reset are different
518 to the ATA device and ATAPI device.
522 IN IDE_BLK_IO_DEV
*IdeDev
526 This function is the ATA implementation for ReadBlocks in the
527 Block I/O Protocol interface.
529 @param IdeBlkIoDevice Indicates the calling context.
530 @param MediaId The media id that the read request is for.
531 @param Lba The starting logical block address to read from on the device.
532 @param BufferSize The size of the Buffer in bytes. This must be a multiple
533 of the intrinsic block size of the device.
535 @param Buffer A pointer to the destination buffer for the data. The caller
536 is responsible for either having implicit or explicit ownership
537 of the memory that data is read into.
539 @retval EFI_SUCCESS Read Blocks successfully.
540 @retval EFI_DEVICE_ERROR Read Blocks failed.
541 @retval EFI_NO_MEDIA There is no media in the device.
542 @retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
543 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
544 intrinsic block size of the device.
545 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
546 or the data buffer is not valid.
548 @note If Read Block error because of device error, this function will call
549 AtaSoftReset() function to reset device.
554 IN IDE_BLK_IO_DEV
*IdeBlkIoDevice
,
562 This function is the ATA implementation for WriteBlocks in the
563 Block I/O Protocol interface.
565 @param IdeBlkIoDevice Indicates the calling context.
566 @param MediaId The media id that the write request is for.
567 @param Lba The starting logical block address to write onto the device.
568 @param BufferSize The size of the Buffer in bytes. This must be a multiple
569 of the intrinsic block size of the device.
570 @param Buffer A pointer to the source buffer for the data.The caller
571 is responsible for either having implicit or explicit
572 ownership of the memory that data is written from.
574 @retval EFI_SUCCESS Write Blocks successfully.
575 @retval EFI_DEVICE_ERROR Write Blocks failed.
576 @retval EFI_NO_MEDIA There is no media in the device.
577 @retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
579 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
580 intrinsic block size of the device.
581 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
582 or the data buffer is not valid.
584 @note If Write Block error because of device error, this function will call
585 AtaSoftReset() function to reset device.
588 AtaBlkIoWriteBlocks (
589 IN IDE_BLK_IO_DEV
*IdeBlkIoDevice
,
597 This function is called by DiscoverIdeDevice() during its device
599 Its main purpose is to get enough information for the device media
600 to fill in the Media data structure of the Block I/O Protocol interface.
602 There are 5 steps to reach such objective:
603 1. Sends out the ATAPI Identify Command to the specified device.
604 Only ATAPI device responses to this command. If the command succeeds,
605 it returns the Identify data structure which filled with information
606 about the device. Since the ATAPI device contains removable media,
607 the only meaningful information is the device module name.
608 2. Sends out ATAPI Inquiry Packet Command to the specified device.
609 This command will return inquiry data of the device, which contains
610 the device type information.
611 3. Allocate sense data space for future use. We don't detect the media
612 presence here to improvement boot performance, especially when CD
613 media is present. The media detection will be performed just before
614 each BLK_IO read/write
616 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
617 to record all the information of the IDE device.
619 @retval EFI_SUCCESS Identify ATAPI device successfully.
620 @retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type
621 is not supported by this IDE driver.
622 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed
624 @note Parameter "IdeDev" will be updated in this function.
628 IN IDE_BLK_IO_DEV
*IdeDev
632 This function is used to implement the Soft Reset on the specified
633 ATAPI device. Different from the AtaSoftReset(), here reset is a ATA
634 Soft Reset Command special for ATAPI device, and it only take effects
635 on the specified ATAPI device, not on the whole IDE bus.
636 Since the ATAPI soft reset is needed when device is in exceptional
637 condition (such as BSY bit is always set ), I think the Soft Reset
638 command should be sent without waiting for the BSY clear and DRDY
640 This function is called by IdeBlkIoReset(),
641 a interface function of Block I/O protocol.
643 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
644 to record all the information of the IDE device.
646 @retval EFI_SUCCESS Soft reset completes successfully.
647 @retval EFI_DEVICE_ERROR Any step during the reset process is failed.
652 IN IDE_BLK_IO_DEV
*IdeDev
656 This function is the ATAPI implementation for ReadBlocks in the
657 Block I/O Protocol interface.
659 @param IdeBlkIoDevice Indicates the calling context.
660 @param MediaId The media id that the read request is for.
661 @param Lba The starting logical block address to read from on the device.
662 @param BufferSize The size of the Buffer in bytes. This must be a multiple
663 of the intrinsic block size of the device.
664 @param Buffer A pointer to the destination buffer for the data. The caller
665 is responsible for either having implicit or explicit
666 ownership of the memory that data is read into.
668 @retval EFI_SUCCESS Read Blocks successfully.
669 @retval EFI_DEVICE_ERROR Read Blocks failed.
670 @retval EFI_NO_MEDIA There is no media in the device.
671 @retval EFI_MEDIA_CHANGED The MediaId is not for the current media.
672 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
673 intrinsic block size of the device.
674 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
675 or the data buffer is not valid.
678 AtapiBlkIoReadBlocks (
679 IN IDE_BLK_IO_DEV
*IdeBlkIoDevice
,
687 This function is the ATAPI implementation for WriteBlocks in the
688 Block I/O Protocol interface.
690 @param IdeBlkIoDevice Indicates the calling context.
691 @param MediaId The media id that the write request is for.
692 @param Lba The starting logical block address to write onto the device.
693 @param BufferSize The size of the Buffer in bytes. This must be a multiple
694 of the intrinsic block size of the device.
695 @param Buffer A pointer to the source buffer for the data. The caller
696 is responsible for either having implicit or explicit ownership
697 of the memory that data is written from.
699 @retval EFI_SUCCESS Write Blocks successfully.
700 @retval EFI_DEVICE_ERROR Write Blocks failed.
701 @retval EFI_NO_MEDIA There is no media in the device.
702 @retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
703 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
704 intrinsic block size of the device.
705 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
706 or the data buffer is not valid.
708 @retval EFI_WRITE_PROTECTED The write protected is enabled or the media does not support write
711 AtapiBlkIoWriteBlocks (
712 IN IDE_BLK_IO_DEV
*IdeBlkIoDevice
,
720 Release resources of an IDE device before stopping it.
722 @param IdeBlkIoDevice Standard IDE device private data structure
726 ReleaseIdeResources (
727 IN IDE_BLK_IO_DEV
*IdeBlkIoDevice
731 Set the calculated Best transfer mode to a detected device
733 @param IdeDev Standard IDE device private data structure
734 @param TransferMode The device transfer mode to be set
735 @return Set transfer mode Command execute status.
738 SetDeviceTransferMode (
739 IN IDE_BLK_IO_DEV
*IdeDev
,
740 IN ATA_TRANSFER_MODE
*TransferMode
743 Send ATA command into device with NON_DATA protocol.
745 @param IdeDev Standard IDE device private data structure
746 @param AtaCommand The ATA command to be sent
747 @param Device The value in Device register
748 @param Feature The value in Feature register
749 @param SectorCount The value in SectorCount register
750 @param LbaLow The value in LBA_LOW register
751 @param LbaMiddle The value in LBA_MIDDLE register
752 @param LbaHigh The value in LBA_HIGH register
754 @retval EFI_SUCCESS Reading succeed
755 @retval EFI_ABORTED Command failed
756 @retval EFI_DEVICE_ERROR Device status error.
760 AtaNonDataCommandIn (
761 IN IDE_BLK_IO_DEV
*IdeDev
,
765 IN UINT8 SectorCount
,
772 Send ATA Ext command into device with NON_DATA protocol.
774 @param IdeDev Standard IDE device private data structure
775 @param AtaCommand The ATA command to be sent
776 @param Device The value in Device register
777 @param Feature The value in Feature register
778 @param SectorCount The value in SectorCount register
779 @param LbaAddress The Lba address in 48-bit mode
781 @retval EFI_SUCCESS Reading succeed
782 @retval EFI_ABORTED Command failed
783 @retval EFI_DEVICE_ERROR Device status error.
787 AtaNonDataCommandInExt (
788 IN IDE_BLK_IO_DEV
*IdeDev
,
792 IN UINT16 SectorCount
,
793 IN EFI_LBA LbaAddress
796 Enable Long Physical Sector Feature for ATA device.
798 @param IdeDev The IDE device data
800 @retval EFI_SUCCESS The ATA device supports Long Physical Sector feature
801 and corresponding fields in BlockIo structure is updated.
802 @retval EFI_UNSUPPORTED The device is not ATA device or Long Physical Sector
803 feature is not supported.
806 AtaEnableLongPhysicalSector (
807 IN IDE_BLK_IO_DEV
*IdeDev
811 Set drive parameters for devices not support PACKETS command.
813 @param IdeDev Standard IDE device private data structure
814 @param DriveParameters The device parameters to be set into the disk
815 @return SetParameters Command execute status.
820 IN IDE_BLK_IO_DEV
*IdeDev
,
821 IN ATA_DRIVE_PARMS
*DriveParameters
825 Enable Interrupt on IDE controller.
827 @param IdeDev Standard IDE device private data structure
829 @retval EFI_SUCCESS Enable Interrupt successfully
833 IN IDE_BLK_IO_DEV
*IdeDev