]>
Commit | Line | Data |
---|---|---|
823f7d4f | 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 | #include <Uefi.h>\r | |
21 | \r | |
22 | #include <Protocol/ScsiPassThru.h>\r | |
23 | #include <Protocol/ScsiPassThruExt.h>\r | |
24 | #include <Protocol/PciIo.h>\r | |
4cc9af6c | 25 | #include <Protocol/DriverSupportedEfiVersion.h>\r |
823f7d4f | 26 | \r |
27 | #include <Library/DebugLib.h>\r | |
28 | #include <Library/UefiDriverEntryPoint.h>\r | |
29 | #include <Library/BaseLib.h>\r | |
30 | #include <Library/UefiLib.h>\r | |
31 | #include <Library/BaseMemoryLib.h>\r | |
32 | #include <Library/MemoryAllocationLib.h>\r | |
33 | #include <Library/UefiBootServicesTableLib.h>\r | |
34 | #include <Library/PcdLib.h>\r | |
3501cc99 | 35 | #include <Library/DevicePathLib.h>\r |
36 | \r | |
93da4b6b | 37 | #include <IndustryStandard/Pci22.h>\r |
823f7d4f | 38 | \r |
3501cc99 | 39 | \r |
823f7d4f | 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 | |
50 | typedef union {\r | |
51 | UINT16 Command; /* when write */\r | |
52 | UINT16 Status; /* when read */\r | |
53 | } IDE_CMD_OR_STATUS;\r | |
54 | \r | |
55 | typedef union {\r | |
56 | UINT16 Error; /* when read */\r | |
57 | UINT16 Feature; /* when write */\r | |
58 | } IDE_ERROR_OR_FEATURE;\r | |
59 | \r | |
60 | typedef 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 | typedef enum {\r | |
67 | IdePrimary = 0,\r | |
68 | IdeSecondary = 1,\r | |
69 | IdeMaxChannel = 2\r | |
70 | } EFI_IDE_CHANNEL;\r | |
71 | \r | |
72 | ///\r | |
73 | \r | |
74 | \r | |
75 | //\r | |
76 | // Bit definitions in Programming Interface byte of the Class Code field\r | |
77 | // in PCI IDE controller's Configuration Space\r | |
78 | //\r | |
79 | #define IDE_PRIMARY_OPERATING_MODE BIT0\r | |
80 | #define IDE_PRIMARY_PROGRAMMABLE_INDICATOR BIT1\r | |
81 | #define IDE_SECONDARY_OPERATING_MODE BIT2\r | |
82 | #define IDE_SECONDARY_PROGRAMMABLE_INDICATOR BIT3\r | |
83 | \r | |
84 | \r | |
85 | #define ATAPI_MAX_CHANNEL 2\r | |
86 | \r | |
87 | ///\r | |
88 | /// IDE registers set\r | |
89 | ///\r | |
90 | typedef struct {\r | |
91 | UINT16 Data;\r | |
92 | IDE_ERROR_OR_FEATURE Reg1;\r | |
93 | UINT16 SectorCount;\r | |
94 | UINT16 SectorNumber;\r | |
95 | UINT16 CylinderLsb;\r | |
96 | UINT16 CylinderMsb;\r | |
97 | UINT16 Head;\r | |
98 | IDE_CMD_OR_STATUS Reg;\r | |
99 | IDE_AltStatus_OR_DeviceControl Alt;\r | |
100 | UINT16 DriveAddress;\r | |
101 | } IDE_BASE_REGISTERS;\r | |
102 | \r | |
32438080 | 103 | #define ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE SIGNATURE_32 ('a', 's', 'p', 't')\r |
823f7d4f | 104 | \r |
105 | typedef struct {\r | |
106 | UINTN Signature;\r | |
107 | EFI_HANDLE Handle;\r | |
108 | EFI_SCSI_PASS_THRU_PROTOCOL ScsiPassThru;\r | |
109 | EFI_EXT_SCSI_PASS_THRU_PROTOCOL ExtScsiPassThru;\r | |
110 | EFI_PCI_IO_PROTOCOL *PciIo;\r | |
111 | UINT64 OriginalPciAttributes;\r | |
112 | //\r | |
113 | // Local Data goes here\r | |
114 | //\r | |
115 | IDE_BASE_REGISTERS *IoPort;\r | |
116 | IDE_BASE_REGISTERS AtapiIoPortRegisters[2];\r | |
117 | UINT32 LatestTargetId;\r | |
118 | UINT64 LatestLun;\r | |
119 | } ATAPI_SCSI_PASS_THRU_DEV;\r | |
120 | \r | |
121 | //\r | |
122 | // IDE registers' base addresses\r | |
123 | //\r | |
124 | typedef struct {\r | |
125 | UINT16 CommandBlockBaseAddr;\r | |
126 | UINT16 ControlBlockBaseAddr;\r | |
127 | } IDE_REGISTERS_BASE_ADDR;\r | |
128 | \r | |
129 | #define ATAPI_SCSI_PASS_THRU_DEV_FROM_THIS(a) \\r | |
130 | CR (a, \\r | |
131 | ATAPI_SCSI_PASS_THRU_DEV, \\r | |
132 | ScsiPassThru, \\r | |
133 | ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE \\r | |
134 | )\r | |
135 | \r | |
136 | #define ATAPI_EXT_SCSI_PASS_THRU_DEV_FROM_THIS(a) \\r | |
137 | CR (a, \\r | |
138 | ATAPI_SCSI_PASS_THRU_DEV, \\r | |
139 | ExtScsiPassThru, \\r | |
140 | ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE \\r | |
141 | )\r | |
142 | \r | |
143 | //\r | |
144 | // Global Variables\r | |
145 | //\r | |
4cc9af6c | 146 | extern EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding;\r |
147 | extern EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName;\r | |
148 | extern EFI_COMPONENT_NAME2_PROTOCOL gAtapiScsiPassThruComponentName2;\r | |
149 | extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL gAtapiScsiPassThruDriverSupportedEfiVersion;\r | |
823f7d4f | 150 | \r |
151 | //\r | |
152 | // ATAPI Command op code\r | |
153 | //\r | |
154 | #define OP_INQUIRY 0x12\r | |
155 | #define OP_LOAD_UNLOAD_CD 0xa6\r | |
156 | #define OP_MECHANISM_STATUS 0xbd\r | |
157 | #define OP_MODE_SELECT_10 0x55\r | |
158 | #define OP_MODE_SENSE_10 0x5a\r | |
159 | #define OP_PAUSE_RESUME 0x4b\r | |
160 | #define OP_PLAY_AUDIO_10 0x45\r | |
161 | #define OP_PLAY_AUDIO_MSF 0x47\r | |
162 | #define OP_PLAY_CD 0xbc\r | |
163 | #define OP_PLAY_CD_MSF 0xb4\r | |
164 | #define OP_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e\r | |
165 | #define OP_READ_10 0x28\r | |
166 | #define OP_READ_12 0xa8\r | |
167 | #define OP_READ_CAPACITY 0x25\r | |
168 | #define OP_READ_CD 0xbe\r | |
169 | #define OP_READ_CD_MSF 0xb9\r | |
170 | #define OP_READ_HEADER 0x44\r | |
171 | #define OP_READ_SUB_CHANNEL 0x42\r | |
172 | #define OP_READ_TOC 0x43\r | |
173 | #define OP_REQUEST_SENSE 0x03\r | |
174 | #define OP_SCAN 0xba\r | |
175 | #define OP_SEEK_10 0x2b\r | |
176 | #define OP_SET_CD_SPEED 0xbb\r | |
177 | #define OP_STOPPLAY_SCAN 0x4e\r | |
178 | #define OP_START_STOP_UNIT 0x1b\r | |
179 | #define OP_TEST_UNIT_READY 0x00\r | |
180 | \r | |
181 | #define OP_FORMAT_UNIT 0x04\r | |
182 | #define OP_READ_FORMAT_CAPACITIES 0x23\r | |
183 | #define OP_VERIFY 0x2f\r | |
184 | #define OP_WRITE_10 0x2a\r | |
185 | #define OP_WRITE_12 0xaa\r | |
186 | #define OP_WRITE_AND_VERIFY 0x2e\r | |
187 | \r | |
188 | //\r | |
189 | // ATA Command\r | |
190 | //\r | |
191 | #define ATAPI_SOFT_RESET_CMD 0x08\r | |
192 | \r | |
193 | typedef enum {\r | |
194 | DataIn = 0,\r | |
195 | DataOut = 1,\r | |
196 | DataBi = 2,\r | |
197 | NoData = 3,\r | |
198 | End = 0xff\r | |
199 | } DATA_DIRECTION;\r | |
200 | \r | |
201 | typedef struct {\r | |
202 | UINT8 OpCode;\r | |
203 | DATA_DIRECTION Direction;\r | |
204 | } SCSI_COMMAND_SET;\r | |
205 | \r | |
206 | #define MAX_CHANNEL 2\r | |
207 | \r | |
208 | #define ValidCdbLength(Len) ((Len) == 6 || (Len) == 10 || (Len) == 12) ? 1 : 0\r | |
209 | \r | |
210 | //\r | |
211 | // IDE registers bit definitions\r | |
212 | //\r | |
213 | // ATA Err Reg bitmap\r | |
214 | //\r | |
215 | #define BBK_ERR bit (7) ///< Bad block detected\r | |
216 | #define UNC_ERR bit (6) ///< Uncorrectable Data\r | |
217 | #define MC_ERR bit (5) ///< Media Change\r | |
218 | #define IDNF_ERR bit (4) ///< ID Not Found\r | |
219 | #define MCR_ERR bit (3) ///< Media Change Requested\r | |
220 | #define ABRT_ERR bit (2) ///< Aborted Command\r | |
221 | #define TK0NF_ERR bit (1) ///< Track 0 Not Found\r | |
222 | #define AMNF_ERR bit (0) ///< Address Mark Not Found\r | |
223 | \r | |
224 | //\r | |
225 | // ATAPI Err Reg bitmap\r | |
226 | //\r | |
227 | #define SENSE_KEY_ERR (bit (7) | bit (6) | bit (5) | bit (4))\r | |
228 | #define EOM_ERR bit (1) ///< End of Media Detected\r | |
229 | #define ILI_ERR bit (0) ///< Illegal Length Indication\r | |
230 | \r | |
231 | //\r | |
232 | // Device/Head Reg\r | |
233 | //\r | |
234 | #define LBA_MODE bit (6)\r | |
235 | #define DEV bit (4)\r | |
236 | #define HS3 bit (3)\r | |
237 | #define HS2 bit (2)\r | |
238 | #define HS1 bit (1)\r | |
239 | #define HS0 bit (0)\r | |
240 | #define CHS_MODE (0)\r | |
241 | #define DRV0 (0)\r | |
242 | #define DRV1 (1)\r | |
243 | #define MST_DRV DRV0\r | |
244 | #define SLV_DRV DRV1\r | |
245 | \r | |
246 | //\r | |
247 | // Status Reg\r | |
248 | //\r | |
249 | #define BSY bit (7) ///< Controller Busy\r | |
250 | #define DRDY bit (6) ///< Drive Ready\r | |
251 | #define DWF bit (5) ///< Drive Write Fault\r | |
252 | #define DSC bit (4) ///< Disk Seek Complete\r | |
253 | #define DRQ bit (3) ///< Data Request\r | |
254 | #define CORR bit (2) ///< Corrected Data\r | |
255 | #define IDX bit (1) ///< Index\r | |
256 | #define ERR bit (0) ///< Error\r | |
257 | #define CHECK bit (0) ///< Check bit for ATAPI Status Reg\r | |
258 | \r | |
259 | //\r | |
260 | // Device Control Reg\r | |
261 | //\r | |
262 | #define SRST bit (2) ///< Software Reset\r | |
263 | #define IEN_L bit (1) ///< Interrupt Enable\r | |
264 | \r | |
265 | //\r | |
266 | // ATAPI Feature Register\r | |
267 | //\r | |
268 | #define OVERLAP bit (1)\r | |
269 | #define DMA bit (0)\r | |
270 | \r | |
271 | //\r | |
272 | // ATAPI Interrupt Reason Reson Reg (ATA Sector Count Register)\r | |
273 | //\r | |
274 | #define RELEASE bit (2)\r | |
275 | #define IO bit (1)\r | |
276 | #define CoD bit (0)\r | |
277 | \r | |
278 | #define PACKET_CMD 0xA0\r | |
279 | \r | |
280 | #define DEFAULT_CMD (0xa0)\r | |
281 | //\r | |
282 | // default content of device control register, disable INT\r | |
283 | //\r | |
284 | #define DEFAULT_CTL (0x0a)\r | |
285 | #define MAX_ATAPI_BYTE_COUNT (0xfffe)\r | |
286 | \r | |
287 | //\r | |
288 | // function prototype\r | |
289 | //\r | |
290 | \r | |
291 | EFI_STATUS\r | |
292 | EFIAPI\r | |
293 | AtapiScsiPassThruDriverBindingSupported (\r | |
294 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
295 | IN EFI_HANDLE Controller,\r | |
296 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
297 | );\r | |
298 | \r | |
299 | EFI_STATUS\r | |
300 | EFIAPI\r | |
301 | AtapiScsiPassThruDriverBindingStart (\r | |
302 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
303 | IN EFI_HANDLE Controller,\r | |
304 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
305 | );\r | |
306 | \r | |
307 | EFI_STATUS\r | |
308 | EFIAPI\r | |
309 | AtapiScsiPassThruDriverBindingStop (\r | |
310 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
311 | IN EFI_HANDLE Controller,\r | |
312 | IN UINTN NumberOfChildren,\r | |
313 | IN EFI_HANDLE *ChildHandleBuffer\r | |
314 | );\r | |
315 | \r | |
316 | //\r | |
317 | // EFI Component Name Functions\r | |
318 | //\r | |
319 | /**\r | |
320 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
321 | \r | |
322 | This function retrieves the user readable name of a driver in the form of a\r | |
323 | Unicode string. If the driver specified by This has a user readable name in\r | |
324 | the language specified by Language, then a pointer to the driver name is\r | |
325 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
326 | by This does not support the language specified by Language,\r | |
327 | then EFI_UNSUPPORTED is returned.\r | |
328 | \r | |
329 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
330 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
331 | \r | |
332 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
333 | array indicating the language. This is the\r | |
334 | language of the driver name that the caller is\r | |
335 | requesting, and it must match one of the\r | |
336 | languages specified in SupportedLanguages. The\r | |
337 | number of languages supported by a driver is up\r | |
338 | to the driver writer. Language is specified\r | |
339 | in RFC 3066 or ISO 639-2 language code format.\r | |
340 | \r | |
341 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
342 | This Unicode string is the name of the\r | |
343 | driver specified by This in the language\r | |
344 | specified by Language.\r | |
345 | \r | |
346 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
347 | This and the language specified by Language was\r | |
348 | returned in DriverName.\r | |
349 | \r | |
350 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
351 | \r | |
352 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
353 | \r | |
354 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
355 | the language specified by Language.\r | |
356 | \r | |
357 | **/\r | |
358 | EFI_STATUS\r | |
359 | EFIAPI\r | |
360 | AtapiScsiPassThruComponentNameGetDriverName (\r | |
361 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
362 | IN CHAR8 *Language,\r | |
363 | OUT CHAR16 **DriverName\r | |
364 | );\r | |
365 | \r | |
366 | \r | |
367 | /**\r | |
368 | Retrieves a Unicode string that is the user readable name of the controller\r | |
369 | that is being managed by a driver.\r | |
370 | \r | |
371 | This function retrieves the user readable name of the controller specified by\r | |
372 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
373 | driver specified by This has a user readable name in the language specified by\r | |
374 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
375 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
376 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
377 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
378 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
379 | \r | |
380 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
381 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
382 | \r | |
383 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
384 | specified by This is managing. This handle\r | |
385 | specifies the controller whose name is to be\r | |
386 | returned.\r | |
387 | \r | |
388 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
389 | the name of. This is an optional parameter that\r | |
390 | may be NULL. It will be NULL for device\r | |
391 | drivers. It will also be NULL for a bus drivers\r | |
392 | that wish to retrieve the name of the bus\r | |
393 | controller. It will not be NULL for a bus\r | |
394 | driver that wishes to retrieve the name of a\r | |
395 | child controller.\r | |
396 | \r | |
397 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
398 | array indicating the language. This is the\r | |
399 | language of the driver name that the caller is\r | |
400 | requesting, and it must match one of the\r | |
401 | languages specified in SupportedLanguages. The\r | |
402 | number of languages supported by a driver is up\r | |
403 | to the driver writer. Language is specified in\r | |
404 | RFC 3066 or ISO 639-2 language code format.\r | |
405 | \r | |
406 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
407 | This Unicode string is the name of the\r | |
408 | controller specified by ControllerHandle and\r | |
409 | ChildHandle in the language specified by\r | |
410 | Language from the point of view of the driver\r | |
411 | specified by This.\r | |
412 | \r | |
413 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
414 | the language specified by Language for the\r | |
415 | driver specified by This was returned in\r | |
416 | DriverName.\r | |
417 | \r | |
418 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
419 | \r | |
420 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
421 | EFI_HANDLE.\r | |
422 | \r | |
423 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
424 | \r | |
425 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
426 | \r | |
427 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
428 | managing the controller specified by\r | |
429 | ControllerHandle and ChildHandle.\r | |
430 | \r | |
431 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
432 | the language specified by Language.\r | |
433 | \r | |
434 | **/\r | |
435 | EFI_STATUS\r | |
436 | EFIAPI\r | |
437 | AtapiScsiPassThruComponentNameGetControllerName (\r | |
438 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
439 | IN EFI_HANDLE ControllerHandle,\r | |
440 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
441 | IN CHAR8 *Language,\r | |
442 | OUT CHAR16 **ControllerName\r | |
443 | );\r | |
444 | \r | |
445 | \r | |
446 | EFI_STATUS\r | |
447 | EFIAPI\r | |
448 | AtapiScsiPassThruDriverEntryPoint (\r | |
449 | IN EFI_HANDLE ImageHandle,\r | |
450 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
451 | )\r | |
452 | /*++\r | |
453 | \r | |
454 | Routine Description:\r | |
455 | \r | |
456 | Entry point for EFI drivers.\r | |
457 | \r | |
458 | Arguments:\r | |
459 | \r | |
460 | ImageHandle - EFI_HANDLE\r | |
461 | SystemTable - EFI_SYSTEM_TABLE\r | |
462 | \r | |
463 | Returns:\r | |
464 | \r | |
465 | EFI_SUCCESS\r | |
466 | Others \r | |
467 | \r | |
468 | --*/\r | |
469 | ;\r | |
470 | \r | |
471 | EFI_STATUS\r | |
472 | RegisterAtapiScsiPassThru (\r | |
473 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
474 | IN EFI_HANDLE Controller,\r | |
475 | IN EFI_PCI_IO_PROTOCOL *PciIo,\r | |
476 | IN UINT64 OriginalPciAttributes\r | |
477 | )\r | |
478 | /*++\r | |
479 | \r | |
480 | Routine Description:\r | |
481 | Attaches SCSI Pass Thru Protocol for specified IDE channel.\r | |
482 | \r | |
483 | Arguments:\r | |
484 | This - Protocol instance pointer.\r | |
485 | Controller - Parent device handle to the IDE channel. \r | |
486 | PciIo - PCI I/O protocol attached on the "Controller". \r | |
487 | \r | |
488 | Returns:\r | |
489 | Always return EFI_SUCCESS unless installing SCSI Pass Thru Protocol failed.\r | |
490 | \r | |
491 | --*/\r | |
492 | ;\r | |
493 | \r | |
494 | EFI_STATUS\r | |
495 | EFIAPI\r | |
496 | AtapiScsiPassThruFunction (\r | |
497 | IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r | |
498 | IN UINT32 Target,\r | |
499 | IN UINT64 Lun,\r | |
500 | IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,\r | |
501 | IN EFI_EVENT Event OPTIONAL\r | |
502 | )\r | |
503 | /*++\r | |
504 | \r | |
505 | Routine Description:\r | |
506 | \r | |
507 | Implements EFI_SCSI_PASS_THRU_PROTOCOL.PassThru() function.\r | |
508 | \r | |
509 | Arguments:\r | |
510 | \r | |
511 | This: The EFI_SCSI_PASS_THRU_PROTOCOL instance.\r | |
512 | Target: The Target ID of the ATAPI device to send the SCSI \r | |
513 | Request Packet. To ATAPI devices attached on an IDE\r | |
514 | Channel, Target ID 0 indicates Master device;Target\r | |
515 | ID 1 indicates Slave device.\r | |
516 | Lun: The LUN of the ATAPI device to send the SCSI Request\r | |
517 | Packet. To the ATAPI device, Lun is always 0.\r | |
518 | Packet: The SCSI Request Packet to send to the ATAPI device \r | |
519 | specified by Target and Lun.\r | |
520 | Event: If non-blocking I/O is not supported then Event is ignored, \r | |
521 | and blocking I/O is performed.\r | |
522 | If Event is NULL, then blocking I/O is performed.\r | |
523 | If Event is not NULL and non blocking I/O is supported, \r | |
524 | then non-blocking I/O is performed, and Event will be signaled \r | |
525 | when the SCSI Request Packet completes. \r | |
526 | \r | |
527 | Returns: \r | |
528 | \r | |
529 | EFI_STATUS\r | |
530 | \r | |
531 | --*/\r | |
532 | ;\r | |
533 | \r | |
534 | EFI_STATUS\r | |
535 | EFIAPI\r | |
536 | AtapiScsiPassThruGetNextDevice (\r | |
537 | IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r | |
538 | IN OUT UINT32 *Target,\r | |
539 | IN OUT UINT64 *Lun\r | |
540 | )\r | |
541 | /*++\r | |
542 | \r | |
543 | Routine Description:\r | |
544 | \r | |
545 | Used to retrieve the list of legal Target IDs for SCSI devices \r | |
546 | on a SCSI channel.\r | |
547 | \r | |
548 | Arguments:\r | |
549 | \r | |
550 | This - Protocol instance pointer.\r | |
551 | Target - On input, a pointer to the Target ID of a SCSI \r | |
552 | device present on the SCSI channel. On output, \r | |
553 | a pointer to the Target ID of the next SCSI device\r | |
554 | present on a SCSI channel. An input value of \r | |
555 | 0xFFFFFFFF retrieves the Target ID of the first \r | |
556 | SCSI device present on a SCSI channel.\r | |
557 | Lun - On input, a pointer to the LUN of a SCSI device\r | |
558 | present on the SCSI channel. On output, a pointer\r | |
559 | to the LUN of the next SCSI device present on \r | |
560 | a SCSI channel.\r | |
561 | Returns:\r | |
562 | \r | |
563 | EFI_SUCCESS - The Target ID and Lun of the next SCSI device \r | |
564 | on the SCSI channel was returned in Target and Lun.\r | |
565 | EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.\r | |
566 | EFI_INVALID_PARAMETER - Target is not 0xFFFFFFFF,and Target and Lun were not\r | |
567 | returned on a previous call to GetNextDevice().\r | |
568 | \r | |
569 | --*/\r | |
570 | ;\r | |
571 | \r | |
572 | EFI_STATUS\r | |
573 | EFIAPI\r | |
574 | AtapiScsiPassThruBuildDevicePath (\r | |
575 | IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r | |
576 | IN UINT32 Target,\r | |
577 | IN UINT64 Lun,\r | |
578 | IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r | |
579 | )\r | |
580 | /*++\r | |
581 | \r | |
582 | Routine Description:\r | |
583 | \r | |
584 | Used to allocate and build a device path node for a SCSI device \r | |
585 | on a SCSI channel. Would not build device path for a SCSI Host Controller.\r | |
586 | \r | |
587 | Arguments:\r | |
588 | \r | |
589 | This - Protocol instance pointer.\r | |
590 | Target - The Target ID of the SCSI device for which\r | |
591 | a device path node is to be allocated and built.\r | |
592 | Lun - The LUN of the SCSI device for which a device \r | |
593 | path node is to be allocated and built.\r | |
594 | DevicePath - A pointer to a single device path node that \r | |
595 | describes the SCSI device specified by \r | |
596 | Target and Lun. This function is responsible \r | |
597 | for allocating the buffer DevicePath with the boot\r | |
598 | service AllocatePool(). It is the caller's \r | |
599 | responsibility to free DevicePath when the caller\r | |
600 | is finished with DevicePath. \r | |
601 | Returns:\r | |
602 | EFI_SUCCESS - The device path node that describes the SCSI device\r | |
603 | specified by Target and Lun was allocated and \r | |
604 | returned in DevicePath.\r | |
605 | EFI_NOT_FOUND - The SCSI devices specified by Target and Lun does\r | |
606 | not exist on the SCSI channel.\r | |
607 | EFI_INVALID_PARAMETER - DevicePath is NULL.\r | |
608 | EFI_OUT_OF_RESOURCES - There are not enough resources to allocate \r | |
609 | DevicePath.\r | |
610 | \r | |
611 | --*/\r | |
612 | ;\r | |
613 | \r | |
614 | EFI_STATUS\r | |
615 | EFIAPI\r | |
616 | AtapiScsiPassThruGetTargetLun (\r | |
617 | IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r | |
618 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r | |
619 | OUT UINT32 *Target,\r | |
620 | OUT UINT64 *Lun\r | |
621 | )\r | |
622 | /*++\r | |
623 | \r | |
624 | Routine Description:\r | |
625 | \r | |
626 | Used to translate a device path node to a Target ID and LUN.\r | |
627 | \r | |
628 | Arguments:\r | |
629 | \r | |
630 | This - Protocol instance pointer.\r | |
631 | DevicePath - A pointer to the device path node that \r | |
632 | describes a SCSI device on the SCSI channel.\r | |
633 | Target - A pointer to the Target ID of a SCSI device \r | |
634 | on the SCSI channel. \r | |
635 | Lun - A pointer to the LUN of a SCSI device on \r | |
636 | the SCSI channel. \r | |
637 | Returns:\r | |
638 | \r | |
639 | EFI_SUCCESS - DevicePath was successfully translated to a \r | |
640 | Target ID and LUN, and they were returned \r | |
641 | in Target and Lun.\r | |
642 | EFI_INVALID_PARAMETER - DevicePath/Target/Lun is NULL.\r | |
643 | EFI_UNSUPPORTED - This driver does not support the device path \r | |
644 | node type in DevicePath.\r | |
645 | EFI_NOT_FOUND - A valid translation from DevicePath to a \r | |
646 | Target ID and LUN does not exist.\r | |
647 | \r | |
648 | --*/\r | |
649 | ;\r | |
650 | \r | |
651 | EFI_STATUS\r | |
652 | EFIAPI\r | |
653 | AtapiScsiPassThruResetChannel (\r | |
654 | IN EFI_SCSI_PASS_THRU_PROTOCOL *This\r | |
655 | )\r | |
656 | /*++\r | |
657 | \r | |
658 | Routine Description:\r | |
659 | \r | |
660 | Resets a SCSI channel.This operation resets all the \r | |
661 | SCSI devices connected to the SCSI channel.\r | |
662 | \r | |
663 | Arguments:\r | |
664 | \r | |
665 | This - Protocol instance pointer.\r | |
666 | \r | |
667 | Returns:\r | |
668 | \r | |
669 | EFI_SUCCESS - The SCSI channel was reset.\r | |
670 | EFI_UNSUPPORTED - The SCSI channel does not support \r | |
671 | a channel reset operation.\r | |
672 | EFI_DEVICE_ERROR - A device error occurred while \r | |
673 | attempting to reset the SCSI channel.\r | |
674 | EFI_TIMEOUT - A timeout occurred while attempting \r | |
675 | to reset the SCSI channel.\r | |
676 | \r | |
677 | --*/\r | |
678 | ;\r | |
679 | \r | |
680 | EFI_STATUS\r | |
681 | EFIAPI\r | |
682 | AtapiScsiPassThruResetTarget (\r | |
683 | IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r | |
684 | IN UINT32 Target,\r | |
685 | IN UINT64 Lun\r | |
686 | )\r | |
687 | /*++\r | |
688 | \r | |
689 | Routine Description:\r | |
690 | \r | |
691 | Resets a SCSI device that is connected to a SCSI channel.\r | |
692 | \r | |
693 | Arguments:\r | |
694 | \r | |
695 | This - Protocol instance pointer.\r | |
696 | Target - The Target ID of the SCSI device to reset. \r | |
697 | Lun - The LUN of the SCSI device to reset.\r | |
698 | \r | |
699 | Returns:\r | |
700 | \r | |
701 | EFI_SUCCESS - The SCSI device specified by Target and \r | |
702 | Lun was reset.\r | |
703 | EFI_UNSUPPORTED - The SCSI channel does not support a target\r | |
704 | reset operation.\r | |
705 | EFI_INVALID_PARAMETER - Target or Lun are invalid.\r | |
706 | EFI_DEVICE_ERROR - A device error occurred while attempting \r | |
707 | to reset the SCSI device specified by Target \r | |
708 | and Lun.\r | |
709 | EFI_TIMEOUT - A timeout occurred while attempting to reset \r | |
710 | the SCSI device specified by Target and Lun.\r | |
711 | \r | |
712 | --*/\r | |
713 | ;\r | |
714 | \r | |
715 | EFI_STATUS\r | |
716 | EFIAPI\r | |
717 | AtapiExtScsiPassThruFunction (\r | |
718 | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r | |
719 | IN UINT8 *Target,\r | |
720 | IN UINT64 Lun,\r | |
721 | IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,\r | |
722 | IN EFI_EVENT Event OPTIONAL\r | |
723 | )\r | |
724 | /*++\r | |
725 | \r | |
726 | Routine Description:\r | |
727 | \r | |
728 | Implements EFI_EXT_SCSI_PASS_THRU_PROTOCOL.PassThru() function.\r | |
729 | \r | |
730 | Arguments:\r | |
731 | \r | |
732 | This: The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r | |
733 | Target: The Target ID of the ATAPI device to send the SCSI \r | |
734 | Request Packet. To ATAPI devices attached on an IDE\r | |
735 | Channel, Target ID 0 indicates Master device;Target\r | |
736 | ID 1 indicates Slave device.\r | |
737 | Lun: The LUN of the ATAPI device to send the SCSI Request\r | |
738 | Packet. To the ATAPI device, Lun is always 0.\r | |
739 | Packet: The SCSI Request Packet to send to the ATAPI device \r | |
740 | specified by Target and Lun.\r | |
741 | Event: If non-blocking I/O is not supported then Event is ignored, \r | |
742 | and blocking I/O is performed.\r | |
743 | If Event is NULL, then blocking I/O is performed.\r | |
744 | If Event is not NULL and non blocking I/O is supported, \r | |
745 | then non-blocking I/O is performed, and Event will be signaled \r | |
746 | when the SCSI Request Packet completes. \r | |
747 | \r | |
748 | Returns: \r | |
749 | \r | |
750 | EFI_STATUS\r | |
751 | \r | |
752 | --*/\r | |
753 | ;\r | |
754 | \r | |
755 | EFI_STATUS\r | |
756 | EFIAPI\r | |
757 | AtapiExtScsiPassThruGetNextTargetLun (\r | |
758 | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r | |
759 | IN OUT UINT8 **Target,\r | |
760 | IN OUT UINT64 *Lun\r | |
761 | )\r | |
762 | /*++\r | |
763 | \r | |
764 | Routine Description:\r | |
765 | \r | |
766 | Used to retrieve the list of legal Target IDs for SCSI devices \r | |
767 | on a SCSI channel.\r | |
768 | \r | |
769 | Arguments:\r | |
770 | \r | |
771 | This - Protocol instance pointer.\r | |
772 | Target - On input, a pointer to the Target ID of a SCSI \r | |
773 | device present on the SCSI channel. On output, \r | |
774 | a pointer to the Target ID of the next SCSI device\r | |
775 | present on a SCSI channel. An input value of \r | |
776 | 0xFFFFFFFF retrieves the Target ID of the first \r | |
777 | SCSI device present on a SCSI channel.\r | |
778 | Lun - On input, a pointer to the LUN of a SCSI device\r | |
779 | present on the SCSI channel. On output, a pointer\r | |
780 | to the LUN of the next SCSI device present on \r | |
781 | a SCSI channel.\r | |
782 | Returns:\r | |
783 | \r | |
784 | EFI_SUCCESS - The Target ID and Lun of the next SCSI device \r | |
785 | on the SCSI channel was returned in Target and Lun.\r | |
786 | EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.\r | |
787 | EFI_INVALID_PARAMETER - Target is not 0xFFFFFFFF,and Target and Lun were not\r | |
788 | returned on a previous call to GetNextDevice().\r | |
789 | \r | |
790 | --*/\r | |
791 | ;\r | |
792 | \r | |
793 | EFI_STATUS\r | |
794 | EFIAPI\r | |
795 | AtapiExtScsiPassThruBuildDevicePath (\r | |
796 | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r | |
797 | IN UINT8 *Target,\r | |
798 | IN UINT64 Lun,\r | |
799 | IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r | |
800 | )\r | |
801 | /*++\r | |
802 | \r | |
803 | Routine Description:\r | |
804 | \r | |
805 | Used to allocate and build a device path node for a SCSI device \r | |
806 | on a SCSI channel. Would not build device path for a SCSI Host Controller.\r | |
807 | \r | |
808 | Arguments:\r | |
809 | \r | |
810 | This - Protocol instance pointer.\r | |
811 | Target - The Target ID of the SCSI device for which\r | |
812 | a device path node is to be allocated and built.\r | |
813 | Lun - The LUN of the SCSI device for which a device \r | |
814 | path node is to be allocated and built.\r | |
815 | DevicePath - A pointer to a single device path node that \r | |
816 | describes the SCSI device specified by \r | |
817 | Target and Lun. This function is responsible \r | |
818 | for allocating the buffer DevicePath with the boot\r | |
819 | service AllocatePool(). It is the caller's \r | |
820 | responsibility to free DevicePath when the caller\r | |
821 | is finished with DevicePath. \r | |
822 | Returns:\r | |
823 | EFI_SUCCESS - The device path node that describes the SCSI device\r | |
824 | specified by Target and Lun was allocated and \r | |
825 | returned in DevicePath.\r | |
826 | EFI_NOT_FOUND - The SCSI devices specified by Target and Lun does\r | |
827 | not exist on the SCSI channel.\r | |
828 | EFI_INVALID_PARAMETER - DevicePath is NULL.\r | |
829 | EFI_OUT_OF_RESOURCES - There are not enough resources to allocate \r | |
830 | DevicePath.\r | |
831 | \r | |
832 | --*/\r | |
833 | ;\r | |
834 | \r | |
835 | EFI_STATUS\r | |
836 | EFIAPI\r | |
837 | AtapiExtScsiPassThruGetTargetLun (\r | |
838 | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r | |
839 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r | |
840 | OUT UINT8 **Target,\r | |
841 | OUT UINT64 *Lun\r | |
842 | )\r | |
843 | /*++\r | |
844 | \r | |
845 | Routine Description:\r | |
846 | \r | |
847 | Used to translate a device path node to a Target ID and LUN.\r | |
848 | \r | |
849 | Arguments:\r | |
850 | \r | |
851 | This - Protocol instance pointer.\r | |
852 | DevicePath - A pointer to the device path node that \r | |
853 | describes a SCSI device on the SCSI channel.\r | |
854 | Target - A pointer to the Target ID of a SCSI device \r | |
855 | on the SCSI channel. \r | |
856 | Lun - A pointer to the LUN of a SCSI device on \r | |
857 | the SCSI channel. \r | |
858 | Returns:\r | |
859 | \r | |
860 | EFI_SUCCESS - DevicePath was successfully translated to a \r | |
861 | Target ID and LUN, and they were returned \r | |
862 | in Target and Lun.\r | |
863 | EFI_INVALID_PARAMETER - DevicePath/Target/Lun is NULL.\r | |
864 | EFI_UNSUPPORTED - This driver does not support the device path \r | |
865 | node type in DevicePath.\r | |
866 | EFI_NOT_FOUND - A valid translation from DevicePath to a \r | |
867 | Target ID and LUN does not exist.\r | |
868 | \r | |
869 | --*/\r | |
870 | ;\r | |
871 | \r | |
872 | EFI_STATUS\r | |
873 | EFIAPI\r | |
874 | AtapiExtScsiPassThruResetChannel (\r | |
875 | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This\r | |
876 | )\r | |
877 | /*++\r | |
878 | \r | |
879 | Routine Description:\r | |
880 | \r | |
881 | Resets a SCSI channel.This operation resets all the \r | |
882 | SCSI devices connected to the SCSI channel.\r | |
883 | \r | |
884 | Arguments:\r | |
885 | \r | |
886 | This - Protocol instance pointer.\r | |
887 | \r | |
888 | Returns:\r | |
889 | \r | |
890 | EFI_SUCCESS - The SCSI channel was reset.\r | |
891 | EFI_UNSUPPORTED - The SCSI channel does not support \r | |
892 | a channel reset operation.\r | |
893 | EFI_DEVICE_ERROR - A device error occurred while \r | |
894 | attempting to reset the SCSI channel.\r | |
895 | EFI_TIMEOUT - A timeout occurred while attempting \r | |
896 | to reset the SCSI channel.\r | |
897 | \r | |
898 | --*/\r | |
899 | ;\r | |
900 | \r | |
901 | EFI_STATUS\r | |
902 | EFIAPI\r | |
903 | AtapiExtScsiPassThruResetTarget (\r | |
904 | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r | |
905 | IN UINT8 *Target,\r | |
906 | IN UINT64 Lun\r | |
907 | )\r | |
908 | /*++\r | |
909 | \r | |
910 | Routine Description:\r | |
911 | \r | |
912 | Resets a SCSI device that is connected to a SCSI channel.\r | |
913 | \r | |
914 | Arguments:\r | |
915 | \r | |
916 | This - Protocol instance pointer.\r | |
917 | Target - The Target ID of the SCSI device to reset. \r | |
918 | Lun - The LUN of the SCSI device to reset.\r | |
919 | \r | |
920 | Returns:\r | |
921 | \r | |
922 | EFI_SUCCESS - The SCSI device specified by Target and \r | |
923 | Lun was reset.\r | |
924 | EFI_UNSUPPORTED - The SCSI channel does not support a target\r | |
925 | reset operation.\r | |
926 | EFI_INVALID_PARAMETER - Target or Lun are invalid.\r | |
927 | EFI_DEVICE_ERROR - A device error occurred while attempting \r | |
928 | to reset the SCSI device specified by Target \r | |
929 | and Lun.\r | |
930 | EFI_TIMEOUT - A timeout occurred while attempting to reset \r | |
931 | the SCSI device specified by Target and Lun.\r | |
932 | \r | |
933 | --*/\r | |
934 | ;\r | |
935 | \r | |
936 | EFI_STATUS\r | |
937 | EFIAPI\r | |
938 | AtapiExtScsiPassThruGetNextTarget (\r | |
939 | IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r | |
940 | IN OUT UINT8 **Target\r | |
941 | )\r | |
942 | /*++\r | |
943 | \r | |
944 | Routine Description:\r | |
945 | Used to retrieve the list of legal Target IDs for SCSI devices \r | |
946 | on a SCSI channel.\r | |
947 | \r | |
948 | Arguments:\r | |
949 | This - Protocol instance pointer.\r | |
950 | Target - On input, a pointer to the Target ID of a SCSI \r | |
951 | device present on the SCSI channel. On output, \r | |
952 | a pointer to the Target ID of the next SCSI device\r | |
953 | present on a SCSI channel. An input value of \r | |
954 | 0xFFFFFFFF retrieves the Target ID of the first \r | |
955 | SCSI device present on a SCSI channel.\r | |
956 | Lun - On input, a pointer to the LUN of a SCSI device\r | |
957 | present on the SCSI channel. On output, a pointer\r | |
958 | to the LUN of the next SCSI device present on \r | |
959 | a SCSI channel.\r | |
960 | \r | |
961 | Returns:\r | |
962 | EFI_SUCCESS - The Target ID and Lun of the next SCSI device \r | |
963 | on the SCSI channel was returned in Target and Lun.\r | |
964 | EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.\r | |
965 | EFI_INVALID_PARAMETER - Target is not 0xFFFFFFFF,and Target and Lun were not\r | |
966 | returned on a previous call to GetNextDevice().\r | |
967 | \r | |
968 | --*/\r | |
969 | ;\r | |
970 | \r | |
971 | EFI_STATUS\r | |
972 | CheckSCSIRequestPacket (\r | |
973 | EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r | |
974 | )\r | |
975 | /*++\r | |
976 | \r | |
977 | Routine Description:\r | |
978 | \r | |
979 | Checks the parameters in the SCSI Request Packet to make sure\r | |
980 | they are valid for a SCSI Pass Thru request.\r | |
981 | \r | |
982 | Arguments:\r | |
983 | \r | |
984 | Packet - The pointer of EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET \r | |
985 | \r | |
986 | Returns:\r | |
987 | \r | |
988 | EFI_STATUS\r | |
989 | \r | |
990 | --*/\r | |
991 | ;\r | |
992 | \r | |
993 | EFI_STATUS\r | |
994 | SubmitBlockingIoCommand (\r | |
995 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
996 | UINT32 Target,\r | |
997 | EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r | |
998 | )\r | |
999 | /*++\r | |
1000 | \r | |
1001 | Routine Description:\r | |
1002 | \r | |
1003 | Performs blocking I/O request.\r | |
1004 | \r | |
1005 | Arguments:\r | |
1006 | \r | |
1007 | AtapiScsiPrivate: Private data structure for the specified channel.\r | |
1008 | Target: The Target ID of the ATAPI device to send the SCSI \r | |
1009 | Request Packet. To ATAPI devices attached on an IDE\r | |
1010 | Channel, Target ID 0 indicates Master device;Target\r | |
1011 | ID 1 indicates Slave device.\r | |
1012 | Packet: The SCSI Request Packet to send to the ATAPI device \r | |
1013 | specified by Target.\r | |
1014 | \r | |
1015 | Returns: EFI_STATUS \r | |
1016 | \r | |
1017 | --*/\r | |
1018 | ;\r | |
1019 | \r | |
1020 | BOOLEAN\r | |
1021 | IsCommandValid (\r | |
1022 | EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r | |
1023 | )\r | |
1024 | /*++\r | |
1025 | \r | |
1026 | Routine Description:\r | |
1027 | \r | |
1028 | Checks the requested SCSI command: \r | |
1029 | Is it supported by this driver?\r | |
1030 | Is the Data transfer direction reasonable?\r | |
1031 | \r | |
1032 | Arguments:\r | |
1033 | \r | |
1034 | Packet - The pointer of EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET \r | |
1035 | \r | |
1036 | Returns:\r | |
1037 | \r | |
1038 | EFI_STATUS\r | |
1039 | \r | |
1040 | --*/\r | |
1041 | ;\r | |
1042 | \r | |
1043 | EFI_STATUS\r | |
1044 | CheckExtSCSIRequestPacket (\r | |
1045 | EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r | |
1046 | )\r | |
1047 | /*++\r | |
1048 | \r | |
1049 | Routine Description:\r | |
1050 | \r | |
1051 | Checks the parameters in the SCSI Request Packet to make sure\r | |
1052 | they are valid for a SCSI Pass Thru request.\r | |
1053 | \r | |
1054 | Arguments:\r | |
1055 | \r | |
1056 | Packet - The pointer of EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET\r | |
1057 | \r | |
1058 | Returns:\r | |
1059 | \r | |
1060 | EFI_STATUS\r | |
1061 | \r | |
1062 | --*/\r | |
1063 | ;\r | |
1064 | \r | |
1065 | \r | |
1066 | BOOLEAN\r | |
1067 | IsExtCommandValid (\r | |
1068 | EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r | |
1069 | )\r | |
1070 | /*++\r | |
1071 | \r | |
1072 | Routine Description:\r | |
1073 | \r | |
1074 | Checks the requested SCSI command: \r | |
1075 | Is it supported by this driver?\r | |
1076 | Is the Data transfer direction reasonable?\r | |
1077 | \r | |
1078 | Arguments:\r | |
1079 | \r | |
1080 | Packet - The pointer of EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET \r | |
1081 | \r | |
1082 | Returns:\r | |
1083 | \r | |
1084 | EFI_STATUS\r | |
1085 | \r | |
1086 | --*/\r | |
1087 | ;\r | |
1088 | \r | |
1089 | EFI_STATUS\r | |
1090 | SubmitExtBlockingIoCommand (\r | |
1091 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1092 | UINT8 Target,\r | |
1093 | EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r | |
1094 | )\r | |
1095 | /*++\r | |
1096 | \r | |
1097 | Routine Description:\r | |
1098 | \r | |
1099 | Performs blocking I/O request.\r | |
1100 | \r | |
1101 | Arguments:\r | |
1102 | \r | |
1103 | AtapiScsiPrivate: Private data structure for the specified channel.\r | |
1104 | Target: The Target ID of the ATAPI device to send the SCSI \r | |
1105 | Request Packet. To ATAPI devices attached on an IDE\r | |
1106 | Channel, Target ID 0 indicates Master device;Target\r | |
1107 | ID 1 indicates Slave device.\r | |
1108 | Packet: The SCSI Request Packet to send to the ATAPI device \r | |
1109 | specified by Target.\r | |
1110 | \r | |
1111 | Returns: EFI_STATUS \r | |
1112 | \r | |
1113 | --*/\r | |
1114 | ;\r | |
1115 | \r | |
1116 | EFI_STATUS\r | |
1117 | RequestSenseCommand (\r | |
1118 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1119 | UINT32 Target,\r | |
1120 | UINT64 Timeout,\r | |
1121 | VOID *SenseData,\r | |
1122 | UINT8 *SenseDataLength\r | |
1123 | )\r | |
1124 | /*++\r | |
1125 | \r | |
1126 | Routine Description:\r | |
1127 | \r | |
1128 | Sumbit request sense command\r | |
1129 | \r | |
1130 | Arguments:\r | |
1131 | \r | |
1132 | AtapiScsiPrivate - The pionter of ATAPI_SCSI_PASS_THRU_DEV\r | |
1133 | Target - The target ID\r | |
1134 | Timeout - The time to complete the command\r | |
1135 | SenseData - The buffer to fill in sense data\r | |
1136 | SenseDataLength - The length of buffer\r | |
1137 | \r | |
1138 | Returns:\r | |
1139 | \r | |
1140 | EFI_STATUS\r | |
1141 | \r | |
1142 | --*/\r | |
1143 | ;\r | |
1144 | \r | |
1145 | EFI_STATUS\r | |
1146 | AtapiPacketCommand (\r | |
1147 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1148 | UINT32 Target,\r | |
1149 | UINT8 *PacketCommand,\r | |
1150 | VOID *Buffer,\r | |
1151 | UINT32 *ByteCount,\r | |
1152 | DATA_DIRECTION Direction,\r | |
1153 | UINT64 TimeOutInMicroSeconds\r | |
1154 | )\r | |
1155 | /*++\r | |
1156 | \r | |
1157 | Routine Description:\r | |
1158 | \r | |
1159 | Submits ATAPI command packet to the specified ATAPI device.\r | |
1160 | \r | |
1161 | Arguments:\r | |
1162 | \r | |
1163 | AtapiScsiPrivate: Private data structure for the specified channel.\r | |
1164 | Target: The Target ID of the ATAPI device to send the SCSI \r | |
1165 | Request Packet. To ATAPI devices attached on an IDE\r | |
1166 | Channel, Target ID 0 indicates Master device;Target\r | |
1167 | ID 1 indicates Slave device.\r | |
1168 | PacketCommand: Points to the ATAPI command packet.\r | |
1169 | Buffer: Points to the transferred data.\r | |
1170 | ByteCount: When input,indicates the buffer size; when output,\r | |
1171 | indicates the actually transferred data size.\r | |
1172 | Direction: Indicates the data transfer direction. \r | |
1173 | TimeoutInMicroSeconds:\r | |
1174 | The timeout, in micro second units, to use for the \r | |
1175 | execution of this ATAPI command.\r | |
1176 | A TimeoutInMicroSeconds value of 0 means that \r | |
1177 | this function will wait indefinitely for the ATAPI \r | |
1178 | command to execute.\r | |
1179 | If TimeoutInMicroSeconds is greater than zero, then \r | |
1180 | this function will return EFI_TIMEOUT if the time \r | |
1181 | required to execute the ATAPI command is greater \r | |
1182 | than TimeoutInMicroSeconds.\r | |
1183 | \r | |
1184 | Returns:\r | |
1185 | \r | |
1186 | EFI_STATUS\r | |
1187 | \r | |
1188 | --*/\r | |
1189 | ;\r | |
1190 | \r | |
1191 | \r | |
1192 | UINT8\r | |
1193 | ReadPortB (\r | |
1194 | IN EFI_PCI_IO_PROTOCOL *PciIo,\r | |
1195 | IN UINT16 Port\r | |
1196 | )\r | |
1197 | /*++\r | |
1198 | \r | |
1199 | Routine Description:\r | |
1200 | \r | |
1201 | Read one byte from a specified I/O port.\r | |
1202 | \r | |
1203 | Arguments:\r | |
1204 | \r | |
1205 | PciIo - The pointer of EFI_PCI_IO_PROTOCOL\r | |
1206 | Port - IO port\r | |
1207 | \r | |
1208 | Returns:\r | |
1209 | \r | |
1210 | A byte read out\r | |
1211 | \r | |
1212 | --*/\r | |
1213 | ;\r | |
1214 | \r | |
1215 | \r | |
1216 | UINT16\r | |
1217 | ReadPortW (\r | |
1218 | IN EFI_PCI_IO_PROTOCOL *PciIo,\r | |
1219 | IN UINT16 Port\r | |
1220 | )\r | |
1221 | /*++\r | |
1222 | \r | |
1223 | Routine Description:\r | |
1224 | \r | |
1225 | Read one word from a specified I/O port.\r | |
1226 | \r | |
1227 | Arguments:\r | |
1228 | \r | |
1229 | PciIo - The pointer of EFI_PCI_IO_PROTOCOL\r | |
1230 | Port - IO port\r | |
1231 | \r | |
1232 | Returns: \r | |
1233 | \r | |
1234 | A word read out\r | |
1235 | \r | |
1236 | --*/\r | |
1237 | ;\r | |
1238 | \r | |
1239 | \r | |
1240 | VOID\r | |
1241 | WritePortB (\r | |
1242 | IN EFI_PCI_IO_PROTOCOL *PciIo,\r | |
1243 | IN UINT16 Port,\r | |
1244 | IN UINT8 Data\r | |
1245 | )\r | |
1246 | /*++\r | |
1247 | \r | |
1248 | Routine Description:\r | |
1249 | \r | |
1250 | Write one byte to a specified I/O port.\r | |
1251 | \r | |
1252 | Arguments:\r | |
1253 | \r | |
1254 | PciIo - The pointer of EFI_PCI_IO_PROTOCOL\r | |
1255 | Port - IO port\r | |
1256 | Data - The data to write\r | |
1257 | \r | |
1258 | Returns:\r | |
1259 | \r | |
1260 | NONE\r | |
1261 | \r | |
1262 | --*/\r | |
1263 | ;\r | |
1264 | \r | |
1265 | \r | |
1266 | VOID\r | |
1267 | WritePortW (\r | |
1268 | IN EFI_PCI_IO_PROTOCOL *PciIo,\r | |
1269 | IN UINT16 Port,\r | |
1270 | IN UINT16 Data\r | |
1271 | )\r | |
1272 | /*++\r | |
1273 | \r | |
1274 | Routine Description:\r | |
1275 | \r | |
1276 | Write one word to a specified I/O port.\r | |
1277 | \r | |
1278 | Arguments:\r | |
1279 | \r | |
1280 | PciIo - The pointer of EFI_PCI_IO_PROTOCOL\r | |
1281 | Port - IO port\r | |
1282 | Data - The data to write\r | |
1283 | \r | |
1284 | Returns:\r | |
1285 | \r | |
1286 | NONE\r | |
1287 | \r | |
1288 | --*/\r | |
1289 | ;\r | |
1290 | \r | |
1291 | EFI_STATUS\r | |
1292 | StatusDRQClear (\r | |
1293 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1294 | UINT64 TimeOutInMicroSeconds\r | |
1295 | )\r | |
1296 | /*++\r | |
1297 | \r | |
1298 | Routine Description:\r | |
1299 | \r | |
1300 | Check whether DRQ is clear in the Status Register. (BSY must also be cleared)\r | |
1301 | If TimeoutInMicroSeconds is zero, this routine should wait infinitely for\r | |
1302 | DRQ clear. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1303 | elapsed.\r | |
1304 | \r | |
1305 | Arguments:\r | |
1306 | \r | |
1307 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1308 | TimeoutInMicroSeconds - The time to wait for\r | |
1309 | \r | |
1310 | Returns:\r | |
1311 | \r | |
1312 | EFI_STATUS\r | |
1313 | \r | |
1314 | --*/\r | |
1315 | ;\r | |
1316 | \r | |
1317 | EFI_STATUS\r | |
1318 | AltStatusDRQClear (\r | |
1319 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1320 | UINT64 TimeOutInMicroSeconds\r | |
1321 | )\r | |
1322 | /*++\r | |
1323 | \r | |
1324 | Routine Description:\r | |
1325 | \r | |
1326 | Check whether DRQ is clear in the Alternate Status Register. \r | |
1327 | (BSY must also be cleared).If TimeoutInMicroSeconds is zero, this routine should \r | |
1328 | wait infinitely for DRQ clear. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1329 | elapsed.\r | |
1330 | \r | |
1331 | Arguments:\r | |
1332 | \r | |
1333 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1334 | TimeoutInMicroSeconds - The time to wait for\r | |
1335 | \r | |
1336 | Returns:\r | |
1337 | \r | |
1338 | EFI_STATUS\r | |
1339 | \r | |
1340 | --*/\r | |
1341 | ;\r | |
1342 | \r | |
1343 | EFI_STATUS\r | |
1344 | StatusDRQReady (\r | |
1345 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1346 | UINT64 TimeOutInMicroSeconds\r | |
1347 | )\r | |
1348 | /*++\r | |
1349 | \r | |
1350 | Routine Description:\r | |
1351 | \r | |
1352 | Check whether DRQ is ready in the Status Register. (BSY must also be cleared)\r | |
1353 | If TimeoutInMicroSeconds is zero, this routine should wait infinitely for\r | |
1354 | DRQ ready. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1355 | elapsed.\r | |
1356 | \r | |
1357 | Arguments:\r | |
1358 | \r | |
1359 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1360 | TimeoutInMicroSeconds - The time to wait for\r | |
1361 | \r | |
1362 | Returns:\r | |
1363 | \r | |
1364 | EFI_STATUS\r | |
1365 | \r | |
1366 | --*/\r | |
1367 | ;\r | |
1368 | \r | |
1369 | EFI_STATUS\r | |
1370 | AltStatusDRQReady (\r | |
1371 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1372 | UINT64 TimeOutInMicroSeconds\r | |
1373 | )\r | |
1374 | /*++\r | |
1375 | \r | |
1376 | Routine Description:\r | |
1377 | \r | |
1378 | Check whether DRQ is ready in the Alternate Status Register. \r | |
1379 | (BSY must also be cleared)\r | |
1380 | If TimeoutInMicroSeconds is zero, this routine should wait infinitely for\r | |
1381 | DRQ ready. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1382 | elapsed.\r | |
1383 | \r | |
1384 | Arguments:\r | |
1385 | \r | |
1386 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1387 | TimeoutInMicroSeconds - The time to wait for\r | |
1388 | \r | |
1389 | Returns:\r | |
1390 | \r | |
1391 | EFI_STATUS\r | |
1392 | \r | |
1393 | --*/\r | |
1394 | ;\r | |
1395 | \r | |
1396 | EFI_STATUS\r | |
1397 | StatusWaitForBSYClear (\r | |
1398 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1399 | UINT64 TimeoutInMicroSeconds\r | |
1400 | )\r | |
1401 | /*++\r | |
1402 | \r | |
1403 | Routine Description:\r | |
1404 | \r | |
1405 | Check whether BSY is clear in the Status Register.\r | |
1406 | If TimeoutInMicroSeconds is zero, this routine should wait infinitely for\r | |
1407 | BSY clear. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1408 | elapsed.\r | |
1409 | \r | |
1410 | Arguments:\r | |
1411 | \r | |
1412 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1413 | TimeoutInMicroSeconds - The time to wait for\r | |
1414 | \r | |
1415 | Returns:\r | |
1416 | \r | |
1417 | EFI_STATUS\r | |
1418 | \r | |
1419 | --*/\r | |
1420 | ;\r | |
1421 | \r | |
1422 | EFI_STATUS\r | |
1423 | AltStatusWaitForBSYClear (\r | |
1424 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1425 | UINT64 TimeoutInMicroSeconds\r | |
1426 | )\r | |
1427 | /*++\r | |
1428 | \r | |
1429 | Routine Description:\r | |
1430 | \r | |
1431 | Check whether BSY is clear in the Alternate Status Register.\r | |
1432 | If TimeoutInMicroSeconds is zero, this routine should wait infinitely for\r | |
1433 | BSY clear. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1434 | elapsed.\r | |
1435 | \r | |
1436 | Arguments:\r | |
1437 | \r | |
1438 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1439 | TimeoutInMicroSeconds - The time to wait for\r | |
1440 | \r | |
1441 | Returns:\r | |
1442 | \r | |
1443 | EFI_STATUS\r | |
1444 | \r | |
1445 | --*/\r | |
1446 | ;\r | |
1447 | \r | |
1448 | EFI_STATUS\r | |
1449 | StatusDRDYReady (\r | |
1450 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1451 | UINT64 TimeoutInMicroSeconds\r | |
1452 | )\r | |
1453 | /*++\r | |
1454 | \r | |
1455 | Routine Description:\r | |
1456 | \r | |
1457 | Check whether DRDY is ready in the Status Register. \r | |
1458 | (BSY must also be cleared)\r | |
1459 | If TimeoutInMicroSeconds is zero, this routine should wait infinitely for\r | |
1460 | DRDY ready. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1461 | elapsed.\r | |
1462 | \r | |
1463 | Arguments:\r | |
1464 | \r | |
1465 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1466 | TimeoutInMicroSeconds - The time to wait for\r | |
1467 | \r | |
1468 | Returns:\r | |
1469 | \r | |
1470 | EFI_STATUS\r | |
1471 | \r | |
1472 | --*/\r | |
1473 | ;\r | |
1474 | \r | |
1475 | EFI_STATUS\r | |
1476 | AltStatusDRDYReady (\r | |
1477 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1478 | UINT64 TimeoutInMicroSeconds\r | |
1479 | )\r | |
1480 | /*++\r | |
1481 | \r | |
1482 | Routine Description:\r | |
1483 | \r | |
1484 | Check whether DRDY is ready in the Alternate Status Register. \r | |
1485 | (BSY must also be cleared)\r | |
1486 | If TimeoutInMicroSeconds is zero, this routine should wait infinitely for\r | |
1487 | DRDY ready. Otherwise, it will return EFI_TIMEOUT when specified time is \r | |
1488 | elapsed.\r | |
1489 | \r | |
1490 | Arguments:\r | |
1491 | \r | |
1492 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1493 | TimeoutInMicroSeconds - The time to wait for\r | |
1494 | \r | |
1495 | Returns:\r | |
1496 | \r | |
1497 | EFI_STATUS\r | |
1498 | \r | |
1499 | --*/\r | |
1500 | ;\r | |
1501 | \r | |
1502 | EFI_STATUS\r | |
1503 | AtapiPassThruPioReadWriteData (\r | |
1504 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1505 | UINT16 *Buffer,\r | |
1506 | UINT32 *ByteCount,\r | |
1507 | DATA_DIRECTION Direction,\r | |
1508 | UINT64 TimeOutInMicroSeconds\r | |
1509 | )\r | |
1510 | /*++\r | |
1511 | \r | |
1512 | Routine Description:\r | |
1513 | \r | |
1514 | Performs data transfer between ATAPI device and host after the\r | |
1515 | ATAPI command packet is sent.\r | |
1516 | \r | |
1517 | Arguments:\r | |
1518 | \r | |
1519 | AtapiScsiPrivate: Private data structure for the specified channel. \r | |
1520 | Buffer: Points to the transferred data.\r | |
1521 | ByteCount: When input,indicates the buffer size; when output,\r | |
1522 | indicates the actually transferred data size.\r | |
1523 | Direction: Indicates the data transfer direction. \r | |
1524 | TimeoutInMicroSeconds:\r | |
1525 | The timeout, in micro second units, to use for the \r | |
1526 | execution of this ATAPI command.\r | |
1527 | A TimeoutInMicroSeconds value of 0 means that \r | |
1528 | this function will wait indefinitely for the ATAPI \r | |
1529 | command to execute.\r | |
1530 | If TimeoutInMicroSeconds is greater than zero, then \r | |
1531 | this function will return EFI_TIMEOUT if the time \r | |
1532 | required to execute the ATAPI command is greater \r | |
1533 | than TimeoutInMicroSeconds.\r | |
1534 | Returns:\r | |
1535 | \r | |
1536 | EFI_STATUS\r | |
1537 | \r | |
1538 | --*/\r | |
1539 | ;\r | |
1540 | \r | |
1541 | EFI_STATUS\r | |
1542 | AtapiPassThruCheckErrorStatus (\r | |
1543 | ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate\r | |
1544 | )\r | |
1545 | /*++\r | |
1546 | \r | |
1547 | Routine Description:\r | |
1548 | \r | |
1549 | Check Error Register for Error Information. \r | |
1550 | \r | |
1551 | Arguments:\r | |
1552 | \r | |
1553 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1554 | \r | |
1555 | Returns:\r | |
1556 | \r | |
1557 | EFI_STATUS\r | |
1558 | \r | |
1559 | --*/\r | |
1560 | ;\r | |
1561 | \r | |
1562 | \r | |
1563 | EFI_STATUS\r | |
1564 | GetIdeRegistersBaseAddr (\r | |
1565 | IN EFI_PCI_IO_PROTOCOL *PciIo,\r | |
1566 | OUT IDE_REGISTERS_BASE_ADDR *IdeRegsBaseAddr\r | |
1567 | )\r | |
1568 | /*++\r | |
1569 | \r | |
1570 | Routine Description:\r | |
1571 | Get IDE IO port registers' base addresses by mode. In 'Compatibility' mode,\r | |
1572 | use fixed addresses. In Native-PCI mode, get base addresses from BARs in\r | |
1573 | the PCI IDE controller's Configuration Space.\r | |
1574 | \r | |
1575 | Arguments:\r | |
1576 | PciIo - Pointer to the EFI_PCI_IO_PROTOCOL instance\r | |
1577 | IdeRegsBaseAddr - Pointer to IDE_REGISTERS_BASE_ADDR to \r | |
1578 | receive IDE IO port registers' base addresses\r | |
1579 | \r | |
1580 | Returns:\r | |
1581 | \r | |
1582 | EFI_STATUS\r | |
1583 | \r | |
1584 | --*/\r | |
1585 | ;\r | |
1586 | \r | |
1587 | \r | |
1588 | VOID\r | |
1589 | InitAtapiIoPortRegisters (\r | |
1590 | IN ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r | |
1591 | IN IDE_REGISTERS_BASE_ADDR *IdeRegsBaseAddr\r | |
1592 | )\r | |
1593 | /*++\r | |
1594 | \r | |
1595 | Routine Description:\r | |
1596 | \r | |
1597 | Initialize each Channel's Base Address of CommandBlock and ControlBlock.\r | |
1598 | \r | |
1599 | Arguments:\r | |
1600 | \r | |
1601 | AtapiScsiPrivate - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r | |
1602 | IdeRegsBaseAddr - The pointer of IDE_REGISTERS_BASE_ADDR\r | |
1603 | \r | |
1604 | Returns:\r | |
1605 | \r | |
1606 | None\r | |
1607 | \r | |
1608 | --*/ \r | |
1609 | ;\r | |
1610 | \r | |
1611 | /**\r | |
1612 | Installs Scsi Pass Thru and/or Ext Scsi Pass Thru \r | |
1613 | protocols based on feature flags. \r | |
1614 | \r | |
1615 | @param Controller The controller handle to \r | |
1616 | install these protocols on.\r | |
1617 | @param AtapiScsiPrivate A pointer to the protocol private\r | |
1618 | data structure.\r | |
1619 | \r | |
1620 | @retval EFI_SUCCESS The installation succeeds. \r | |
1621 | @retval other The installation fails. \r | |
1622 | \r | |
1623 | **/\r | |
1624 | EFI_STATUS\r | |
1625 | InstallScsiPassThruProtocols (\r | |
1626 | IN EFI_HANDLE *ControllerHandle,\r | |
1627 | IN ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate\r | |
1628 | );\r | |
1629 | \r | |
1630 | #endif\r |