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