32EFI_GUID gIScsiV4PrivateGuid = ISCSI_V4_PRIVATE_GUID;
33EFI_GUID gIScsiV6PrivateGuid = ISCSI_V6_PRIVATE_GUID;
58 CurrentDevicePath = RemainingDevicePath;
59 if (CurrentDevicePath !=
NULL) {
68 return EFI_UNSUPPORTED;
94 UINTN InfoTypeBufferCount;
101 UINT8 NetworkBootPolicy;
107 AipHandleBuffer =
NULL;
108 Status =
gBS->LocateHandleBuffer (
110 &gEfiAdapterInformationProtocolGuid,
115 if (EFI_ERROR (Status) || (AipHandleCount == 0)) {
116 return EFI_NOT_FOUND;
119 ASSERT (AipHandleBuffer !=
NULL);
123 for (AipIndex = 0; AipIndex < AipHandleCount; AipIndex++) {
124 Status =
gBS->HandleProtocol (
125 AipHandleBuffer[AipIndex],
126 &gEfiAdapterInformationProtocolGuid,
130 ASSERT (Aip !=
NULL);
132 Status =
gBS->HandleProtocol (
133 AipHandleBuffer[AipIndex],
134 &gEfiExtScsiPassThruProtocolGuid,
135 (VOID *)&ExtScsiPassThru
137 if (EFI_ERROR (Status) || (ExtScsiPassThru ==
NULL)) {
141 InfoTypesBuffer =
NULL;
142 InfoTypeBufferCount = 0;
143 Status = Aip->GetSupportedTypes (Aip, &InfoTypesBuffer, &InfoTypeBufferCount);
144 if (EFI_ERROR (Status) || (InfoTypesBuffer ==
NULL)) {
152 for (TypeIndex = 0; TypeIndex < InfoTypeBufferCount; TypeIndex++) {
153 if (
CompareGuid (&InfoTypesBuffer[TypeIndex], &gEfiAdapterInfoNetworkBootGuid)) {
169 Status = Aip->GetInformation (Aip, &gEfiAdapterInfoNetworkBootGuid, &InfoBlock, &InfoBlockSize);
170 if (EFI_ERROR (Status) || (InfoBlock ==
NULL)) {
178 NetworkBootPolicy =
PcdGet8 (PcdIScsiAIPNetworkBootPolicy);
180 if (NetworkBootPolicy == STOP_UEFI_ISCSI_IF_HBA_INSTALL_AIP) {
185 if ((((NetworkBootPolicy & STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP4) != 0) &&
187 (((NetworkBootPolicy & STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP6) != 0) &&
189 (((NetworkBootPolicy & STOP_UEFI_ISCSI_IF_AIP_SUPPORT_OFFLOAD) != 0) &&
191 (((NetworkBootPolicy & STOP_UEFI_ISCSI_IF_AIP_SUPPORT_MPIO) != 0) &&
193 (((NetworkBootPolicy & STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP4) != 0) &&
195 (((NetworkBootPolicy & STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP6) != 0) &&
206 Status = EFI_NOT_FOUND;
209 if (InfoBlock !=
NULL) {
213 if (AipHandleBuffer !=
NULL) {
260 if (IpVersion == IP_VERSION_4) {
261 IScsiServiceBindingGuid = &gIScsiV4PrivateGuid;
262 TcpServiceBindingGuid = &gEfiTcp4ServiceBindingProtocolGuid;
263 DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid;
264 DnsServiceBindingGuid = &gEfiDns4ServiceBindingProtocolGuid;
266 IScsiServiceBindingGuid = &gIScsiV6PrivateGuid;
267 TcpServiceBindingGuid = &gEfiTcp6ServiceBindingProtocolGuid;
268 DhcpServiceBindingGuid = &gEfiDhcp6ServiceBindingProtocolGuid;
269 DnsServiceBindingGuid = &gEfiDns6ServiceBindingProtocolGuid;
272 Status =
gBS->OpenProtocol (
274 IScsiServiceBindingGuid,
276 This->DriverBindingHandle,
278 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
280 if (!EFI_ERROR (Status)) {
281 return EFI_ALREADY_STARTED;
284 Status =
gBS->OpenProtocol (
286 TcpServiceBindingGuid,
288 This->DriverBindingHandle,
290 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
292 if (EFI_ERROR (Status)) {
293 return EFI_UNSUPPORTED;
297 if (EFI_ERROR (Status)) {
298 return EFI_UNSUPPORTED;
302 Status =
gBS->OpenProtocol (
304 DhcpServiceBindingGuid,
306 This->DriverBindingHandle,
308 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
310 if (EFI_ERROR (Status)) {
311 return EFI_UNSUPPORTED;
316 Status =
gBS->OpenProtocol (
318 DnsServiceBindingGuid,
320 This->DriverBindingHandle,
322 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
324 if (EFI_ERROR (Status)) {
325 return EFI_UNSUPPORTED;
367 UINT8 *AttemptConfigOrder;
368 UINTN AttemptConfigOrderSize;
371 UINTN NumberOfHandles;
378 UINT8 NetworkBootPolicy;
385 if (IpVersion == IP_VERSION_4) {
386 IScsiPrivateGuid = &gIScsiV4PrivateGuid;
387 TcpServiceBindingGuid = &gEfiTcp4ServiceBindingProtocolGuid;
388 ProtocolGuid = &gEfiTcp4ProtocolGuid;
389 }
else if (IpVersion == IP_VERSION_6) {
390 IScsiPrivateGuid = &gIScsiV6PrivateGuid;
391 TcpServiceBindingGuid = &gEfiTcp6ServiceBindingProtocolGuid;
392 ProtocolGuid = &gEfiTcp6ProtocolGuid;
394 return EFI_INVALID_PARAMETER;
397 Status =
gBS->OpenProtocol (
403 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
405 if (!EFI_ERROR (Status)) {
406 return EFI_ALREADY_STARTED;
409 Status =
gBS->OpenProtocol (
411 TcpServiceBindingGuid,
415 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
417 if (EFI_ERROR (Status)) {
418 return EFI_UNSUPPORTED;
421 NetworkBootPolicy =
PcdGet8 (PcdIScsiAIPNetworkBootPolicy);
422 if (NetworkBootPolicy == ALWAYS_USE_ISCSI_HBA_AND_IGNORE_UEFI_ISCSI) {
426 if (NetworkBootPolicy != ALWAYS_USE_UEFI_ISCSI_AND_IGNORE_ISCSI_HBA) {
431 if (!EFI_ERROR (Status)) {
443 if (EFI_ERROR (Status)) {
451 if (Private ==
NULL) {
452 return EFI_OUT_OF_RESOURCES;
464 TcpServiceBindingGuid,
465 &Private->ChildHandle
468 if (EFI_ERROR (Status)) {
472 Status =
gBS->OpenProtocol (
473 Private->ChildHandle,
478 EFI_OPEN_PROTOCOL_BY_DRIVER
481 if (EFI_ERROR (Status)) {
489 Status =
gBS->InstallProtocolInterface (
493 &Private->IScsiIdentifier
495 if (EFI_ERROR (Status)) {
499 if (IpVersion == IP_VERSION_4) {
500 mPrivate->Ipv6Flag =
FALSE;
502 mPrivate->Ipv6Flag =
TRUE;
509 if (EFI_ERROR (Status)) {
519 Status = EFI_NOT_FOUND;
521 if (mPrivate->OneSessionEstablished && mPrivate->EnableMpio) {
522 AttemptConfigData =
NULL;
523 NET_LIST_FOR_EACH (Entry, &mPrivate->AttemptConfigs) {
525 if (AttemptConfigData->SessionConfigData.Enabled == ISCSI_ENABLED_FOR_MPIO) {
530 if (AttemptConfigData ==
NULL) {
534 if (AttemptConfigData->AttemptConfigIndex == mPrivate->BootSelectedIndex) {
545 Status =
gBS->LocateHandleBuffer (
547 &gEfiExtScsiPassThruProtocolGuid,
552 if (EFI_ERROR (Status)) {
559 ExistIScsiExtScsiPassThru =
NULL;
560 for (Index = 0; Index < NumberOfHandles && ExistIScsiExtScsiPassThru ==
NULL; Index++) {
561 Status =
gBS->HandleProtocol (
563 &gEfiDevicePathProtocolGuid,
566 if (EFI_ERROR (Status)) {
575 Status =
gBS->HandleProtocol (
577 &gEfiExtScsiPassThruProtocolGuid,
578 (VOID **)&ExistIScsiExtScsiPassThru
590 if (ExistIScsiExtScsiPassThru ==
NULL) {
591 Status = EFI_NOT_FOUND;
595 ExistPrivate = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (ExistIScsiExtScsiPassThru);
597 Status =
gBS->UninstallProtocolInterface (
598 ExistPrivate->ExtScsiPassThruHandle,
599 &gEfiExtScsiPassThruProtocolGuid,
600 &ExistPrivate->IScsiExtScsiPassThru
602 if (EFI_ERROR (Status)) {
610 Status =
gBS->InstallProtocolInterface (
611 &Private->ExtScsiPassThruHandle,
612 &gEfiExtScsiPassThruProtocolGuid,
614 &Private->IScsiExtScsiPassThru
616 if (EFI_ERROR (Status)) {
622 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &mPrivate->AttemptConfigs) {
628 if ((AttemptConfigData->NicIndex != mPrivate->CurrentNic) ||
629 (AttemptConfigData->SessionConfigData.Enabled == ISCSI_DISABLED) ||
630 AttemptConfigData->ValidPath)
639 if ((mPrivate->EnableMpio &&
640 (AttemptConfigData->SessionConfigData.Enabled != ISCSI_ENABLED_FOR_MPIO)) ||
641 (!mPrivate->EnableMpio &&
642 (AttemptConfigData->SessionConfigData.Enabled != ISCSI_ENABLED)))
650 if (AttemptConfigData->SessionConfigData.InitiatorInfoFromDhcp &&
651 !AttemptConfigData->DhcpSuccess)
653 if (!mPrivate->EnableMpio && (mPrivate->ValidSinglePathCount > 0)) {
654 mPrivate->ValidSinglePathCount--;
663 if ((AttemptConfigData->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG) &&
664 AttemptConfigData->AutoConfigureSuccess)
672 if (!mPrivate->Ipv6Flag) {
673 if (AttemptConfigData->SessionConfigData.IpMode == IP_MODE_IP6) {
677 if ((AttemptConfigData->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG) &&
678 (AttemptConfigData->AutoConfigureMode == IP_MODE_AUTOCONFIG_IP6))
683 if (AttemptConfigData->SessionConfigData.IpMode == IP_MODE_IP4) {
687 if ((AttemptConfigData->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG) &&
688 (AttemptConfigData->AutoConfigureMode == IP_MODE_AUTOCONFIG_IP4))
698 if (Session ==
NULL) {
699 Status = EFI_OUT_OF_RESOURCES;
703 Session->Private = Private;
704 Session->ConfigData = AttemptConfigData;
705 Session->AuthType = AttemptConfigData->AuthenticationType;
708 mPrivate->PortString,
709 (
UINTN)ISCSI_NAME_IFR_MAX_SIZE,
711 (
UINTN)AttemptConfigData->AttemptConfigIndex
714 if (Session->AuthType == ISCSI_AUTH_TYPE_CHAP) {
715 Session->AuthData.CHAP.AuthConfig = &AttemptConfigData->AuthConfigData.CHAP;
724 if (Status == EFI_MEDIA_CHANGED) {
730 }
else if (Status == EFI_NOT_READY) {
737 NvData = &AttemptConfigData->SessionConfigData;
738 if (NvData->RedirectFlag) {
739 NvData->TargetPort = NvData->OriginalTargetPort;
741 NvData->RedirectFlag =
FALSE;
744 mPrivate->PortString,
745 &gEfiIScsiInitiatorNameProtocolGuid,
746 ISCSI_CONFIG_VAR_ATTR,
752 if (EFI_ERROR (Status)) {
757 if (!mPrivate->EnableMpio && (mPrivate->ValidSinglePathCount > 0)) {
758 mPrivate->ValidSinglePathCount--;
763 AttemptConfigData->ValidPath =
TRUE;
769 if (Session->AuthType == ISCSI_AUTH_TYPE_KRB) {
770 if (!mPrivate->EnableMpio && (mPrivate->ValidSinglePathCount > 0)) {
771 mPrivate->ValidSinglePathCount--;
774 AttemptConfigData->ValidiBFTPath =
FALSE;
776 AttemptConfigData->ValidiBFTPath =
TRUE;
782 if (AttemptConfigData->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG) {
783 AttemptConfigData->AutoConfigureSuccess =
TRUE;
787 mPrivate->PortString,
788 &gEfiIScsiInitiatorNameProtocolGuid,
789 ISCSI_CONFIG_VAR_ATTR,
797 if (Private->Session ==
NULL) {
798 Private->Session = Session;
799 BootSelected = AttemptConfigData->AttemptConfigIndex;
803 if (mPrivate->EnableMpio) {
816 if (Private->Session ==
NULL) {
817 Status =
gBS->UninstallProtocolInterface (
818 Private->ExtScsiPassThruHandle,
819 &gEfiExtScsiPassThruProtocolGuid,
820 &Private->IScsiExtScsiPassThru
823 Private->ExtScsiPassThruHandle =
NULL;
828 if (mPrivate->OneSessionEstablished && (ExistPrivate !=
NULL)) {
829 Status =
gBS->InstallProtocolInterface (
830 &ExistPrivate->ExtScsiPassThruHandle,
831 &gEfiExtScsiPassThruProtocolGuid,
833 &ExistPrivate->IScsiExtScsiPassThru
835 if (EFI_ERROR (Status)) {
842 Status = EFI_NOT_FOUND;
851 if ((Private->Session !=
NULL) && mPrivate->OneSessionEstablished) {
855 &AttemptConfigOrderSize
857 if (AttemptConfigOrder ==
NULL) {
861 for (Index = 0; Index < AttemptConfigOrderSize /
sizeof (UINT8); Index++) {
862 if ((AttemptConfigOrder[Index] == mPrivate->BootSelectedIndex) ||
863 (AttemptConfigOrder[Index] == BootSelected))
869 if (mPrivate->EnableMpio) {
873 if (AttemptConfigOrder[Index] == mPrivate->BootSelectedIndex) {
876 Private->Session =
NULL;
877 gBS->UninstallProtocolInterface (
878 Private->ExtScsiPassThruHandle,
879 &gEfiExtScsiPassThruProtocolGuid,
880 &Private->IScsiExtScsiPassThru
882 Private->ExtScsiPassThruHandle =
NULL;
887 Status =
gBS->InstallProtocolInterface (
888 &ExistPrivate->ExtScsiPassThruHandle,
889 &gEfiExtScsiPassThruProtocolGuid,
891 &ExistPrivate->IScsiExtScsiPassThru
893 if (EFI_ERROR (Status)) {
899 if (AttemptConfigOrder[Index] != BootSelected) {
903 mPrivate->BootSelectedIndex = BootSelected;
907 gBS->UninstallProtocolInterface (
908 ExistPrivate->Controller,
910 &ExistPrivate->IScsiIdentifier
914 if (ExistPrivate->Session !=
NULL) {
918 if (ExistPrivate->DevicePath !=
NULL) {
919 Status =
gBS->UninstallProtocolInterface (
920 ExistPrivate->ExtScsiPassThruHandle,
921 &gEfiDevicePathProtocolGuid,
922 ExistPrivate->DevicePath
924 if (EFI_ERROR (Status)) {
928 FreePool (ExistPrivate->DevicePath);
931 gBS->CloseEvent (ExistPrivate->ExitBootServiceEvent);
938 if (AttemptConfigOrder[Index] == mPrivate->BootSelectedIndex) {
945 mPrivate->OneSessionEstablished =
TRUE;
946 mPrivate->BootSelectedIndex = BootSelected;
955 if (Private->DevicePath ==
NULL) {
956 Status = EFI_DEVICE_ERROR;
963 Status =
gBS->InstallProtocolInterface (
964 &Private->ExtScsiPassThruHandle,
965 &gEfiDevicePathProtocolGuid,
969 if (EFI_ERROR (Status)) {
976 Status =
gBS->OpenProtocol (
977 Private->ChildHandle,
981 Private->ExtScsiPassThruHandle,
982 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
984 if (EFI_ERROR (Status)) {
985 gBS->UninstallMultipleProtocolInterfaces (
986 Private->ExtScsiPassThruHandle,
987 &gEfiExtScsiPassThruProtocolGuid,
988 &Private->IScsiExtScsiPassThru,
989 &gEfiDevicePathProtocolGuid,
1002 if (mPrivate->BootSelectedIndex != 0) {
1010 if (Private->Session !=
NULL) {
1057 if (NumberOfChildren != 0) {
1061 Status =
gBS->OpenProtocol (
1062 ChildHandleBuffer[0],
1063 &gEfiExtScsiPassThruProtocolGuid,
1065 This->DriverBindingHandle,
1067 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1069 if (EFI_ERROR (Status)) {
1070 return EFI_DEVICE_ERROR;
1073 Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (PassThru);
1081 if (IpVersion == IP_VERSION_4) {
1082 ProtocolGuid = &gEfiTcp4ProtocolGuid;
1084 ProtocolGuid = &gEfiTcp6ProtocolGuid;
1087 gBS->CloseProtocol (
1088 Private->ChildHandle,
1091 Private->ExtScsiPassThruHandle
1094 gBS->CloseProtocol (
1098 Private->ExtScsiPassThruHandle
1107 if (IpVersion == IP_VERSION_4) {
1108 ProtocolGuid = &gIScsiV4PrivateGuid;
1109 TcpProtocolGuid = &gEfiTcp4ProtocolGuid;
1110 TcpServiceBindingGuid = &gEfiTcp4ServiceBindingProtocolGuid;
1112 ProtocolGuid = &gIScsiV6PrivateGuid;
1113 TcpProtocolGuid = &gEfiTcp6ProtocolGuid;
1114 TcpServiceBindingGuid = &gEfiTcp6ServiceBindingProtocolGuid;
1118 if (IScsiController ==
NULL) {
1122 Status =
gBS->OpenProtocol (
1125 (VOID **)&IScsiIdentifier,
1126 This->DriverBindingHandle,
1128 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1130 if (EFI_ERROR (Status)) {
1131 return EFI_DEVICE_ERROR;
1134 Private = ISCSI_DRIVER_DATA_FROM_IDENTIFIER (IScsiIdentifier);
1135 ASSERT (Private !=
NULL);
1137 if (Private->ChildHandle !=
NULL) {
1138 Status =
gBS->CloseProtocol (
1139 Private->ChildHandle,
1141 This->DriverBindingHandle,
1145 ASSERT (!EFI_ERROR (Status));
1149 This->DriverBindingHandle,
1150 TcpServiceBindingGuid,
1151 Private->ChildHandle
1154 ASSERT (!EFI_ERROR (Status));
1157 gBS->UninstallProtocolInterface (
1160 &Private->IScsiIdentifier
1173 if (Private->Session !=
NULL) {
1179 if (EFI_ERROR (Status)) {
1239 RemainingDevicePath,
1289 Status =
IScsiStart (This->DriverBindingHandle, ControllerHandle, IP_VERSION_4);
1290 if (Status == EFI_ALREADY_STARTED) {
1394 RemainingDevicePath,
1444 Status =
IScsiStart (This->DriverBindingHandle, ControllerHandle, IP_VERSION_6);
1445 if (Status == EFI_ALREADY_STARTED) {
1512 UINTN DeviceHandleCount;
1521 Status =
gBS->LocateHandleBuffer (
1528 if (EFI_ERROR (Status)) {
1535 for (Index = 0; Index < DeviceHandleCount; Index++) {
1537 DeviceHandleBuffer[Index],
1539 &gEfiTcp4ProtocolGuid
1542 if (EFI_ERROR (Status)) {
1546 Status =
gBS->DisconnectController (
1547 DeviceHandleBuffer[Index],
1551 if (EFI_ERROR (Status)) {
1559 for (Index = 0; Index < DeviceHandleCount; Index++) {
1561 DeviceHandleBuffer[Index],
1563 &gEfiTcp6ProtocolGuid
1565 if (EFI_ERROR (Status)) {
1569 Status =
gBS->DisconnectController (
1570 DeviceHandleBuffer[Index],
1574 if (EFI_ERROR (Status)) {
1583 if (EFI_ERROR (Status)) {
1590 Status =
gBS->UninstallMultipleProtocolInterfaces (
1592 &gEfiAuthenticationInfoProtocolGuid,
1593 &gIScsiAuthenticationInfo,
1596 if (EFI_ERROR (Status)) {
1600 if (gIScsiControllerNameTable !=
NULL) {
1602 if (EFI_ERROR (Status)) {
1606 gIScsiControllerNameTable =
NULL;
1613 Status =
gBS->HandleProtocol (
1615 &gEfiComponentNameProtocolGuid,
1616 (VOID **)&ComponentName
1618 if (!EFI_ERROR (Status)) {
1619 Status =
gBS->UninstallMultipleProtocolInterfaces (
1621 &gEfiComponentNameProtocolGuid,
1625 if (EFI_ERROR (Status)) {
1630 Status =
gBS->HandleProtocol (
1632 &gEfiComponentName2ProtocolGuid,
1633 (VOID **)&ComponentName2
1635 if (!EFI_ERROR (Status)) {
1636 gBS->UninstallMultipleProtocolInterfaces (
1638 &gEfiComponentName2ProtocolGuid,
1642 if (EFI_ERROR (Status)) {
1651 Status =
gBS->HandleProtocol (
1653 &gEfiComponentNameProtocolGuid,
1654 (VOID **)&ComponentName
1656 if (!EFI_ERROR (Status)) {
1657 Status =
gBS->UninstallMultipleProtocolInterfaces (
1659 &gEfiComponentNameProtocolGuid,
1663 if (EFI_ERROR (Status)) {
1668 Status =
gBS->HandleProtocol (
1670 &gEfiComponentName2ProtocolGuid,
1671 (VOID **)&ComponentName2
1673 if (!EFI_ERROR (Status)) {
1674 gBS->UninstallMultipleProtocolInterfaces (
1676 &gEfiComponentName2ProtocolGuid,
1680 if (EFI_ERROR (Status)) {
1688 Status =
gBS->UninstallMultipleProtocolInterfaces (
1690 &gEfiDriverBindingProtocolGuid,
1691 &gIScsiIp4DriverBinding,
1692 &gEfiIScsiInitiatorNameProtocolGuid,
1693 &gIScsiInitiatorName,
1696 if (EFI_ERROR (Status)) {
1700 Status =
gBS->UninstallMultipleProtocolInterfaces (
1702 &gEfiDriverBindingProtocolGuid,
1703 &gIScsiIp6DriverBinding,
1709 if (DeviceHandleBuffer !=
NULL) {
1746 Status =
gBS->LocateProtocol (
1747 &gEfiIScsiInitiatorNameProtocolGuid,
1749 (VOID **)&IScsiInitiatorName
1751 if (!EFI_ERROR (Status)) {
1752 return EFI_ACCESS_DENIED;
1761 &gIScsiIp4DriverBinding,
1763 &gIScsiComponentName,
1764 &gIScsiComponentName2
1766 if (EFI_ERROR (Status)) {
1773 &gIScsiIp6DriverBinding,
1775 &gIScsiComponentName,
1776 &gIScsiComponentName2
1778 if (EFI_ERROR (Status)) {
1785 Status =
gBS->InstallProtocolInterface (
1787 &gEfiIScsiInitiatorNameProtocolGuid,
1789 &gIScsiInitiatorName
1791 if (EFI_ERROR (Status)) {
1801 if (mPrivate ==
NULL) {
1802 Status = EFI_OUT_OF_RESOURCES;
1813 if (EFI_ERROR (Status)) {
1821 if (EFI_ERROR (Status)) {
1829 if (EFI_ERROR (Status)) {
1837 Status =
gBS->LocateProtocol (
1838 &gEfiAuthenticationInfoProtocolGuid,
1840 (VOID **)&AuthenticationInfo
1842 if (Status == EFI_NOT_FOUND) {
1843 Status =
gBS->InstallProtocolInterface (
1845 &gEfiAuthenticationInfoProtocolGuid,
1847 &gIScsiAuthenticationInfo
1849 if (EFI_ERROR (Status)) {
1863 if (mPrivate !=
NULL) {
1869 gBS->UninstallMultipleProtocolInterfaces (
1871 &gEfiIScsiInitiatorNameProtocolGuid,
1872 &gIScsiInitiatorName,
1878 &gIScsiIp6DriverBinding,
1879 &gIScsiComponentName,
1880 &gIScsiComponentName2
1885 &gIScsiIp4DriverBinding,
1886 &gIScsiComponentName,
1887 &gIScsiComponentName2
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
#define MESSAGING_DEVICE_PATH
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID IScsiCHAPInitHashList(VOID)
EFI_STATUS IScsiConfigFormUnload(IN EFI_HANDLE DriverBindingHandle)
EFI_STATUS IScsiConfigFormInit(IN EFI_HANDLE DriverBindingHandle)
EFI_STATUS EFIAPI IScsiSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, IN UINT8 IpVersion)
EFI_STATUS EFIAPI IScsiIp4DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
EFI_STATUS IScsiStart(IN EFI_HANDLE Image, IN EFI_HANDLE ControllerHandle, IN UINT8 IpVersion)
EFI_STATUS EFIAPI IScsiDriverEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI IScsiStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL, IN UINT8 IpVersion)
EFI_STATUS EFIAPI IScsiIp6DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
EFI_STATUS EFIAPI IScsiIp4DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
EFI_STATUS IScsiCheckAip(VOID)
EFI_STATUS EFIAPI IScsiIp6DriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
EFI_STATUS EFIAPI IScsiUnload(IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI IScsiIp6DriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
EFI_STATUS IScsiIsDevicePathSupported(IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
EFI_STATUS EFIAPI IScsiIp4DriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
VOID IScsiPublishIbft(IN VOID)
VOID * IScsiGetVariableAndSize(IN CHAR16 *Name, IN EFI_GUID *VendorGuid, OUT UINTN *VariableSize)
ISCSI_DRIVER_DATA * IScsiCreateDriverData(IN EFI_HANDLE Image, IN EFI_HANDLE Controller)
EFI_STATUS IScsiCreateKeywords(IN UINTN KeywordNum)
EFI_STATUS EFIAPI IScsiTestManagedDevice(IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE DriverBindingHandle, IN EFI_GUID *ProtocolGuid)
EFI_STATUS IScsiCleanDriverData(IN ISCSI_DRIVER_DATA *Private)
EFI_STATUS IScsiRemoveNic(IN EFI_HANDLE Controller)
VOID IScsiCleanAttemptVariable(IN VOID)
EFI_STATUS IScsiAddNic(IN EFI_HANDLE Controller, IN EFI_HANDLE Image)
EFI_STATUS IScsiCreateAttempts(IN UINTN AttemptNum)
EFI_DEVICE_PATH_PROTOCOL * IScsiGetTcpConnDevicePath(IN ISCSI_SESSION *Session)
EFI_STATUS IScsiGetConfigData(IN ISCSI_DRIVER_DATA *Private)
BOOLEAN IScsiDnsIsConfigured(IN EFI_HANDLE Controller)
BOOLEAN IScsiDhcpIsConfigured(IN EFI_HANDLE Controller, IN UINT8 IpVersion)
VOID IScsiSessionAbort(IN OUT ISCSI_SESSION *Session)
EFI_STATUS IScsiSessionLogin(IN ISCSI_SESSION *Session)
EFI_STATUS IScsiSessionReLogin(IN ISCSI_SESSION *Session)
VOID IScsiSessionInit(IN OUT ISCSI_SESSION *Session, IN BOOLEAN Recovery)
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
EFI_RUNTIME_SERVICES * gRT
#define ASSERT_EFI_ERROR(StatusParameter)
EFI_STATUS EFIAPI NetLibCreateServiceChild(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN EFI_GUID *ServiceBindingGuid, IN OUT EFI_HANDLE *ChildHandle)
EFI_STATUS EFIAPI NetLibDestroyServiceChild(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN EFI_GUID *ServiceBindingGuid, IN EFI_HANDLE ChildHandle)
EFI_HANDLE EFIAPI NetLibGetNicHandle(IN EFI_HANDLE Controller, IN EFI_GUID *ProtocolGuid)
#define PcdGet8(TokenName)
VOID EFIAPI Exit(IN EFI_STATUS Status)
EFI_STATUS EFIAPI EfiLibUninstallDriverBindingComponentName2(IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
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_HANDLE DriverBindingHandle
BOOLEAN iScsiIpv4BootCapablity
BOOLEAN iScsiIpv6BootCapablity
BOOLEAN OffloadCapability
BOOLEAN iScsiMpioCapability