TianoCore EDK2 master
Loading...
Searching...
No Matches
UsbBotPeim.c
Go to the documentation of this file.
1
9#include "UsbBotPeim.h"
10#include "BotPeim.h"
11
12//
13// Global function
14//
15EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList = {
16 EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
17 &gPeiUsbIoPpiGuid,
19};
20
21EFI_PEI_RECOVERY_BLOCK_IO_PPI mRecoveryBlkIoPpi = {
25};
26
27EFI_PEI_RECOVERY_BLOCK_IO2_PPI mRecoveryBlkIo2Ppi = {
28 EFI_PEI_RECOVERY_BLOCK_IO2_PPI_REVISION,
32};
33
34EFI_PEI_PPI_DESCRIPTOR mPpiList[2] = {
35 {
36 EFI_PEI_PPI_DESCRIPTOR_PPI,
37 &gEfiPeiVirtualBlockIoPpiGuid,
38 NULL
39 },
40 {
41 EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
42 &gEfiPeiVirtualBlockIo2PpiGuid,
43 NULL
44 }
45};
46
60 IN EFI_PEI_SERVICES **PeiServices,
61 IN PEI_BOT_DEVICE *PeiBotDev
62 );
63
75EFIAPI
77 IN EFI_PEI_FILE_HANDLE FileHandle,
78 IN CONST EFI_PEI_SERVICES **PeiServices
79 )
80{
81 EFI_STATUS Status;
82 UINTN UsbIoPpiInstance;
83 EFI_PEI_PPI_DESCRIPTOR *TempPpiDescriptor;
84 PEI_USB_IO_PPI *UsbIoPpi;
85
86 //
87 // Shadow this PEIM to run from memory
88 //
89 if (!EFI_ERROR (PeiServicesRegisterForShadow (FileHandle))) {
90 return EFI_SUCCESS;
91 }
92
93 //
94 // locate all usb io PPIs
95 //
96 for (UsbIoPpiInstance = 0; UsbIoPpiInstance < PEI_FAT_MAX_USB_IO_PPI; UsbIoPpiInstance++) {
97 Status = PeiServicesLocatePpi (
98 &gPeiUsbIoPpiGuid,
99 UsbIoPpiInstance,
100 &TempPpiDescriptor,
101 (VOID **)&UsbIoPpi
102 );
103 if (EFI_ERROR (Status)) {
104 break;
105 }
106 }
107
108 //
109 // Register a notify function
110 //
111 return PeiServicesNotifyPpi (&mNotifyList);
112}
113
128EFIAPI
130 IN EFI_PEI_SERVICES **PeiServices,
131 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
132 IN VOID *InvokePpi
133 )
134{
135 PEI_USB_IO_PPI *UsbIoPpi;
136
137 UsbIoPpi = (PEI_USB_IO_PPI *)InvokePpi;
138
139 InitUsbBot (PeiServices, UsbIoPpi);
140
141 return EFI_SUCCESS;
142}
143
157 IN EFI_PEI_SERVICES **PeiServices,
158 IN PEI_USB_IO_PPI *UsbIoPpi
159 )
160{
161 PEI_BOT_DEVICE *PeiBotDevice;
162 EFI_STATUS Status;
163 EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDesc;
164 UINTN MemPages;
166 EFI_USB_ENDPOINT_DESCRIPTOR *EndpointDesc;
167 UINT8 Index;
168
169 //
170 // Check its interface
171 //
172 Status = UsbIoPpi->UsbGetInterfaceDescriptor (
173 PeiServices,
174 UsbIoPpi,
175 &InterfaceDesc
176 );
177 if (EFI_ERROR (Status)) {
178 return Status;
179 }
180
181 //
182 // Check if it is the BOT device we support
183 //
184 if ((InterfaceDesc->InterfaceClass != 0x08) || (InterfaceDesc->InterfaceProtocol != 0x50)) {
185 return EFI_NOT_FOUND;
186 }
187
188 MemPages = sizeof (PEI_BOT_DEVICE) / EFI_PAGE_SIZE + 1;
189 Status = PeiServicesAllocatePages (
191 MemPages,
193 );
194 if (EFI_ERROR (Status)) {
195 return Status;
196 }
197
198 PeiBotDevice = (PEI_BOT_DEVICE *)((UINTN)AllocateAddress);
199
200 PeiBotDevice->Signature = PEI_BOT_DEVICE_SIGNATURE;
201 PeiBotDevice->UsbIoPpi = UsbIoPpi;
202 PeiBotDevice->AllocateAddress = (UINTN)AllocateAddress;
203 PeiBotDevice->BotInterface = InterfaceDesc;
204
205 //
206 // Default value
207 //
208 PeiBotDevice->Media.DeviceType = UsbMassStorage;
209 PeiBotDevice->Media.BlockSize = 0x200;
210 PeiBotDevice->Media2.InterfaceType = MSG_USB_DP;
211 PeiBotDevice->Media2.BlockSize = 0x200;
212 PeiBotDevice->Media2.RemovableMedia = FALSE;
213 PeiBotDevice->Media2.ReadOnly = FALSE;
214
215 //
216 // Check its Bulk-in/Bulk-out endpoint
217 //
218 for (Index = 0; Index < 2; Index++) {
219 Status = UsbIoPpi->UsbGetEndpointDescriptor (
220 PeiServices,
221 UsbIoPpi,
222 Index,
223 &EndpointDesc
224 );
225
226 if (EFI_ERROR (Status)) {
227 return Status;
228 }
229
230 if ((EndpointDesc->EndpointAddress & 0x80) != 0) {
231 PeiBotDevice->BulkInEndpoint = EndpointDesc;
232 } else {
233 PeiBotDevice->BulkOutEndpoint = EndpointDesc;
234 }
235 }
236
237 CopyMem (
238 &(PeiBotDevice->BlkIoPpi),
239 &mRecoveryBlkIoPpi,
241 );
242 CopyMem (
243 &(PeiBotDevice->BlkIo2Ppi),
244 &mRecoveryBlkIo2Ppi,
246 );
247 CopyMem (
248 &(PeiBotDevice->BlkIoPpiList),
249 &mPpiList[0],
251 );
252 CopyMem (
253 &(PeiBotDevice->BlkIo2PpiList),
254 &mPpiList[1],
256 );
257 PeiBotDevice->BlkIoPpiList.Ppi = &PeiBotDevice->BlkIoPpi;
258 PeiBotDevice->BlkIo2PpiList.Ppi = &PeiBotDevice->BlkIo2Ppi;
259
260 Status = PeiUsbInquiry (PeiServices, PeiBotDevice);
261 if (EFI_ERROR (Status)) {
262 return Status;
263 }
264
265 Status = PeiServicesAllocatePages (
267 1,
269 );
270 if (EFI_ERROR (Status)) {
271 return Status;
272 }
273
274 PeiBotDevice->SensePtr = (ATAPI_REQUEST_SENSE_DATA *)((UINTN)AllocateAddress);
275
276 Status = PeiServicesInstallPpi (&PeiBotDevice->BlkIoPpiList);
277
278 if (EFI_ERROR (Status)) {
279 return Status;
280 }
281
282 return EFI_SUCCESS;
283}
284
305EFIAPI
307 IN EFI_PEI_SERVICES **PeiServices,
309 OUT UINTN *NumberBlockDevices
310 )
311{
312 //
313 // For Usb devices, this value should be always 1
314 //
315 *NumberBlockDevices = 1;
316 return EFI_SUCCESS;
317}
318
347EFIAPI
349 IN EFI_PEI_SERVICES **PeiServices,
351 IN UINTN DeviceIndex,
352 OUT EFI_PEI_BLOCK_IO_MEDIA *MediaInfo
353 )
354{
355 PEI_BOT_DEVICE *PeiBotDev;
356 EFI_STATUS Status;
357
358 PeiBotDev = PEI_BOT_DEVICE_FROM_THIS (This);
359
360 //
361 // First test unit ready
362 //
364 PeiServices,
365 PeiBotDev
366 );
367
368 Status = PeiBotDetectMedia (
369 PeiServices,
370 PeiBotDev
371 );
372
373 if (EFI_ERROR (Status)) {
374 return EFI_DEVICE_ERROR;
375 }
376
377 CopyMem (
378 MediaInfo,
379 &(PeiBotDev->Media),
381 );
382
383 return EFI_SUCCESS;
384}
385
421EFIAPI
423 IN EFI_PEI_SERVICES **PeiServices,
425 IN UINTN DeviceIndex,
426 IN EFI_PEI_LBA StartLBA,
427 IN UINTN BufferSize,
428 OUT VOID *Buffer
429 )
430{
431 PEI_BOT_DEVICE *PeiBotDev;
432 EFI_STATUS Status;
433 UINTN BlockSize;
434 UINTN NumberOfBlocks;
435
436 Status = EFI_SUCCESS;
437 PeiBotDev = PEI_BOT_DEVICE_FROM_THIS (This);
438
439 //
440 // Check parameters
441 //
442 if (Buffer == NULL) {
443 return EFI_INVALID_PARAMETER;
444 }
445
446 if (BufferSize == 0) {
447 return EFI_SUCCESS;
448 }
449
450 if (!PeiBotDev->Media.MediaPresent) {
451 return EFI_NO_MEDIA;
452 }
453
454 BlockSize = PeiBotDev->Media.BlockSize;
455
456 if (BufferSize % BlockSize != 0) {
457 Status = EFI_BAD_BUFFER_SIZE;
458 }
459
460 if (StartLBA > PeiBotDev->Media2.LastBlock) {
461 Status = EFI_INVALID_PARAMETER;
462 }
463
464 NumberOfBlocks = BufferSize / (PeiBotDev->Media.BlockSize);
465
466 if (Status == EFI_SUCCESS) {
467 Status = PeiUsbTestUnitReady (
468 PeiServices,
469 PeiBotDev
470 );
471 if (Status == EFI_SUCCESS) {
472 Status = PeiUsbRead10 (
473 PeiServices,
474 PeiBotDev,
475 Buffer,
476 StartLBA,
477 1
478 );
479 }
480 } else {
481 //
482 // To generate sense data for DetectMedia use.
483 //
485 PeiServices,
486 PeiBotDev
487 );
488 }
489
490 if (EFI_ERROR (Status)) {
491 //
492 // if any error encountered, detect what happened to the media and
493 // update the media info accordingly.
494 //
495 Status = PeiBotDetectMedia (
496 PeiServices,
497 PeiBotDev
498 );
499 if (Status != EFI_SUCCESS) {
500 return EFI_DEVICE_ERROR;
501 }
502
503 NumberOfBlocks = BufferSize / PeiBotDev->Media.BlockSize;
504
505 if (!(PeiBotDev->Media.MediaPresent)) {
506 return EFI_NO_MEDIA;
507 }
508
509 if (BufferSize % (PeiBotDev->Media.BlockSize) != 0) {
510 return EFI_BAD_BUFFER_SIZE;
511 }
512
513 if (StartLBA > PeiBotDev->Media2.LastBlock) {
514 return EFI_INVALID_PARAMETER;
515 }
516
517 if ((StartLBA + NumberOfBlocks - 1) > PeiBotDev->Media2.LastBlock) {
518 return EFI_INVALID_PARAMETER;
519 }
520
521 Status = PeiUsbRead10 (
522 PeiServices,
523 PeiBotDev,
524 Buffer,
525 StartLBA,
526 NumberOfBlocks
527 );
528
529 switch (Status) {
530 case EFI_SUCCESS:
531 return EFI_SUCCESS;
532
533 default:
534 return EFI_DEVICE_ERROR;
535 }
536 } else {
537 StartLBA += 1;
538 NumberOfBlocks -= 1;
539 Buffer = (UINT8 *)Buffer + PeiBotDev->Media.BlockSize;
540
541 if (NumberOfBlocks == 0) {
542 return EFI_SUCCESS;
543 }
544
545 Status = PeiUsbRead10 (
546 PeiServices,
547 PeiBotDev,
548 Buffer,
549 StartLBA,
550 NumberOfBlocks
551 );
552 switch (Status) {
553 case EFI_SUCCESS:
554 return EFI_SUCCESS;
555
556 default:
557 return EFI_DEVICE_ERROR;
558 }
559 }
560}
561
582EFIAPI
584 IN EFI_PEI_SERVICES **PeiServices,
586 OUT UINTN *NumberBlockDevices
587 )
588{
589 //
590 // For Usb devices, this value should be always 1
591 //
592 *NumberBlockDevices = 1;
593 return EFI_SUCCESS;
594}
595
624EFIAPI
626 IN EFI_PEI_SERVICES **PeiServices,
628 IN UINTN DeviceIndex,
630 )
631{
632 PEI_BOT_DEVICE *PeiBotDev;
633 EFI_STATUS Status;
634
635 PeiBotDev = PEI_BOT_DEVICE2_FROM_THIS (This);
636
637 Status = BotGetMediaInfo (
638 PeiServices,
639 &PeiBotDev->BlkIoPpi,
640 DeviceIndex,
641 &PeiBotDev->Media
642 );
643
644 if (EFI_ERROR (Status)) {
645 return Status;
646 }
647
648 CopyMem (
649 MediaInfo,
650 &(PeiBotDev->Media2),
652 );
653
654 return EFI_SUCCESS;
655}
656
692EFIAPI
694 IN EFI_PEI_SERVICES **PeiServices,
696 IN UINTN DeviceIndex,
697 IN EFI_PEI_LBA StartLBA,
698 IN UINTN BufferSize,
699 OUT VOID *Buffer
700 )
701{
702 PEI_BOT_DEVICE *PeiBotDev;
703 EFI_STATUS Status;
704
705 if (This == NULL) {
706 return EFI_INVALID_PARAMETER;
707 }
708
709 Status = EFI_SUCCESS;
710 PeiBotDev = PEI_BOT_DEVICE2_FROM_THIS (This);
711
712 Status = BotReadBlocks (
713 PeiServices,
714 &PeiBotDev->BlkIoPpi,
715 DeviceIndex,
716 StartLBA,
717 BufferSize,
718 Buffer
719 );
720
721 return Status;
722}
723
737 IN EFI_PEI_SERVICES **PeiServices,
738 IN PEI_BOT_DEVICE *PeiBotDev
739 )
740{
741 EFI_STATUS Status;
742 EFI_STATUS FloppyStatus;
743 UINTN SenseCounts;
744 BOOLEAN NeedReadCapacity;
746 ATAPI_REQUEST_SENSE_DATA *SensePtr;
747 UINTN Retry;
748
749 //
750 // if there is no media present,or media not changed,
751 // the request sense command will detect faster than read capacity command.
752 // read capacity command can be bypassed, thus improve performance.
753 //
754 SenseCounts = 0;
755 NeedReadCapacity = TRUE;
756
757 Status = PeiServicesAllocatePages (
759 1,
761 );
762 if (EFI_ERROR (Status)) {
763 return Status;
764 }
765
766 SensePtr = PeiBotDev->SensePtr;
767 ZeroMem (SensePtr, EFI_PAGE_SIZE);
768
769 Status = PeiUsbRequestSense (
770 PeiServices,
771 PeiBotDev,
772 &SenseCounts,
773 (UINT8 *)SensePtr
774 );
775
776 if (Status == EFI_SUCCESS) {
777 //
778 // No Media
779 //
780 if (IsNoMedia (SensePtr, SenseCounts)) {
781 NeedReadCapacity = FALSE;
782 PeiBotDev->Media.MediaPresent = FALSE;
783 PeiBotDev->Media.LastBlock = 0;
784 PeiBotDev->Media2.MediaPresent = FALSE;
785 PeiBotDev->Media2.LastBlock = 0;
786 } else {
787 //
788 // Media Changed
789 //
790 if (IsMediaChange (SensePtr, SenseCounts)) {
791 PeiBotDev->Media.MediaPresent = TRUE;
792 PeiBotDev->Media2.MediaPresent = TRUE;
793 }
794
795 //
796 // Media Error
797 //
798 if (IsMediaError (SensePtr, SenseCounts)) {
799 //
800 // if media error encountered, make it look like no media present.
801 //
802 PeiBotDev->Media.MediaPresent = FALSE;
803 PeiBotDev->Media.LastBlock = 0;
804 PeiBotDev->Media2.MediaPresent = FALSE;
805 PeiBotDev->Media2.LastBlock = 0;
806 }
807 }
808 }
809
810 if (NeedReadCapacity) {
811 //
812 // Retry at most 4 times to detect media info
813 //
814 for (Retry = 0; Retry < 4; Retry++) {
815 switch (PeiBotDev->DeviceType) {
816 case USBCDROM:
817 Status = PeiUsbReadCapacity (
818 PeiServices,
819 PeiBotDev
820 );
821 break;
822
823 case USBFLOPPY2:
825 PeiServices,
826 PeiBotDev
827 );
828 if (EFI_ERROR (Status) ||
829 !PeiBotDev->Media.MediaPresent)
830 {
831 //
832 // retry the ReadCapacity command
833 //
834 PeiBotDev->DeviceType = USBFLOPPY;
835 Status = EFI_DEVICE_ERROR;
836 }
837
838 break;
839
840 case USBFLOPPY:
841 Status = PeiUsbReadCapacity (
842 PeiServices,
843 PeiBotDev
844 );
845 if (EFI_ERROR (Status)) {
846 //
847 // retry the ReadFormatCapacity command
848 //
849 PeiBotDev->DeviceType = USBFLOPPY2;
850 }
851
852 break;
853
854 default:
855 return EFI_INVALID_PARAMETER;
856 }
857
858 SenseCounts = 0;
859 ZeroMem (SensePtr, EFI_PAGE_SIZE);
860
861 if (Status == EFI_SUCCESS) {
862 break;
863 }
864
865 FloppyStatus = PeiUsbRequestSense (
866 PeiServices,
867 PeiBotDev,
868 &SenseCounts,
869 (UINT8 *)SensePtr
870 );
871
872 //
873 // If Request Sense data failed,retry.
874 //
875 if (EFI_ERROR (FloppyStatus)) {
876 continue;
877 }
878
879 //
880 // No Media
881 //
882 if (IsNoMedia (SensePtr, SenseCounts)) {
883 PeiBotDev->Media.MediaPresent = FALSE;
884 PeiBotDev->Media.LastBlock = 0;
885 PeiBotDev->Media2.MediaPresent = FALSE;
886 PeiBotDev->Media2.LastBlock = 0;
887 break;
888 }
889
890 if (IsMediaError (SensePtr, SenseCounts)) {
891 //
892 // if media error encountered, make it look like no media present.
893 //
894 PeiBotDev->Media.MediaPresent = FALSE;
895 PeiBotDev->Media.LastBlock = 0;
896 PeiBotDev->Media2.MediaPresent = FALSE;
897 PeiBotDev->Media2.LastBlock = 0;
898 break;
899 }
900 }
901
902 //
903 // ENDFOR
904 //
905 // tell whether the readcapacity process is successful or not
906 // ("Status" variable record the latest status returned
907 // by ReadCapacity )
908 //
909 if (Status != EFI_SUCCESS) {
910 return EFI_DEVICE_ERROR;
911 }
912 }
913
914 return EFI_SUCCESS;
915}
UINT64 UINTN
BOOLEAN IsNoMedia(IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts)
Definition: AtapiPeim.c:2280
BOOLEAN IsMediaError(IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts)
Definition: AtapiPeim.c:2355
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS PeiUsbReadCapacity(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:237
EFI_STATUS PeiUsbRequestSense(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice, OUT UINTN *SenseCounts, IN UINT8 *SenseKeyBuffer)
Definition: PeiAtapi.c:144
EFI_STATUS PeiUsbRead10(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice, IN VOID *Buffer, IN EFI_PEI_LBA Lba, IN UINTN NumberOfBlocks)
Definition: PeiAtapi.c:375
EFI_STATUS PeiUsbReadFormattedCapacity(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:298
EFI_STATUS PeiUsbTestUnitReady(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:96
EFI_STATUS PeiUsbInquiry(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:28
BOOLEAN IsMediaChange(IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts)
Definition: PeiAtapi.c:603
#define MSG_USB_DP
Definition: DevicePath.h:418
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
EFI_STATUS EFIAPI PeiServicesNotifyPpi(IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
EFI_STATUS EFIAPI PeiServicesAllocatePages(IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT EFI_PHYSICAL_ADDRESS *Memory)
EFI_STATUS EFIAPI PeiServicesInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
EFI_STATUS EFIAPI PeiServicesRegisterForShadow(IN EFI_PEI_FILE_HANDLE FileHandle)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
@ UsbMassStorage
The recovery device is a USB Mass Storage device.
Definition: BlockIo.h:50
UINT64 EFI_PEI_LBA
Definition: BlockIo.h:41
VOID * EFI_PEI_FILE_HANDLE
Definition: PiPeiCis.h:26
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
@ EfiBootServicesCode
@ AllocateAddress
Definition: UefiSpec.h:42
EFI_STATUS EFIAPI BotGetMediaInfo2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, IN UINTN DeviceIndex, OUT EFI_PEI_BLOCK_IO2_MEDIA *MediaInfo)
Definition: UsbBotPeim.c:625
EFI_STATUS EFIAPI BotReadBlocks2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, IN UINTN DeviceIndex, IN EFI_PEI_LBA StartLBA, IN UINTN BufferSize, OUT VOID *Buffer)
Definition: UsbBotPeim.c:693
EFI_STATUS PeiBotDetectMedia(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDev)
Definition: UsbBotPeim.c:736
EFI_STATUS EFIAPI NotifyOnUsbIoPpi(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, IN VOID *InvokePpi)
Definition: UsbBotPeim.c:129
EFI_STATUS EFIAPI PeimInitializeUsbBot(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
Definition: UsbBotPeim.c:76
EFI_STATUS EFIAPI BotGetNumberOfBlockDevices(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, OUT UINTN *NumberBlockDevices)
Definition: UsbBotPeim.c:306
EFI_STATUS EFIAPI BotGetMediaInfo(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, IN UINTN DeviceIndex, OUT EFI_PEI_BLOCK_IO_MEDIA *MediaInfo)
Definition: UsbBotPeim.c:348
EFI_STATUS EFIAPI BotGetNumberOfBlockDevices2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, OUT UINTN *NumberBlockDevices)
Definition: UsbBotPeim.c:583
EFI_STATUS InitUsbBot(IN EFI_PEI_SERVICES **PeiServices, IN PEI_USB_IO_PPI *UsbIoPpi)
Definition: UsbBotPeim.c:156
EFI_STATUS EFIAPI BotReadBlocks(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, IN UINTN DeviceIndex, IN EFI_PEI_LBA StartLBA, IN UINTN BufferSize, OUT VOID *Buffer)
Definition: UsbBotPeim.c:422
EFI_PEI_LBA LastBlock
Definition: BlockIo2.h:64
EFI_PEI_BLOCK_DEVICE_TYPE DeviceType
Definition: BlockIo.h:71
BOOLEAN MediaPresent
Definition: BlockIo.h:76