1
/* $Id: Ide.h 33540 2010-10-28 09:27:05Z vboxsync $ */
7
* Copyright (C) 2009-2010 Oracle Corporation
9
* This file is part of VirtualBox Open Source Edition (OSE), as
10
* available from http://www.virtualbox.org. This file is free software;
11
* you can redistribute it and/or modify it under the terms of the GNU
12
* General Public License (GPL) as published by the Free Software
13
* Foundation, in version 2 as it comes in the "COPYING" file of the
14
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19
Header file for IDE Bus Driver, containing the helper functions'
22
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
23
All rights reserved. This program and the accompanying materials
24
are licensed and made available under the terms and conditions of the BSD License
25
which accompanies this distribution. The full text of the license may be found at
26
http://opensource.org/licenses/bsd-license.php
28
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
29
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
31
@par Revision Reference:
32
2002-6: Add Atapi6 enhancement, support >120GB hard disk, including
33
Add - IDEBlkIoReadBlocksExt() func definition
34
Add - IDEBlkIoWriteBlocksExt() func definition
42
// Helper functions Prototype
45
read a one-byte data from a IDE port.
47
@param PciIo The PCI IO protocol instance
48
@param Port the IDE Port number
50
return the one-byte data read from IDE port
54
IN EFI_PCI_IO_PROTOCOL *PciIo,
59
Reads multiple words of data from the IDE data port.
60
Call the IO abstraction once to do the complete read,
61
not one word at a time.
63
@param PciIo Pointer to the EFI_PCI_IO instance
64
@param Port IO port to read
65
@param Count No. of UINT16's to read
66
@param Buffer Pointer to the data buffer for read
70
IDEReadPortWMultiple (
71
IN EFI_PCI_IO_PROTOCOL *PciIo,
78
write a 1-byte data to a specific IDE port.
80
@param PciIo PCI IO protocol instance
81
@param Port The IDE port to be writen
82
@param Data The data to write to the port
86
IN EFI_PCI_IO_PROTOCOL *PciIo,
92
write a 1-word data to a specific IDE port.
94
@param PciIo PCI IO protocol instance
95
@param Port The IDE port to be writen
96
@param Data The data to write to the port
100
IN EFI_PCI_IO_PROTOCOL *PciIo,
106
Write multiple words of data to the IDE data port.
107
Call the IO abstraction once to do the complete read,
108
not one word at a time.
110
@param PciIo Pointer to the EFI_PCI_IO instance
111
@param Port IO port to read
112
@param Count No. of UINT16's to read
113
@param Buffer Pointer to the data buffer for read
117
IDEWritePortWMultiple (
118
IN EFI_PCI_IO_PROTOCOL *PciIo,
125
Get IDE IO port registers' base addresses by mode. In 'Compatibility' mode,
126
use fixed addresses. In Native-PCI mode, get base addresses from BARs in
127
the PCI IDE controller's Configuration Space.
129
The steps to get IDE IO port registers' base addresses for each channel
132
1. Examine the Programming Interface byte of the Class Code fields in PCI IDE
133
controller's Configuration Space to determine the operating mode.
135
2. a) In 'Compatibility' mode, use fixed addresses shown in the Table 1 below.
137
___________________________________________
138
| | Command Block | Control Block |
139
| Channel | Registers | Registers |
140
|___________|_______________|_______________|
141
| Primary | 1F0h - 1F7h | 3F6h - 3F7h |
142
|___________|_______________|_______________|
143
| Secondary | 170h - 177h | 376h - 377h |
144
|___________|_______________|_______________|
146
Table 1. Compatibility resource mappings
149
b) In Native-PCI mode, IDE registers are mapped into IO space using the BARs
150
in IDE controller's PCI Configuration Space, shown in the Table 2 below.
152
___________________________________________________
153
| | Command Block | Control Block |
154
| Channel | Registers | Registers |
155
|___________|___________________|___________________|
156
| Primary | BAR at offset 0x10| BAR at offset 0x14|
157
|___________|___________________|___________________|
158
| Secondary | BAR at offset 0x18| BAR at offset 0x1C|
159
|___________|___________________|___________________|
161
Table 2. BARs for Register Mapping
163
@note Refer to Intel ICH4 datasheet, Control Block Offset: 03F4h for
164
primary, 0374h for secondary. So 2 bytes extra offset should be
165
added to the base addresses read from BARs.
167
For more details, please refer to PCI IDE Controller Specification and Intel
170
@param PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance
171
@param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to
172
receive IDE IO port registers' base addresses
174
@retval EFI_UNSUPPORTED return this value when the BARs is not IO type
175
@retval EFI_SUCCESS Get the Base address successfully
176
@retval other read the pci configuration data error
180
GetIdeRegistersBaseAddr (
181
IN EFI_PCI_IO_PROTOCOL *PciIo,
182
OUT IDE_REGISTERS_BASE_ADDR *IdeRegsBaseAddr
186
This function is used to requery IDE resources. The IDE controller will
187
probably switch between native and legacy modes during the EFI->CSM->OS
188
transfer. We do this everytime before an BlkIo operation to ensure its
191
@param IdeDev The BLK_IO private data which specifies the IDE device
193
@retval EFI_INVALID_PARAMETER return this value when the channel is invalid
194
@retval EFI_SUCCESS reassign the IDE IO resource successfully
195
@retval other get the IDE current base address effor
199
ReassignIdeResources (
200
IN IDE_BLK_IO_DEV *IdeDev
204
Detect if there is disk attached to this port.
206
@param IdeDev The BLK_IO private data which specifies the IDE device.
208
@retval EFI_NOT_FOUND The device or channel is not found
209
@retval EFI_SUCCESS The device is found
214
IN IDE_BLK_IO_DEV *IdeDev
218
This interface is used to initialize all state data related to the
219
detection of one channel.
223
InitializeIDEChannelData (
228
This function is used to poll for the DRQ bit clear in the Status
229
Register. DRQ is cleared when the device is finished transferring data.
230
So this function is called after data transfer is finished.
232
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
233
to record all the information of the IDE device.
234
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
236
@retval EFI_SUCCESS DRQ bit clear within the time out.
238
@retval EFI_TIMEOUT DRQ bit not clear within the time out.
241
Read Status Register will clear interrupt status.
246
IN IDE_BLK_IO_DEV *IdeDev,
247
IN UINTN TimeoutInMilliSeconds
251
This function is used to poll for the DRQ bit clear in the Alternate
252
Status Register. DRQ is cleared when the device is finished
253
transferring data. So this function is called after data transfer
256
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
257
to record all the information of the IDE device.
259
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear.
261
@retval EFI_SUCCESS DRQ bit clear within the time out.
263
@retval EFI_TIMEOUT DRQ bit not clear within the time out.
265
Read Alternate Status Register will not clear interrupt status.
270
IN IDE_BLK_IO_DEV *IdeDev,
271
IN UINTN TimeoutInMilliSeconds
275
This function is used to poll for the DRQ bit set in the
277
DRQ is set when the device is ready to transfer data. So this function
278
is called after the command is sent to the device and before required
281
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to
282
record all the information of the IDE device.
283
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
285
@retval EFI_SUCCESS DRQ bit set within the time out.
286
@retval EFI_TIMEOUT DRQ bit not set within the time out.
287
@retval EFI_ABORTED DRQ bit not set caused by the command abort.
289
@note Read Status Register will clear interrupt status.
294
IN IDE_BLK_IO_DEV *IdeDev,
295
IN UINTN TimeoutInMilliSeconds
299
This function is used to poll for the DRQ bit set in the Alternate Status Register.
300
DRQ is set when the device is ready to transfer data. So this function is called after
301
the command is sent to the device and before required data is transferred.
303
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
304
record all the information of the IDE device.
306
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
308
@retval EFI_SUCCESS DRQ bit set within the time out.
309
@retval EFI_TIMEOUT DRQ bit not set within the time out.
310
@retval EFI_ABORTED DRQ bit not set caused by the command abort.
311
@note Read Alternate Status Register will not clear interrupt status.
316
IN IDE_BLK_IO_DEV *IdeDev,
317
IN UINTN TimeoutInMilliSeconds
321
This function is used to poll for the BSY bit clear in the Status Register. BSY
322
is clear when the device is not busy. Every command must be sent after device is not busy.
324
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
325
to record all the information of the IDE device.
326
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
328
@retval EFI_SUCCESS BSY bit clear within the time out.
329
@retval EFI_TIMEOUT BSY bit not clear within the time out.
331
@note Read Status Register will clear interrupt status.
335
IN IDE_BLK_IO_DEV *IdeDev,
336
IN UINTN TimeoutInMilliSeconds
340
This function is used to poll for the BSY bit clear in the Alternate Status Register.
341
BSY is clear when the device is not busy. Every command must be sent after device is
344
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
345
all the information of the IDE device.
346
@param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready.
348
@retval EFI_SUCCESS BSY bit clear within the time out.
349
@retval EFI_TIMEOUT BSY bit not clear within the time out.
350
@note Read Alternate Status Register will not clear interrupt status.
355
IN IDE_BLK_IO_DEV *IdeDev,
356
IN UINTN TimeoutInMilliSeconds
360
This function is used to poll for the DRDY bit set in the Status Register. DRDY
361
bit is set when the device is ready to accept command. Most ATA commands must be
362
sent after DRDY set except the ATAPI Packet Command.
364
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
365
to record all the information of the IDE device.
366
@param DelayInMilliSeconds used to designate the timeout for the DRQ ready.
368
@retval EFI_SUCCESS DRDY bit set within the time out.
369
@retval EFI_TIMEOUT DRDY bit not set within the time out.
371
@note Read Status Register will clear interrupt status.
375
IN IDE_BLK_IO_DEV *IdeDev,
376
IN UINTN DelayInMilliSeconds
380
This function is used to poll for the DRDY bit set in the Alternate Status Register.
381
DRDY bit is set when the device is ready to accept command. Most ATA commands must
382
be sent after DRDY set except the ATAPI Packet Command.
384
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
385
to record all the information of the IDE device.
386
@param DelayInMilliSeconds used to designate the timeout for the DRQ ready.
388
@retval EFI_SUCCESS DRDY bit set within the time out.
389
@retval EFI_TIMEOUT DRDY bit not set within the time out.
391
@note Read Alternate Status Register will clear interrupt status.
396
IN IDE_BLK_IO_DEV *IdeDev,
397
IN UINTN DelayInMilliSeconds
401
// ATA device functions' prototype
404
Sends out an ATA Identify Command to the specified device.
406
This function is called by DiscoverIdeDevice() during its device
407
identification. It sends out the ATA Identify Command to the
408
specified device. Only ATA device responses to this command. If
409
the command succeeds, it returns the Identify data structure which
410
contains information about the device. This function extracts the
411
information it needs to fill the IDE_BLK_IO_DEV data structure,
412
including device type, media block size, media capacity, and etc.
414
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record
415
all the information of the IDE device.
417
@retval EFI_SUCCESS Identify ATA device successfully.
418
@retval EFI_DEVICE_ERROR ATA Identify Device Command failed or device is not ATA device.
419
@note parameter IdeDev will be updated in this function.
424
IN IDE_BLK_IO_DEV *IdeDev
428
This function is called by ATAIdentify() or ATAPIIdentify() to print device's module name.
430
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
431
all the information of the IDE device.
435
IN IDE_BLK_IO_DEV *IdeDev
438
This function is used to send out ATA commands conforms to the PIO Data In Protocol.
440
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
441
all the information of the IDE device.
442
@param Buffer buffer contained data transferred from device to host.
443
@param ByteCount data size in byte unit of the buffer.
444
@param AtaCommand value of the Command Register
445
@param Head value of the Head/Device Register
446
@param SectorCount value of the Sector Count Register
447
@param SectorNumber value of the Sector Number Register
448
@param CylinderLsb value of the low byte of the Cylinder Register
449
@param CylinderMsb value of the high byte of the Cylinder Register
451
@retval EFI_SUCCESS send out the ATA command and device send required data successfully.
452
@retval EFI_DEVICE_ERROR command sent failed.
457
IN IDE_BLK_IO_DEV *IdeDev,
462
IN UINT8 SectorCount,
463
IN UINT8 SectorNumber,
464
IN UINT8 CylinderLsb,
469
This function is used to send out ATA commands conforms to the
470
PIO Data Out Protocol.
472
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
473
to record all the information of the IDE device.
474
@param *Buffer buffer contained data transferred from host to device.
475
@param ByteCount data size in byte unit of the buffer.
476
@param AtaCommand value of the Command Register
477
@param Head value of the Head/Device Register
478
@param SectorCount value of the Sector Count Register
479
@param SectorNumber value of the Sector Number Register
480
@param CylinderLsb value of the low byte of the Cylinder Register
481
@param CylinderMsb value of the high byte of the Cylinder Register
483
@retval EFI_SUCCESS send out the ATA command and device received required
485
@retval EFI_DEVICE_ERROR command sent failed.
490
IN IDE_BLK_IO_DEV *IdeDev,
495
IN UINT8 SectorCount,
496
IN UINT8 SectorNumber,
497
IN UINT8 CylinderLsb,
502
This function is used to analyze the Status Register and print out
503
some debug information and if there is ERR bit set in the Status
504
Register, the Error Register's value is also be parsed and print out.
506
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to
507
record all the information of the IDE device.
509
@retval EFI_SUCCESS No err information in the Status Register.
510
@retval EFI_DEVICE_ERROR Any err information in the Status Register.
515
IN IDE_BLK_IO_DEV *IdeDev
519
This function is used to implement the Soft Reset on the specified device. But,
520
the ATA Soft Reset mechanism is so strong a reset method that it will force
521
resetting on both devices connected to the same cable.
523
It is called by IdeBlkIoReset(), a interface function of Block
526
This function can also be used by the ATAPI device to perform reset when
527
ATAPI Reset command is failed.
529
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record
530
all the information of the IDE device.
531
@retval EFI_SUCCESS Soft reset completes successfully.
532
@retval EFI_DEVICE_ERROR Any step during the reset process is failed.
534
@note The registers initial values after ATA soft reset are different
535
to the ATA device and ATAPI device.
539
IN IDE_BLK_IO_DEV *IdeDev
543
This function is the ATA implementation for ReadBlocks in the
544
Block I/O Protocol interface.
546
@param IdeBlkIoDevice Indicates the calling context.
547
@param MediaId The media id that the read request is for.
548
@param Lba The starting logical block address to read from on the device.
549
@param BufferSize The size of the Buffer in bytes. This must be a multiple
550
of the intrinsic block size of the device.
552
@param Buffer A pointer to the destination buffer for the data. The caller
553
is responsible for either having implicit or explicit ownership
554
of the memory that data is read into.
556
@retval EFI_SUCCESS Read Blocks successfully.
557
@retval EFI_DEVICE_ERROR Read Blocks failed.
558
@retval EFI_NO_MEDIA There is no media in the device.
559
@retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
560
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
561
intrinsic block size of the device.
562
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
563
or the data buffer is not valid.
565
@note If Read Block error because of device error, this function will call
566
AtaSoftReset() function to reset device.
571
IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
579
This function is the ATA implementation for WriteBlocks in the
580
Block I/O Protocol interface.
582
@param IdeBlkIoDevice Indicates the calling context.
583
@param MediaId The media id that the write request is for.
584
@param Lba The starting logical block address to write onto the device.
585
@param BufferSize The size of the Buffer in bytes. This must be a multiple
586
of the intrinsic block size of the device.
587
@param Buffer A pointer to the source buffer for the data.The caller
588
is responsible for either having implicit or explicit
589
ownership of the memory that data is written from.
591
@retval EFI_SUCCESS Write Blocks successfully.
592
@retval EFI_DEVICE_ERROR Write Blocks failed.
593
@retval EFI_NO_MEDIA There is no media in the device.
594
@retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
596
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
597
intrinsic block size of the device.
598
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
599
or the data buffer is not valid.
601
@note If Write Block error because of device error, this function will call
602
AtaSoftReset() function to reset device.
605
AtaBlkIoWriteBlocks (
606
IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
614
This function is called by DiscoverIdeDevice() during its device
616
Its main purpose is to get enough information for the device media
617
to fill in the Media data structure of the Block I/O Protocol interface.
619
There are 5 steps to reach such objective:
620
1. Sends out the ATAPI Identify Command to the specified device.
621
Only ATAPI device responses to this command. If the command succeeds,
622
it returns the Identify data structure which filled with information
623
about the device. Since the ATAPI device contains removable media,
624
the only meaningful information is the device module name.
625
2. Sends out ATAPI Inquiry Packet Command to the specified device.
626
This command will return inquiry data of the device, which contains
627
the device type information.
628
3. Allocate sense data space for future use. We don't detect the media
629
presence here to improvement boot performance, especially when CD
630
media is present. The media detection will be performed just before
631
each BLK_IO read/write
633
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
634
to record all the information of the IDE device.
636
@retval EFI_SUCCESS Identify ATAPI device successfully.
637
@retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type
638
is not supported by this IDE driver.
639
@retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed
641
@note Parameter "IdeDev" will be updated in this function.
645
IN IDE_BLK_IO_DEV *IdeDev
649
This function is used to implement the Soft Reset on the specified
650
ATAPI device. Different from the AtaSoftReset(), here reset is a ATA
651
Soft Reset Command special for ATAPI device, and it only take effects
652
on the specified ATAPI device, not on the whole IDE bus.
653
Since the ATAPI soft reset is needed when device is in exceptional
654
condition (such as BSY bit is always set ), I think the Soft Reset
655
command should be sent without waiting for the BSY clear and DRDY
657
This function is called by IdeBlkIoReset(),
658
a interface function of Block I/O protocol.
660
@param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used
661
to record all the information of the IDE device.
663
@retval EFI_SUCCESS Soft reset completes successfully.
664
@retval EFI_DEVICE_ERROR Any step during the reset process is failed.
669
IN IDE_BLK_IO_DEV *IdeDev
673
This function is the ATAPI implementation for ReadBlocks in the
674
Block I/O Protocol interface.
676
@param IdeBlkIoDevice Indicates the calling context.
677
@param MediaId The media id that the read request is for.
678
@param Lba The starting logical block address to read from on the device.
679
@param BufferSize The size of the Buffer in bytes. This must be a multiple
680
of the intrinsic block size of the device.
681
@param Buffer A pointer to the destination buffer for the data. The caller
682
is responsible for either having implicit or explicit
683
ownership of the memory that data is read into.
685
@retval EFI_SUCCESS Read Blocks successfully.
686
@retval EFI_DEVICE_ERROR Read Blocks failed.
687
@retval EFI_NO_MEDIA There is no media in the device.
688
@retval EFI_MEDIA_CHANGED The MediaId is not for the current media.
689
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
690
intrinsic block size of the device.
691
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
692
or the data buffer is not valid.
695
AtapiBlkIoReadBlocks (
696
IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
704
This function is the ATAPI implementation for WriteBlocks in the
705
Block I/O Protocol interface.
707
@param IdeBlkIoDevice Indicates the calling context.
708
@param MediaId The media id that the write request is for.
709
@param Lba The starting logical block address to write onto the device.
710
@param BufferSize The size of the Buffer in bytes. This must be a multiple
711
of the intrinsic block size of the device.
712
@param Buffer A pointer to the source buffer for the data. The caller
713
is responsible for either having implicit or explicit ownership
714
of the memory that data is written from.
716
@retval EFI_SUCCESS Write Blocks successfully.
717
@retval EFI_DEVICE_ERROR Write Blocks failed.
718
@retval EFI_NO_MEDIA There is no media in the device.
719
@retval EFI_MEDIA_CHANGE The MediaId is not for the current media.
720
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the
721
intrinsic block size of the device.
722
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
723
or the data buffer is not valid.
725
@retval EFI_WRITE_PROTECTED The write protected is enabled or the media does not support write
728
AtapiBlkIoWriteBlocks (
729
IN IDE_BLK_IO_DEV *IdeBlkIoDevice,
737
Release resources of an IDE device before stopping it.
739
@param IdeBlkIoDevice Standard IDE device private data structure
743
ReleaseIdeResources (
744
IN IDE_BLK_IO_DEV *IdeBlkIoDevice
748
Set the calculated Best transfer mode to a detected device
750
@param IdeDev Standard IDE device private data structure
751
@param TransferMode The device transfer mode to be set
752
@return Set transfer mode Command execute status.
755
SetDeviceTransferMode (
756
IN IDE_BLK_IO_DEV *IdeDev,
757
IN ATA_TRANSFER_MODE *TransferMode
760
Send ATA command into device with NON_DATA protocol.
762
@param IdeDev Standard IDE device private data structure
763
@param AtaCommand The ATA command to be sent
764
@param Device The value in Device register
765
@param Feature The value in Feature register
766
@param SectorCount The value in SectorCount register
767
@param LbaLow The value in LBA_LOW register
768
@param LbaMiddle The value in LBA_MIDDLE register
769
@param LbaHigh The value in LBA_HIGH register
771
@retval EFI_SUCCESS Reading succeed
772
@retval EFI_ABORTED Command failed
773
@retval EFI_DEVICE_ERROR Device status error.
777
AtaNonDataCommandIn (
778
IN IDE_BLK_IO_DEV *IdeDev,
782
IN UINT8 SectorCount,
789
Send ATA Ext command into device with NON_DATA protocol.
791
@param IdeDev Standard IDE device private data structure
792
@param AtaCommand The ATA command to be sent
793
@param Device The value in Device register
794
@param Feature The value in Feature register
795
@param SectorCount The value in SectorCount register
796
@param LbaAddress The Lba address in 48-bit mode
798
@retval EFI_SUCCESS Reading succeed
799
@retval EFI_ABORTED Command failed
800
@retval EFI_DEVICE_ERROR Device status error.
804
AtaNonDataCommandInExt (
805
IN IDE_BLK_IO_DEV *IdeDev,
809
IN UINT16 SectorCount,
810
IN EFI_LBA LbaAddress
813
Enable Long Physical Sector Feature for ATA device.
815
@param IdeDev The IDE device data
817
@retval EFI_SUCCESS The ATA device supports Long Physical Sector feature
818
and corresponding fields in BlockIo structure is updated.
819
@retval EFI_UNSUPPORTED The device is not ATA device or Long Physical Sector
820
feature is not supported.
823
AtaEnableLongPhysicalSector (
824
IN IDE_BLK_IO_DEV *IdeDev
828
Set drive parameters for devices not support PACKETS command.
830
@param IdeDev Standard IDE device private data structure
831
@param DriveParameters The device parameters to be set into the disk
832
@return SetParameters Command execute status.
837
IN IDE_BLK_IO_DEV *IdeDev,
838
IN ATA_DRIVE_PARMS *DriveParameters
842
Enable Interrupt on IDE controller.
844
@param IdeDev Standard IDE device private data structure
846
@retval EFI_SUCCESS Enable Interrupt successfully
850
IN IDE_BLK_IO_DEV *IdeDev