44 if ((Attributes == EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG) ||
45 (Attributes == EFI_USB_HC_RESET_HOST_WITH_DEBUG))
47 return EFI_UNSUPPORTED;
50 Uhc = UHC_FROM_USB2_HC_PROTO (This);
52 if (Uhc->DevicePath !=
NULL) {
58 (EFI_IO_BUS_USB | EFI_IOB_PC_RESET),
63 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
66 case EFI_USB_HC_RESET_GLOBAL:
73 gBS->Stall (UHC_ROOT_PORT_RESET_STALL);
80 gBS->Stall (UHC_ROOT_PORT_RECOVERY_STALL);
83 case EFI_USB_HC_RESET_HOST_CONTROLLER:
90 gBS->Stall (UHC_ROOT_PORT_RECOVERY_STALL);
94 goto ON_INVAILD_PARAMETER;
105 gBS->RestoreTPL (OldTpl);
111 gBS->RestoreTPL (OldTpl);
113 return EFI_INVALID_PARAMETER;
139 return EFI_INVALID_PARAMETER;
142 Uhc = UHC_FROM_USB2_HC_PROTO (This);
147 if ((UsbCmd & USBCMD_EGSM) != 0 ) {
149 }
else if ((UsbSts & USBSTS_HCH) != 0) {
183 Uhc = UHC_FROM_USB2_HC_PROTO (This);
186 if (EFI_ERROR (Status)) {
187 return EFI_DEVICE_ERROR;
190 if (CurState == State) {
195 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
199 Status =
UhciStopHc (Uhc, UHC_GENERIC_TIMEOUT);
210 UsbCmd |= USBCMD_RS | USBCMD_MAXP;
216 if ((UsbCmd & USBCMD_FGR) == 0) {
217 UsbCmd |= USBCMD_FGR;
224 gBS->Stall (UHC_FORCE_GLOBAL_RESUME_STALL);
229 UsbCmd &= ~USBCMD_FGR;
230 UsbCmd &= ~USBCMD_EGSM;
240 if (EFI_ERROR (Status)) {
241 Status = EFI_DEVICE_ERROR;
249 UsbCmd |= USBCMD_EGSM;
254 Status = EFI_INVALID_PARAMETER;
259 gBS->RestoreTPL (OldTpl);
283 OUT UINT8 *PortNumber,
284 OUT UINT8 *Is64BitCapable
292 Uhc = UHC_FROM_USB2_HC_PROTO (This);
294 if ((
NULL == MaxSpeed) || (
NULL == PortNumber) || (
NULL == Is64BitCapable)) {
295 return EFI_INVALID_PARAMETER;
298 *MaxSpeed = EFI_USB_SPEED_FULL;
299 *Is64BitCapable = (UINT8)
FALSE;
303 for (Index = 0; Index < USB_MAX_ROOTHUB_PORT; Index++) {
304 Offset = USBPORTSC_OFFSET + Index * 2;
313 if (((PortSC & 0x80) == 0) || (PortSC == 0xFFFF)) {
320 Uhc->RootPorts = *PortNumber;
322 DEBUG ((DEBUG_INFO,
"Uhci2GetCapability: %d ports\n", (UINT32)Uhc->RootPorts));
351 Uhc = UHC_FROM_USB2_HC_PROTO (This);
353 if (PortStatus ==
NULL) {
354 return EFI_INVALID_PARAMETER;
357 if (PortNumber >= Uhc->RootPorts) {
358 return EFI_INVALID_PARAMETER;
361 Offset = USBPORTSC_OFFSET + PortNumber * 2;
362 PortStatus->PortStatus = 0;
363 PortStatus->PortChangeStatus = 0;
367 if ((PortSC & USBPORTSC_CCS) != 0) {
371 if ((PortSC & USBPORTSC_PED) != 0) {
372 PortStatus->PortStatus |= USB_PORT_STAT_ENABLE;
375 if ((PortSC & USBPORTSC_SUSP) != 0) {
376 DEBUG ((DEBUG_INFO,
"Uhci2GetRootHubPortStatus: port %d is suspended\n", PortNumber));
377 PortStatus->PortStatus |= USB_PORT_STAT_SUSPEND;
380 if ((PortSC & USBPORTSC_PR) != 0) {
381 PortStatus->PortStatus |= USB_PORT_STAT_RESET;
384 if ((PortSC & USBPORTSC_LSDA) != 0) {
385 PortStatus->PortStatus |= USB_PORT_STAT_LOW_SPEED;
391 PortStatus->PortStatus |= USB_PORT_STAT_OWNER;
393 if ((PortSC & USBPORTSC_CSC) != 0) {
397 if ((PortSC & USBPORTSC_PEDC) != 0) {
398 PortStatus->PortChangeStatus |= USB_PORT_STAT_C_ENABLE;
432 Uhc = UHC_FROM_USB2_HC_PROTO (This);
434 if (PortNumber >= Uhc->RootPorts) {
435 return EFI_INVALID_PARAMETER;
438 Offset = USBPORTSC_OFFSET + PortNumber * 2;
440 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
443 switch (PortFeature) {
444 case EfiUsbPortSuspend:
446 if ((Command & USBCMD_EGSM) == 0) {
451 PortSC |= USBPORTSC_SUSP;
456 case EfiUsbPortReset:
458 PortSC |= USBPORTSC_PR;
461 case EfiUsbPortPower:
467 case EfiUsbPortEnable:
469 PortSC |= USBPORTSC_PED;
473 gBS->RestoreTPL (OldTpl);
474 return EFI_INVALID_PARAMETER;
478 gBS->RestoreTPL (OldTpl);
510 Uhc = UHC_FROM_USB2_HC_PROTO (This);
512 if (PortNumber >= Uhc->RootPorts) {
513 return EFI_INVALID_PARAMETER;
516 Offset = USBPORTSC_OFFSET + PortNumber * 2;
518 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
521 switch (PortFeature) {
522 case EfiUsbPortEnable:
524 PortSC &= ~USBPORTSC_PED;
527 case EfiUsbPortSuspend:
532 PortSC &= ~USBPORTSC_SUSP;
535 case EfiUsbPortPower:
541 case EfiUsbPortReset:
543 PortSC &= ~USBPORTSC_PR;
546 case EfiUsbPortConnectChange:
548 PortSC |= USBPORTSC_CSC;
551 case EfiUsbPortEnableChange:
553 PortSC |= USBPORTSC_PEDC;
556 case EfiUsbPortSuspendChange:
562 case EfiUsbPortOverCurrentChange:
568 case EfiUsbPortResetChange:
575 gBS->RestoreTPL (OldTpl);
576 return EFI_INVALID_PARAMETER;
580 gBS->RestoreTPL (OldTpl);
611 IN UINT8 DeviceAddress,
612 IN UINT8 DeviceSpeed,
620 OUT UINT32 *TransferResult
633 BOOLEAN IsSlowDevice;
634 UINTN TransferDataLength;
636 Uhc = UHC_FROM_USB2_HC_PROTO (This);
643 IsSlowDevice = (BOOLEAN)((EFI_USB_SPEED_LOW == DeviceSpeed) ?
TRUE :
FALSE);
648 if ((Request ==
NULL) || (TransferResult ==
NULL)) {
649 return EFI_INVALID_PARAMETER;
652 if (IsSlowDevice && (MaximumPacketLength != 8)) {
653 return EFI_INVALID_PARAMETER;
656 if ((MaximumPacketLength != 8) && (MaximumPacketLength != 16) &&
657 (MaximumPacketLength != 32) && (MaximumPacketLength != 64))
659 return EFI_INVALID_PARAMETER;
662 if ((TransferDirection != EfiUsbNoData) && ((Data ==
NULL) || (DataLength ==
NULL))) {
663 return EFI_INVALID_PARAMETER;
666 if (TransferDirection == EfiUsbNoData) {
667 TransferDataLength = 0;
669 TransferDataLength = *DataLength;
672 *TransferResult = EFI_USB_ERR_SYSTEM;
673 Status = EFI_DEVICE_ERROR;
682 return EFI_DEVICE_ERROR;
685 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
693 if (EFI_ERROR (Status)) {
697 Status =
UhciMapUserData (Uhc, TransferDirection, Data, DataLength, &PktId, &DataPhy, &DataMap);
699 if (EFI_ERROR (Status)) {
700 Uhc->PciIo->Unmap (Uhc->PciIo, RequestMap);
713 (UINT8)MaximumPacketLength,
718 Status = EFI_OUT_OF_RESOURCES;
731 Uhc->PciIo->Flush (Uhc->PciIo);
733 if (!EFI_ERROR (Status)) {
734 *TransferResult = QhResult.Result;
736 if (DataLength !=
NULL) {
737 *DataLength = QhResult.Complete;
744 Uhc->PciIo->Unmap (Uhc->PciIo, DataMap);
745 Uhc->PciIo->Unmap (Uhc->PciIo, RequestMap);
748 gBS->RestoreTPL (OldTpl);
780 IN UINT8 DeviceAddress,
781 IN UINT8 EndPointAddress,
782 IN UINT8 DeviceSpeed,
784 IN UINT8 DataBuffersNumber,
785 IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
787 IN OUT UINT8 *DataToggle,
790 OUT UINT32 *TransferResult
804 Uhc = UHC_FROM_USB2_HC_PROTO (This);
808 if (DeviceSpeed == EFI_USB_SPEED_LOW) {
809 return EFI_INVALID_PARAMETER;
812 if ((DataLength ==
NULL) || (*DataLength == 0) || (Data ==
NULL) || (TransferResult ==
NULL)) {
813 return EFI_INVALID_PARAMETER;
816 if ((*DataToggle != 1) && (*DataToggle != 0)) {
817 return EFI_INVALID_PARAMETER;
820 if ((MaximumPacketLength != 8) && (MaximumPacketLength != 16) &&
821 (MaximumPacketLength != 32) && (MaximumPacketLength != 64))
823 return EFI_INVALID_PARAMETER;
826 *TransferResult = EFI_USB_ERR_SYSTEM;
827 Status = EFI_OUT_OF_RESOURCES;
836 return EFI_DEVICE_ERROR;
839 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
845 if ((EndPointAddress & 0x80) != 0) {
846 Direction = EfiUsbDataIn;
848 Direction = EfiUsbDataOut;
851 Status =
UhciMapUserData (Uhc, Direction, *Data, DataLength, &PktId, &DataPhy, &DataMap);
853 if (EFI_ERROR (Status)) {
857 Status = EFI_OUT_OF_RESOURCES;
867 (UINT8)MaximumPacketLength,
872 Uhc->PciIo->Unmap (Uhc->PciIo, DataMap);
881 BulkQh = Uhc->BulkQh;
887 Uhc->PciIo->Flush (Uhc->PciIo);
889 if (!EFI_ERROR (Status)) {
890 *TransferResult = QhResult.Result;
891 *DataToggle = QhResult.NextToggle;
892 *DataLength = QhResult.Complete;
896 Uhc->PciIo->Unmap (Uhc->PciIo, DataMap);
899 gBS->RestoreTPL (OldTpl);
931 IN UINT8 DeviceAddress,
932 IN UINT8 EndPointAddress,
933 IN UINT8 DeviceSpeed,
935 IN BOOLEAN IsNewTransfer,
936 IN OUT UINT8 *DataToggle,
945 BOOLEAN IsSlowDevice;
954 Uhc = UHC_FROM_USB2_HC_PROTO (This);
960 IsSlowDevice = (BOOLEAN)((EFI_USB_SPEED_LOW == DeviceSpeed) ?
TRUE :
FALSE);
962 if ((EndPointAddress & 0x80) == 0) {
963 return EFI_INVALID_PARAMETER;
969 if (!IsNewTransfer) {
970 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
973 gBS->RestoreTPL (OldTpl);
977 if ((PollingInterval < 1) || (PollingInterval > 255)) {
978 return EFI_INVALID_PARAMETER;
981 if (DataLength == 0) {
982 return EFI_INVALID_PARAMETER;
985 if ((*DataToggle != 1) && (*DataToggle != 0)) {
986 return EFI_INVALID_PARAMETER;
996 return EFI_DEVICE_ERROR;
999 if ((EndPointAddress & 0x80) == 0) {
1000 PktId = OUTPUT_PACKET_ID;
1002 PktId = INPUT_PACKET_ID;
1010 if (DataPtr ==
NULL) {
1011 return EFI_OUT_OF_RESOURCES;
1016 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
1021 Status = EFI_OUT_OF_RESOURCES;
1034 (UINT8)MaximumPacketLength,
1038 if (IntTds ==
NULL) {
1039 Status = EFI_OUT_OF_RESOURCES;
1063 if (EFI_ERROR (Status)) {
1069 gBS->RestoreTPL (OldTpl);
1077 Uhc->PciIo->Flush (Uhc->PciIo);
1079 gBS->RestoreTPL (OldTpl);
1112 IN UINT8 DeviceAddress,
1113 IN UINT8 EndPointAddress,
1114 IN UINT8 DeviceSpeed,
1118 IN OUT UINT8 *DataToggle,
1121 OUT UINT32 *TransferResult
1132 BOOLEAN IsSlowDevice;
1134 Uhc = UHC_FROM_USB2_HC_PROTO (This);
1139 if (DeviceSpeed == EFI_USB_SPEED_HIGH) {
1140 return EFI_INVALID_PARAMETER;
1143 IsSlowDevice = (BOOLEAN)((EFI_USB_SPEED_LOW == DeviceSpeed) ?
TRUE :
FALSE);
1145 if ((DataLength ==
NULL) || (Data ==
NULL) || (TransferResult ==
NULL)) {
1146 return EFI_INVALID_PARAMETER;
1149 if ((*DataToggle != 1) && (*DataToggle != 0)) {
1150 return EFI_INVALID_PARAMETER;
1153 if ((*DataLength == 0) || (MaximumPacketLength > 64)) {
1154 return EFI_INVALID_PARAMETER;
1157 if (IsSlowDevice && (MaximumPacketLength > 8)) {
1158 return EFI_INVALID_PARAMETER;
1161 *TransferResult = EFI_USB_ERR_SYSTEM;
1162 Status = EFI_DEVICE_ERROR;
1170 OldTpl =
gBS->RaiseTPL (UHCI_TPL);
1186 if (EFI_ERROR (Status)) {
1199 (UINT8)MaximumPacketLength,
1204 Uhc->PciIo->Unmap (Uhc->PciIo, DataMap);
1206 Status = EFI_OUT_OF_RESOURCES;
1212 Status =
UhciExecuteTransfer (Uhc, Uhc->SyncIntQh, TDs, TimeOut, IsSlowDevice, &QhResult);
1215 Uhc->PciIo->Flush (Uhc->PciIo);
1217 if (!EFI_ERROR (Status)) {
1218 *TransferResult = QhResult.Result;
1219 *DataToggle = QhResult.NextToggle;
1220 *DataLength = QhResult.Complete;
1224 Uhc->PciIo->Unmap (Uhc->PciIo, DataMap);
1227 gBS->RestoreTPL (OldTpl);
1253 IN UINT8 DeviceAddress,
1254 IN UINT8 EndPointAddress,
1255 IN UINT8 DeviceSpeed,
1257 IN UINT8 DataBuffersNumber,
1258 IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
1261 OUT UINT32 *TransferResult
1264 return EFI_UNSUPPORTED;
1290 IN UINT8 DeviceAddress,
1291 IN UINT8 EndPointAddress,
1292 IN UINT8 DeviceSpeed,
1294 IN UINT8 DataBuffersNumber,
1295 IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
1302 return EFI_UNSUPPORTED;
1325 &gUhciDriverBinding,
1327 &gUhciComponentName,
1328 &gUhciComponentName2
1360 OpenStatus =
gBS->OpenProtocol (
1362 &gEfiPciIoProtocolGuid,
1364 This->DriverBindingHandle,
1366 EFI_OPEN_PROTOCOL_BY_DRIVER
1369 if (EFI_ERROR (OpenStatus)) {
1373 Status = PciIo->Pci.
Read (
1376 PCI_CLASSCODE_OFFSET,
1381 if (EFI_ERROR (Status)) {
1382 Status = EFI_UNSUPPORTED;
1389 if ((UsbClassCReg.BaseCode != PCI_CLASS_SERIAL) ||
1390 (UsbClassCReg.SubClassCode != PCI_CLASS_SERIAL_USB) ||
1391 (UsbClassCReg.ProgInterface != PCI_IF_UHCI)
1394 Status = EFI_UNSUPPORTED;
1398 gBS->CloseProtocol (
1400 &gEfiPciIoProtocolGuid,
1401 This->DriverBindingHandle,
1422 IN UINT64 OriginalPciAttributes
1438 Uhc->Signature = USB_HC_DEV_SIGNATURE;
1456 Uhc->DevicePath = DevicePath;
1457 Uhc->OriginalPciAttributes = OriginalPciAttributes;
1460 if (Uhc->MemPool ==
NULL) {
1461 Status = EFI_OUT_OF_RESOURCES;
1467 Status =
gBS->CreateEvent (
1468 EVT_TIMER | EVT_NOTIFY_SIGNAL,
1472 &Uhc->AsyncIntMonitor
1475 if (EFI_ERROR (Status)) {
1498 if (Uhc->AsyncIntMonitor !=
NULL) {
1499 gBS->CloseEvent (Uhc->AsyncIntMonitor);
1502 if (Uhc->ExitBootServiceEvent !=
NULL) {
1503 gBS->CloseEvent (Uhc->ExitBootServiceEvent);
1506 if (Uhc->MemPool !=
NULL) {
1510 if (Uhc->CtrlNameTable !=
NULL) {
1536 Uhc = UHC_FROM_USB2_HC_PROTO (This);
1538 Status =
gBS->UninstallProtocolInterface (
1540 &gEfiUsb2HcProtocolGuid,
1543 if (EFI_ERROR (Status)) {
1554 Uhc->PciIo->Attributes (
1557 Uhc->OriginalPciAttributes,
1591 gBS->Stall (UHC_ROOT_PORT_RECOVERY_STALL);
1619 UINT64 OriginalPciAttributes;
1620 BOOLEAN PciAttributesSaved;
1627 Status =
gBS->OpenProtocol (
1629 &gEfiPciIoProtocolGuid,
1631 This->DriverBindingHandle,
1633 EFI_OPEN_PROTOCOL_BY_DRIVER
1636 if (EFI_ERROR (Status)) {
1643 HcDevicePath =
NULL;
1644 Status =
gBS->OpenProtocol (
1646 &gEfiDevicePathProtocolGuid,
1647 (VOID **)&HcDevicePath,
1648 This->DriverBindingHandle,
1650 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1653 PciAttributesSaved =
FALSE;
1657 Status = PciIo->Attributes (
1661 &OriginalPciAttributes
1664 if (EFI_ERROR (Status)) {
1668 PciAttributesSaved =
TRUE;
1678 Status = PciIo->Attributes (
1684 if (!EFI_ERROR (Status)) {
1685 Supports &= (UINT64)EFI_PCI_DEVICE_ENABLE;
1686 Status = PciIo->Attributes (
1694 if (EFI_ERROR (Status)) {
1701 Status = EFI_OUT_OF_RESOURCES;
1710 if (EFI_ERROR (Status)) {
1711 Status = EFI_OUT_OF_RESOURCES;
1715 Status =
gBS->SetTimer (
1716 Uhc->AsyncIntMonitor,
1718 UHC_ASYNC_POLL_INTERVAL
1721 if (EFI_ERROR (Status)) {
1728 Status =
gBS->InstallMultipleProtocolInterfaces (
1730 &gEfiUsb2HcProtocolGuid,
1735 if (EFI_ERROR (Status)) {
1742 Status =
gBS->CreateEventEx (
1747 &gEfiEventExitBootServicesGuid,
1748 &Uhc->ExitBootServiceEvent
1750 if (EFI_ERROR (Status)) {
1751 goto UNINSTALL_USBHC;
1757 Uhc->CtrlNameTable =
NULL;
1762 &Uhc->CtrlNameTable,
1763 L
"Usb Universal Host Controller",
1769 &Uhc->CtrlNameTable,
1770 L
"Usb Universal Host Controller",
1777 UhciWriteReg (Uhc->PciIo, USBCMD_OFFSET, USBCMD_RS | USBCMD_MAXP);
1782 gBS->UninstallMultipleProtocolInterfaces (
1784 &gEfiUsb2HcProtocolGuid,
1793 if (PciAttributesSaved) {
1800 OriginalPciAttributes,
1805 gBS->CloseProtocol (
1807 &gEfiPciIoProtocolGuid,
1808 This->DriverBindingHandle,
1840 Status =
gBS->OpenProtocol (
1842 &gEfiUsb2HcProtocolGuid,
1844 This->DriverBindingHandle,
1846 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1854 if (EFI_ERROR (Status)) {
1860 gBS->CloseProtocol (
1862 &gEfiPciIoProtocolGuid,
1863 This->DriverBindingHandle,
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
EFI_PHYSICAL_ADDRESS UsbHcGetPciAddressForHostMem(IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size)
EFI_STATUS UsbHcFreeMemPool(IN USBHC_MEM_POOL *Pool)
VOID UsbHcFreeMem(IN USBHC_MEM_POOL *Pool, IN VOID *Mem, IN UINTN Size)
VOID * UsbHcAllocateMem(IN USBHC_MEM_POOL *Pool, IN UINTN Size)
USBHC_MEM_POOL * UsbHcInitMemPool(IN EFI_PCI_IO_PROTOCOL *PciIo, IN BOOLEAN Check4G, IN UINT32 Which4G)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define DEBUG(Expression)
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter)
@ EfiPciIoAttributeOperationGet
@ EfiPciIoAttributeOperationEnable
@ EfiPciIoAttributeOperationSet
@ EfiPciIoAttributeOperationSupported
#define USB_PORT_STAT_C_CONNECTION
@ EfiUsbHcStateOperational
#define USB_PORT_STAT_CONNECTION
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
#define FeaturePcdGet(TokenName)
#define EFI_PROGRESS_CODE
EFI_STATUS EFIAPI AddUnicodeString2(IN CONST CHAR8 *Language, IN CONST CHAR8 *SupportedLanguages, IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, IN CONST CHAR16 *UnicodeString, IN BOOLEAN Iso639Language)
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_STATUS EFIAPI FreeUnicodeStringTable(IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable)
EFI_STATUS EFIAPI Uhci2BulkTransfer(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
EFI_STATUS EFIAPI UhciDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI Uhci2AsyncIsochronousTransfer(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack, IN VOID *Context)
EFI_STATUS EFIAPI Uhci2ClearRootHubPortFeature(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature)
VOID UhciFreeDev(IN USB_HC_DEV *Uhc)
EFI_STATUS EFIAPI Uhci2AsyncInterruptTransfer(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN BOOLEAN IsNewTransfer, IN OUT UINT8 *DataToggle, IN UINTN PollingInterval, IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction, IN VOID *Context)
EFI_STATUS EFIAPI UhciDriverEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI Uhci2SyncInterruptTransfer(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
EFI_STATUS EFIAPI Uhci2SetState(IN EFI_USB2_HC_PROTOCOL *This, IN EFI_USB_HC_STATE State)
EFI_STATUS EFIAPI UhciDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI UhciDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI Uhci2Reset(IN EFI_USB2_HC_PROTOCOL *This, IN UINT16 Attributes)
USB_HC_DEV * UhciAllocateDev(IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINT64 OriginalPciAttributes)
EFI_STATUS EFIAPI Uhci2SetRootHubPortFeature(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature)
VOID EFIAPI UhcExitBootService(EFI_EVENT Event, VOID *Context)
EFI_STATUS EFIAPI Uhci2GetRootHubPortStatus(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, OUT EFI_USB_PORT_STATUS *PortStatus)
VOID UhciCleanDevUp(IN EFI_HANDLE Controller, IN EFI_USB2_HC_PROTOCOL *This)
EFI_STATUS EFIAPI Uhci2IsochronousTransfer(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
EFI_STATUS EFIAPI Uhci2GetCapability(IN EFI_USB2_HC_PROTOCOL *This, OUT UINT8 *MaxSpeed, OUT UINT8 *PortNumber, OUT UINT8 *Is64BitCapable)
EFI_STATUS EFIAPI Uhci2GetState(IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State)
EFI_STATUS EFIAPI Uhci2ControlTransfer(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN EFI_USB_DEVICE_REQUEST *Request, IN EFI_USB_DATA_DIRECTION TransferDirection, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
VOID UhciDestoryTds(IN USB_HC_DEV *Uhc, IN UHCI_TD_SW *FirstTd)
EFI_STATUS UhciMapUserRequest(IN USB_HC_DEV *Uhc, IN OUT VOID *Request, OUT UINT8 **MappedAddr, OUT VOID **Map)
VOID UhciLinkTdToQh(IN USB_HC_DEV *Uhc, IN UHCI_QH_SW *Qh, IN UHCI_TD_SW *Td)
UHCI_QH_SW * UhciCreateQh(IN USB_HC_DEV *Uhc, IN UINTN Interval)
EFI_STATUS UhciMapUserData(IN USB_HC_DEV *Uhc, IN EFI_USB_DATA_DIRECTION Direction, IN VOID *Data, IN OUT UINTN *Len, OUT UINT8 *PktId, OUT UINT8 **MappedAddr, OUT VOID **Map)
UHCI_TD_SW * UhciCreateBulkOrIntTds(IN USB_HC_DEV *Uhc, IN UINT8 DevAddr, IN UINT8 EndPoint, IN UINT8 PktId, IN UINT8 *Data, IN UINT8 *DataPhy, IN UINTN DataLen, IN OUT UINT8 *DataToggle, IN UINT8 MaxPacket, IN BOOLEAN IsLow)
UHCI_TD_SW * UhciCreateCtrlTds(IN USB_HC_DEV *Uhc, IN UINT8 DeviceAddr, IN UINT8 DataPktId, IN UINT8 *Request, IN UINT8 *RequestPhy, IN UINT8 *Data, IN UINT8 *DataPhy, IN UINTN DataLen, IN UINT8 MaxPacket, IN BOOLEAN IsLow)
VOID UhciUnlinkTdFromQh(IN UHCI_QH_SW *Qh, IN UHCI_TD_SW *Td)
BOOLEAN UhciIsHcWorking(IN EFI_PCI_IO_PROTOCOL *PciIo)
EFI_STATUS UhciStopHc(IN USB_HC_DEV *Uhc, IN UINTN Timeout)
VOID UhciClearRegBit(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset, IN UINT16 Bit)
VOID UhciTurnOffUsbEmulation(IN EFI_PCI_IO_PROTOCOL *PciIo)
VOID UhciWriteReg(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset, IN UINT16 Data)
VOID UhciSetRegBit(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset, IN UINT16 Bit)
UINT16 UhciReadReg(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset)
VOID UhciAckAllInterrupt(IN USB_HC_DEV *Uhc)
EFI_STATUS UhciInitFrameList(IN USB_HC_DEV *Uhc)
EFI_STATUS UhciExecuteTransfer(IN USB_HC_DEV *Uhc, IN UHCI_QH_SW *Qh, IN UHCI_TD_SW *Td, IN UINTN TimeOut, IN BOOLEAN IsLow, OUT UHCI_QH_RESULT *QhResult)
VOID UhciFreeAllAsyncReq(IN USB_HC_DEV *Uhc)
VOID EFIAPI UhciMonitorAsyncReqList(IN EFI_EVENT Event, IN VOID *Context)
VOID UhciLinkQhToFrameList(USB_HC_DEV *Uhc, UHCI_QH_SW *Qh)
VOID UhciDestoryFrameList(IN USB_HC_DEV *Uhc)
EFI_STATUS UhciRemoveAsyncReq(IN USB_HC_DEV *Uhc, IN UINT8 DevAddr, IN UINT8 EndPoint, OUT UINT8 *Toggle)
EFI_STATUS UhciCreateAsyncReq(IN USB_HC_DEV *Uhc, IN UHCI_QH_SW *Qh, IN UHCI_TD_SW *FirstTd, IN UINT8 DevAddr, IN UINT8 EndPoint, IN UINTN DataLen, IN UINTN Interval, IN UINT8 *Data, IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback, IN VOID *Context, IN BOOLEAN IsLow)
CHAR8 * SupportedLanguages
CHAR8 * SupportedLanguages
EFI_PCI_IO_PROTOCOL_CONFIG Read