remove some comments introduced by tools.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / AtapiPassThruDxe / AtapiPassThru.h
CommitLineData
513f3f44 1/** @file\r
2 Copyright (c) 2006, Intel Corporation \r
3 All rights reserved. This program and the accompanying materials \r
4 are licensed and made available under the terms and conditions of the BSD License \r
5 which accompanies this distribution. The full text of the license may be found at \r
6 http://opensource.org/licenses/bsd-license.php \r
7\r
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
10\r
11 Module Name: AtapiPassThru.h\r
12\r
13**/\r
14\r
15#ifndef _APT_H\r
16#define _APT_H\r
17\r
18\r
ed7748fe 19\r
513f3f44 20#include <Uefi.h>\r
ed7748fe 21\r
513f3f44 22#include <Protocol/ScsiPassThru.h>\r
23#include <Protocol/PciIo.h>\r
ed7748fe 24\r
513f3f44 25#include <Library/DebugLib.h>\r
26#include <Library/UefiDriverEntryPoint.h>\r
27#include <Library/BaseLib.h>\r
28#include <Library/UefiLib.h>\r
29#include <Library/BaseMemoryLib.h>\r
30#include <Library/MemoryAllocationLib.h>\r
31#include <Library/UefiBootServicesTableLib.h>\r
32#include <IndustryStandard/pci22.h>\r
33\r
34///\r
35/// bit definition\r
36///\r
37#define bit(a) (1 << (a))\r
38\r
39#define MAX_TARGET_ID 4\r
40\r
41//\r
42// IDE Registers\r
43//\r
44typedef union {\r
45 UINT16 Command; /* when write */\r
46 UINT16 Status; /* when read */\r
47} IDE_CMD_OR_STATUS;\r
48\r
49typedef union {\r
50 UINT16 Error; /* when read */\r
51 UINT16 Feature; /* when write */\r
52} IDE_ERROR_OR_FEATURE;\r
53\r
54typedef union {\r
55 UINT16 AltStatus; /* when read */\r
56 UINT16 DeviceControl; /* when write */\r
57} IDE_AltStatus_OR_DeviceControl;\r
58\r
59///\r
60/// IDE registers set\r
61///\r
62typedef struct {\r
63 UINT16 Data;\r
64 IDE_ERROR_OR_FEATURE Reg1;\r
65 UINT16 SectorCount;\r
66 UINT16 SectorNumber;\r
67 UINT16 CylinderLsb;\r
68 UINT16 CylinderMsb;\r
69 UINT16 Head;\r
70 IDE_CMD_OR_STATUS Reg;\r
71\r
72 IDE_AltStatus_OR_DeviceControl Alt;\r
73 UINT16 DriveAddress;\r
74\r
75 UINT16 MasterSlave;\r
76} IDE_BASE_REGISTERS;\r
77\r
78#define ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE EFI_SIGNATURE_32 ('a', 's', 'p', 't')\r
79\r
80typedef struct {\r
81 UINTN Signature;\r
82\r
83 EFI_HANDLE Handle;\r
84 EFI_SCSI_PASS_THRU_PROTOCOL ScsiPassThru;\r
85 EFI_SCSI_PASS_THRU_MODE ScsiPassThruMode;\r
86 EFI_PCI_IO_PROTOCOL *PciIo;\r
87\r
88 //\r
89 // Local Data goes here\r
90 //\r
91 IDE_BASE_REGISTERS *IoPort;\r
92\r
93 CHAR16 ControllerName[100];\r
94 CHAR16 ChannelName[100];\r
95\r
96 UINT32 LatestTargetId;\r
97 UINT64 LatestLun;\r
98\r
99} ATAPI_SCSI_PASS_THRU_DEV;\r
100\r
101#define ATAPI_SCSI_PASS_THRU_DEV_FROM_THIS(a) \\r
102 CR (a, \\r
103 ATAPI_SCSI_PASS_THRU_DEV, \\r
104 ScsiPassThru, \\r
105 ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE \\r
106 )\r
107\r
108//\r
109// Global Variables\r
110//\r
111extern EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding;\r
112extern EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName;\r
113\r
114//\r
115// ATAPI Command op code\r
116//\r
117#define OP_INQUIRY 0x12\r
118#define OP_LOAD_UNLOAD_CD 0xa6\r
119#define OP_MECHANISM_STATUS 0xbd\r
120#define OP_MODE_SELECT_10 0x55\r
121#define OP_MODE_SENSE_10 0x5a\r
122#define OP_PAUSE_RESUME 0x4b\r
123#define OP_PLAY_AUDIO_10 0x45\r
124#define OP_PLAY_AUDIO_MSF 0x47\r
125#define OP_PLAY_CD 0xbc\r
126#define OP_PLAY_CD_MSF 0xb4\r
127#define OP_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e\r
128#define OP_READ_10 0x28\r
129#define OP_READ_12 0xa8\r
130#define OP_READ_CAPACITY 0x25\r
131#define OP_READ_CD 0xbe\r
132#define OP_READ_CD_MSF 0xb9\r
133#define OP_READ_HEADER 0x44\r
134#define OP_READ_SUB_CHANNEL 0x42\r
135#define OP_READ_TOC 0x43\r
136#define OP_REQUEST_SENSE 0x03\r
137#define OP_SCAN 0xba\r
138#define OP_SEEK_10 0x2b\r
139#define OP_SET_CD_SPEED 0xbb\r
140#define OP_STOPPLAY_SCAN 0x4e\r
141#define OP_START_STOP_UNIT 0x1b\r
142#define OP_TEST_UNIT_READY 0x00\r
143\r
144#define OP_FORMAT_UNIT 0x04\r
145#define OP_READ_FORMAT_CAPACITIES 0x23\r
146#define OP_VERIFY 0x2f\r
147#define OP_WRITE_10 0x2a\r
148#define OP_WRITE_12 0xaa\r
149#define OP_WRITE_AND_VERIFY 0x2e\r
150\r
151//\r
152// ATA Command\r
153//\r
154#define ATAPI_SOFT_RESET_CMD 0x08\r
155\r
156typedef enum {\r
157 DataIn = 0,\r
158 DataOut = 1,\r
159 NoData = 2,\r
160 End = 0xff\r
161} DATA_DIRECTION;\r
162\r
163typedef struct {\r
164 UINT8 OpCode;\r
165 DATA_DIRECTION Direction;\r
166} SCSI_COMMAND_SET;\r
167\r
168#define MAX_CHANNEL 2\r
169\r
170#define ValidCdbLength(Len) ((Len) == 6 || (Len) == 10 || (Len) == 12) ? 1 : 0\r
171\r
172//\r
173// IDE registers bit definitions\r
174//\r
175// ATA Err Reg bitmap\r
176//\r
177#define BBK_ERR bit (7) ///< Bad block detected\r
178#define UNC_ERR bit (6) ///< Uncorrectable Data\r
179#define MC_ERR bit (5) ///< Media Change\r
180#define IDNF_ERR bit (4) ///< ID Not Found\r
181#define MCR_ERR bit (3) ///< Media Change Requested\r
182#define ABRT_ERR bit (2) ///< Aborted Command\r
183#define TK0NF_ERR bit (1) ///< Track 0 Not Found\r
184#define AMNF_ERR bit (0) ///< Address Mark Not Found\r
185\r
186//\r
187// ATAPI Err Reg bitmap\r
188//\r
189#define SENSE_KEY_ERR (bit (7) | bit (6) | bit (5) | bit (4))\r
190#define EOM_ERR bit (1) ///< End of Media Detected\r
191#define ILI_ERR bit (0) ///< Illegal Length Indication\r
192\r
193//\r
194// Device/Head Reg\r
195//\r
196#define LBA_MODE bit (6)\r
197#define DEV bit (4)\r
198#define HS3 bit (3)\r
199#define HS2 bit (2)\r
200#define HS1 bit (1)\r
201#define HS0 bit (0)\r
202#define CHS_MODE (0)\r
203#define DRV0 (0)\r
204#define DRV1 (1)\r
205#define MST_DRV DRV0\r
206#define SLV_DRV DRV1\r
207\r
208//\r
209// Status Reg\r
210//\r
211#define BSY bit (7) ///< Controller Busy\r
212#define DRDY bit (6) ///< Drive Ready\r
213#define DWF bit (5) ///< Drive Write Fault\r
214#define DSC bit (4) ///< Disk Seek Complete\r
215#define DRQ bit (3) ///< Data Request\r
216#define CORR bit (2) ///< Corrected Data\r
217#define IDX bit (1) ///< Index\r
218#define ERR bit (0) ///< Error\r
219#define CHECK bit (0) ///< Check bit for ATAPI Status Reg\r
220\r
221//\r
222// Device Control Reg\r
223//\r
224#define SRST bit (2) ///< Software Reset\r
225#define IEN_L bit (1) ///< Interrupt Enable\r
226\r
227//\r
228// ATAPI Feature Register\r
229//\r
230#define OVERLAP bit (1)\r
231#define DMA bit (0)\r
232\r
233//\r
234// ATAPI Interrupt Reason Reson Reg (ATA Sector Count Register)\r
235//\r
236#define RELEASE bit (2)\r
237#define IO bit (1)\r
238#define CoD bit (0)\r
239\r
240#define PACKET_CMD 0xA0\r
241\r
242#define DEFAULT_CMD (0xa0)\r
243//\r
244// default content of device control register, disable INT\r
245//\r
246#define DEFAULT_CTL (0x0a)\r
247#define MAX_ATAPI_BYTE_COUNT (0xfffe)\r
248\r
249//\r
250// function prototype\r
251//\r
252\r
253EFI_STATUS\r
254EFIAPI\r
255AtapiScsiPassThruDriverBindingSupported (\r
256 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
257 IN EFI_HANDLE Controller,\r
258 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
259 );\r
260\r
261EFI_STATUS\r
262EFIAPI\r
263AtapiScsiPassThruDriverBindingStart (\r
264 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
265 IN EFI_HANDLE Controller,\r
266 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
267 );\r
268\r
269EFI_STATUS\r
270EFIAPI\r
271AtapiScsiPassThruDriverBindingStop (\r
272 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
273 IN EFI_HANDLE Controller,\r
274 IN UINTN NumberOfChildren,\r
275 IN EFI_HANDLE *ChildHandleBuffer\r
276 );\r
277\r
278//\r
279// EFI Component Name Functions\r
280//\r
281EFI_STATUS\r
282EFIAPI\r
283AtapiScsiPassThruComponentNameGetDriverName (\r
284 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
285 IN CHAR8 *Language,\r
286 OUT CHAR16 **DriverName\r
287 );\r
288\r
289EFI_STATUS\r
290EFIAPI\r
291AtapiScsiPassThruComponentNameGetControllerName (\r
292 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
293 IN EFI_HANDLE ControllerHandle,\r
294 IN EFI_HANDLE ChildHandle OPTIONAL,\r
295 IN CHAR8 *Language,\r
296 OUT CHAR16 **ControllerName\r
297 );\r
298\r
299/**\r
300 AtapiScsiPassThruDriverEntryPoint\r
301\r
302 @param ImageHandle\r
303 @param SystemTable\r
304\r
305 @todo Add function description\r
306 @todo ImageHandle - add argument description\r
307 @todo SystemTable - add argument description\r
308 @todo add return values\r
309--*/\r
310EFI_STATUS\r
311EFIAPI\r
312AtapiScsiPassThruDriverEntryPoint (\r
313 IN EFI_HANDLE ImageHandle,\r
314 IN EFI_SYSTEM_TABLE *SystemTable\r
315 )\r
316;\r
317\r
318/**\r
319 RegisterAtapiScsiPassThru\r
320\r
321 @param This\r
322 @param Controller\r
323 @param PciIo\r
324\r
325 @todo Add function description\r
326 @todo This add argument description\r
327 @todo Controller add argument description\r
328 @todo PciIo add argument description\r
329 @todo add return values\r
330**/\r
331EFI_STATUS\r
332RegisterAtapiScsiPassThru (\r
333 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
334 IN EFI_HANDLE Controller,\r
335 IN EFI_PCI_IO_PROTOCOL *PciIo\r
336 )\r
337;\r
338\r
339/**\r
340 AtapiScsiPassThruFunction\r
341\r
342 @param This\r
343 @param Target\r
344 @param Lun\r
345 @param Packet\r
346 @param Event\r
347\r
348 @todo Add function description\r
349 @todo This - add argument description\r
350 @todo Target - add argument description\r
351 @todo Lun - add argument description\r
352 @todo Packet - add argument description\r
353 @todo Event - add argument description\r
354 @todo add return values\r
355**/\r
356EFI_STATUS\r
357EFIAPI\r
358AtapiScsiPassThruFunction (\r
359 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
360 IN UINT32 Target,\r
361 IN UINT64 Lun,\r
362 IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,\r
363 IN EFI_EVENT Event OPTIONAL\r
364 )\r
365;\r
366\r
367/**\r
368 AtapiScsiPassThruGetNextDevice\r
369\r
370 TODO: Add function description\r
371\r
372 @param This TODO: add argument description\r
373 @param Target TODO: add argument description\r
374 @param Lun TODO: add argument description\r
375\r
376 TODO: add return values\r
377\r
378**/\r
379EFI_STATUS\r
380EFIAPI\r
381AtapiScsiPassThruGetNextDevice (\r
382 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
383 IN OUT UINT32 *Target,\r
384 IN OUT UINT64 *Lun\r
385 )\r
386;\r
387\r
388/**\r
389 AtapiScsiPassThruBuildDevicePath\r
390\r
391 TODO: Add function description\r
392\r
393 @param This TODO: add argument description\r
394 @param Target TODO: add argument description\r
395 @param Lun TODO: add argument description\r
396 @param DevicePath TODO: add argument description\r
397\r
398 TODO: add return values\r
399\r
400**/\r
401EFI_STATUS\r
402EFIAPI\r
403AtapiScsiPassThruBuildDevicePath (\r
404 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
405 IN UINT32 Target,\r
406 IN UINT64 Lun,\r
407 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r
408 )\r
409;\r
410\r
411/**\r
412 AtapiScsiPassThruGetTargetLun\r
413\r
414 TODO: Add function description\r
415\r
416 @param This TODO: add argument description\r
417 @param DevicePath TODO: add argument description\r
418 @param Target TODO: add argument description\r
419 @param Lun TODO: add argument description\r
420\r
421 TODO: add return values\r
422\r
423**/\r
424EFI_STATUS\r
425EFIAPI\r
426AtapiScsiPassThruGetTargetLun (\r
427 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
428 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
429 OUT UINT32 *Target,\r
430 OUT UINT64 *Lun\r
431 )\r
432;\r
433\r
434/**\r
435 AtapiScsiPassThruResetChannel\r
436\r
437 TODO: Add function description\r
438\r
439 @param This TODO: add argument description\r
440\r
441 TODO: add return values\r
442\r
443**/\r
444EFI_STATUS\r
445EFIAPI\r
446AtapiScsiPassThruResetChannel (\r
447 IN EFI_SCSI_PASS_THRU_PROTOCOL *This\r
448 )\r
449;\r
450\r
451/**\r
452 AtapiScsiPassThruResetTarget\r
453\r
454 TODO: Add function description\r
455\r
456 @param This TODO: add argument description\r
457 @param Target TODO: add argument description\r
458 @param Lun TODO: add argument description\r
459\r
460 TODO: add return values\r
461\r
462**/\r
463EFI_STATUS\r
464EFIAPI\r
465AtapiScsiPassThruResetTarget (\r
466 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
467 IN UINT32 Target,\r
468 IN UINT64 Lun\r
469 )\r
470;\r
471\r
472/**\r
473 CheckSCSIRequestPacket\r
474\r
475 TODO: Add function description\r
476\r
477 @param Packet TODO: add argument description\r
478\r
479 TODO: add return values\r
480\r
481**/\r
482EFI_STATUS\r
483CheckSCSIRequestPacket (\r
484 EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r
485 )\r
486;\r
487\r
488/**\r
489 SubmitBlockingIoCommand\r
490\r
491 TODO: Add function description\r
492\r
493 @param AtapiScsiPrivate TODO: add argument description\r
494 @param Target TODO: add argument description\r
495 @param Packet TODO: add argument description\r
496\r
497 TODO: add return values\r
498\r
499**/\r
500EFI_STATUS\r
501SubmitBlockingIoCommand (\r
502 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
503 UINT32 Target,\r
504 EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r
505 )\r
506;\r
507\r
508/**\r
509 IsCommandValid\r
510\r
511 TODO: Add function description\r
512\r
513 @param Packet - TODO: add argument description\r
514\r
515 @return TODO: add return values\r
516\r
517--*/\r
518BOOLEAN\r
519IsCommandValid (\r
520 EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r
521 )\r
522;\r
523\r
524/**\r
525 RequestSenseCommand\r
526\r
527 TODO: Add function description\r
528\r
529 @param AtapiScsiPrivate TODO: add argument description\r
530 @param Target TODO: add argument description\r
531 @param Timeout TODO: add argument description\r
532 @param SenseData TODO: add argument description\r
533 @param SenseDataLength TODO: add argument description\r
534\r
535 TODO: add return values\r
536\r
537**/\r
538EFI_STATUS\r
539RequestSenseCommand (\r
540 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
541 UINT32 Target,\r
542 UINT64 Timeout,\r
543 VOID *SenseData,\r
544 UINT8 *SenseDataLength\r
545 )\r
546;\r
547\r
548/**\r
549 AtapiPacketCommand\r
550\r
551 TODO: Add function description\r
552\r
553 @param AtapiScsiPrivate TODO: add argument description\r
554 @param Target TODO: add argument description\r
555 @param PacketCommand TODO: add argument description\r
556 @param Buffer TODO: add argument description\r
557 @param ByteCount TODO: add argument description\r
558 @param Direction TODO: add argument description\r
559 @param TimeOutInMicroSeconds TODO: add argument description\r
560\r
561 TODO: add return values\r
562\r
563**/\r
564EFI_STATUS\r
565AtapiPacketCommand (\r
566 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
567 UINT32 Target,\r
568 UINT8 *PacketCommand,\r
569 VOID *Buffer,\r
570 UINT32 *ByteCount,\r
571 DATA_DIRECTION Direction,\r
572 UINT64 TimeOutInMicroSeconds\r
573 )\r
574;\r
575\r
576\r
577/**\r
578 ReadPortB\r
579\r
580 TODO: Add function description\r
581\r
582 @param PciIo TODO: add argument description\r
583 @param Port TODO: add argument description\r
584\r
585 TODO: add return values\r
586\r
587**/\r
588UINT8\r
589ReadPortB (\r
590 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
591 IN UINT16 Port\r
592 )\r
593;\r
594\r
595\r
596/**\r
597 ReadPortW\r
598\r
599 TODO: Add function description\r
600\r
601 @param PciIo TODO: add argument description\r
602 @param Port TODO: add argument description\r
603\r
604 TODO: add return values\r
605\r
606**/\r
607UINT16\r
608ReadPortW (\r
609 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
610 IN UINT16 Port\r
611 )\r
612;\r
613\r
614\r
615/**\r
616 WritePortB\r
617\r
618 TODO: Add function description\r
619\r
620 @param PciIo TODO: add argument description\r
621 @param Port TODO: add argument description\r
622 @param Data TODO: add argument description\r
623\r
624 TODO: add return values\r
625\r
626**/\r
627VOID\r
628WritePortB (\r
629 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
630 IN UINT16 Port,\r
631 IN UINT8 Data\r
632 )\r
633;\r
634\r
635\r
636/**\r
637 WritePortW\r
638\r
639 TODO: Add function description\r
640\r
641 @param PciIo TODO: add argument description\r
642 @param Port TODO: add argument description\r
643 @param Data TODO: add argument description\r
644\r
645 TODO: add return values\r
646\r
647**/\r
648VOID\r
649WritePortW (\r
650 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
651 IN UINT16 Port,\r
652 IN UINT16 Data\r
653 )\r
654;\r
655\r
656/**\r
657 StatusDRQClear\r
658\r
659 TODO: Add function description\r
660\r
661 @param AtapiScsiPrivate TODO: add argument description\r
662 @param TimeOutInMicroSeconds TODO: add argument description\r
663\r
664 TODO: add return values\r
665\r
666**/\r
667EFI_STATUS\r
668StatusDRQClear (\r
669 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
670 UINT64 TimeOutInMicroSeconds\r
671 )\r
672;\r
673\r
674/**\r
675 AltStatusDRQClear\r
676\r
677 TODO: Add function description\r
678\r
679 @param AtapiScsiPrivate TODO: add argument description\r
680 @param TimeOutInMicroSeconds TODO: add argument description\r
681\r
682 TODO: add return values\r
683\r
684**/\r
685EFI_STATUS\r
686AltStatusDRQClear (\r
687 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
688 UINT64 TimeOutInMicroSeconds\r
689 )\r
690;\r
691\r
692/**\r
693 StatusDRQReady\r
694\r
695 TODO: Add function description\r
696\r
697 @param AtapiScsiPrivate TODO: add argument description\r
698 @param TimeOutInMicroSeconds TODO: add argument description\r
699\r
700 TODO: add return values\r
701\r
702**/\r
703EFI_STATUS\r
704StatusDRQReady (\r
705 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
706 UINT64 TimeOutInMicroSeconds\r
707 )\r
708;\r
709\r
710/**\r
711 AltStatusDRQReady\r
712\r
713 TODO: Add function description\r
714\r
715 @param AtapiScsiPrivate TODO: add argument description\r
716 @param TimeOutInMicroSeconds TODO: add argument description\r
717\r
718 TODO: add return values\r
719\r
720**/\r
721EFI_STATUS\r
722AltStatusDRQReady (\r
723 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
724 UINT64 TimeOutInMicroSeconds\r
725 )\r
726;\r
727\r
728/**\r
729 TODO: Add function description\r
730\r
731 @param AtapiScsiPrivate TODO: add argument description\r
732 @param TimeoutInMicroSeconds TODO: add argument description\r
733\r
734 TODO: add return values\r
735\r
736**/\r
737EFI_STATUS\r
738StatusWaitForBSYClear (\r
739 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
740 UINT64 TimeoutInMicroSeconds\r
741 )\r
742;\r
743\r
744/**\r
745 TODO: Add function description\r
746\r
747 @param AtapiScsiPrivate TODO: add argument description\r
748 @param TimeoutInMicroSeconds TODO: add argument description\r
749\r
750 TODO: add return values\r
751\r
752**/\r
753EFI_STATUS\r
754AltStatusWaitForBSYClear (\r
755 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
756 UINT64 TimeoutInMicroSeconds\r
757 )\r
758;\r
759\r
760/**\r
761 TODO: Add function description\r
762\r
763 @param AtapiScsiPrivate TODO: add argument description\r
764 @param TimeoutInMicroSeconds TODO: add argument description\r
765\r
766 TODO: add return values\r
767\r
768**/\r
769EFI_STATUS\r
770StatusDRDYReady (\r
771 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
772 UINT64 TimeoutInMicroSeconds\r
773 )\r
774;\r
775\r
776/**\r
777 TODO: Add function description\r
778\r
779 @param AtapiScsiPrivate TODO: add argument description\r
780 @param TimeoutInMicroSeconds TODO: add argument description\r
781\r
782 TODO: add return values\r
783\r
784**/\r
785EFI_STATUS\r
786AltStatusDRDYReady (\r
787 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
788 UINT64 TimeoutInMicroSeconds\r
789 )\r
790;\r
791\r
792/**\r
793 TODO: Add function description\r
794\r
795 @param AtapiScsiPrivate TODO: add argument description\r
796 @param Buffer TODO: add argument description\r
797 @param ByteCount TODO: add argument description\r
798 @param Direction TODO: add argument description\r
799 @param TimeOutInMicroSeconds TODO: add argument description\r
800\r
801 TODO: add return values\r
802\r
803**/\r
804EFI_STATUS\r
805AtapiPassThruPioReadWriteData (\r
806 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
807 UINT16 *Buffer,\r
808 UINT32 *ByteCount,\r
809 DATA_DIRECTION Direction,\r
810 UINT64 TimeOutInMicroSeconds\r
811 )\r
812;\r
813\r
814/**\r
815 TODO: Add function description\r
816\r
817 @param AtapiScsiPrivate TODO: add argument description\r
818\r
819 TODO: add return values\r
820\r
821**/\r
822EFI_STATUS\r
823AtapiPassThruCheckErrorStatus (\r
824 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate\r
825 )\r
826;\r
827#endif\r