X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=NetworkPkg%2FUefiPxeBcDxe%2FPxeBcDriver.c;h=09c5753ad9e79938f1c129b350c3ad39aa9d8b2f;hb=be37315a08047945dcac91176cd99ee3397e151b;hp=080b751cb19637541e81ef9bdec8db16c3302aaf;hpb=75dce340624dba5e4a79b2e5b2dbe943bae0d0e9;p=mirror_edk2.git diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c index 080b751cb1..09c5753ad9 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c @@ -1,7 +1,8 @@ /** @file Driver Binding functions implementationfor for UefiPxeBc Driver. - Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.
+ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
+ Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -16,10 +17,19 @@ #include "PxeBcImpl.h" -EFI_DRIVER_BINDING_PROTOCOL gPxeBcDriverBinding = { - PxeBcDriverBindingSupported, - PxeBcDriverBindingStart, - PxeBcDriverBindingStop, +EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp4DriverBinding = { + PxeBcIp4DriverBindingSupported, + PxeBcIp4DriverBindingStart, + PxeBcIp4DriverBindingStop, + 0xa, + NULL, + NULL +}; + +EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp6DriverBinding = { + PxeBcIp6DriverBindingSupported, + PxeBcIp6DriverBindingStart, + PxeBcIp6DriverBindingStop, 0xa, NULL, NULL @@ -432,6 +442,103 @@ PxeBcDestroyIp6Children ( Private->Mode.Ipv6Available = FALSE; } +/** + Check whether UNDI protocol supports IPv6. + + @param[in] ControllerHandle Controller handle. + @param[in] Private Pointer to PXEBC_PRIVATE_DATA. + @param[out] Ipv6Support TRUE if UNDI supports IPv6. + + @retval EFI_SUCCESS Get the result whether UNDI supports IPv6 by NII or AIP protocol successfully. + @retval EFI_NOT_FOUND Don't know whether UNDI supports IPv6 since NII or AIP is not available. + +**/ +EFI_STATUS +PxeBcCheckIpv6Support ( + IN EFI_HANDLE ControllerHandle, + IN PXEBC_PRIVATE_DATA *Private, + OUT BOOLEAN *Ipv6Support + ) +{ + EFI_HANDLE Handle; + EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; + EFI_STATUS Status; + EFI_GUID *InfoTypesBuffer; + UINTN InfoTypeBufferCount; + UINTN TypeIndex; + BOOLEAN Supported; + VOID *InfoBlock; + UINTN InfoBlockSize; + + ASSERT (Private != NULL && Ipv6Support != NULL); + + // + // Check whether the UNDI supports IPv6 by NII protocol. + // + if (Private->Nii != NULL) { + *Ipv6Support = Private->Nii->Ipv6Supported; + return EFI_SUCCESS; + } + + // + // Check whether the UNDI supports IPv6 by AIP protocol. + // + + // + // Get the NIC handle by SNP protocol. + // + Handle = NetLibGetSnpHandle (ControllerHandle, NULL); + if (Handle == NULL) { + return EFI_NOT_FOUND; + } + + Aip = NULL; + Status = gBS->HandleProtocol ( + Handle, + &gEfiAdapterInformationProtocolGuid, + (VOID *) &Aip + ); + if (EFI_ERROR (Status) || Aip == NULL) { + return EFI_NOT_FOUND; + } + + InfoTypesBuffer = NULL; + InfoTypeBufferCount = 0; + Status = Aip->GetSupportedTypes (Aip, &InfoTypesBuffer, &InfoTypeBufferCount); + if (EFI_ERROR (Status) || InfoTypesBuffer == NULL) { + FreePool (InfoTypesBuffer); + return EFI_NOT_FOUND; + } + + Supported = FALSE; + for (TypeIndex = 0; TypeIndex < InfoTypeBufferCount; TypeIndex++) { + if (CompareGuid (&InfoTypesBuffer[TypeIndex], &gEfiAdapterInfoUndiIpv6SupportGuid)) { + Supported = TRUE; + break; + } + } + + FreePool (InfoTypesBuffer); + if (!Supported) { + return EFI_NOT_FOUND; + } + + // + // We now have adapter information block. + // + InfoBlock = NULL; + InfoBlockSize = 0; + Status = Aip->GetInformation (Aip, &gEfiAdapterInfoUndiIpv6SupportGuid, &InfoBlock, &InfoBlockSize); + if (EFI_ERROR (Status) || InfoBlock == NULL) { + FreePool (InfoBlock); + return EFI_NOT_FOUND; + } + + *Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support; + FreePool (InfoBlock); + return EFI_SUCCESS; + +} /** Create the opened instances based on IPv4. @@ -635,6 +742,18 @@ PxeBcCreateIp4Children ( Private->Ip4Nic->Private = Private; Private->Ip4Nic->Signature = PXEBC_VIRTUAL_NIC_SIGNATURE; + // + // Locate Ip4->Ip4Config2 and store it for set IPv4 Policy. + // + Status = gBS->HandleProtocol ( + ControllerHandle, + &gEfiIp4Config2ProtocolGuid, + (VOID **) &Private->Ip4Config2 + ); + if (EFI_ERROR (Status)) { + goto ON_ERROR; + } + // // Create a device path node for Ipv4 virtual nic, and append it. // @@ -942,6 +1061,30 @@ PxeBcCreateIp6Children ( Private->Ip6MaxPacketSize = Ip6ModeData.MaxPacketSize; + if (Ip6ModeData.AddressList != NULL) { + FreePool (Ip6ModeData.AddressList); + } + + if (Ip6ModeData.GroupTable != NULL) { + FreePool (Ip6ModeData.GroupTable); + } + + if (Ip6ModeData.RouteTable != NULL) { + FreePool (Ip6ModeData.RouteTable); + } + + if (Ip6ModeData.NeighborCache != NULL) { + FreePool (Ip6ModeData.NeighborCache); + } + + if (Ip6ModeData.PrefixTable != NULL) { + FreePool (Ip6ModeData.PrefixTable); + } + + if (Ip6ModeData.IcmpTypeList != NULL) { + FreePool (Ip6ModeData.IcmpTypeList); + } + // // Locate Ip6->Ip6Config and store it for set IPv6 address. // @@ -1047,7 +1190,18 @@ PxeBcCreateIp6Children ( // Set IPv6 avaiable flag and set default configure data for // Udp6Read and Ip6 instance. // - Private->Mode.Ipv6Available = TRUE; + Status = PxeBcCheckIpv6Support (ControllerHandle, Private, &Private->Mode.Ipv6Available); + if (EFI_ERROR (Status)) { + // + // Fail to get the data whether UNDI supports IPv6. Set default value. + // + Private->Mode.Ipv6Available = TRUE; + } + + if (!Private->Mode.Ipv6Available) { + goto ON_ERROR; + } + Udp6CfgData = &Private->Udp6CfgData; Ip6CfgData = &Private->Ip6CfgData; @@ -1089,82 +1243,94 @@ PxeBcDriverEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ) { - return EfiLibInstallDriverBindingComponentName2 ( - ImageHandle, - SystemTable, - &gPxeBcDriverBinding, + EFI_STATUS Status; + + Status = EfiLibInstallDriverBindingComponentName2 ( + ImageHandle, + SystemTable, + &gPxeBcIp4DriverBinding, + ImageHandle, + &gPxeBcComponentName, + &gPxeBcComponentName2 + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Status = EfiLibInstallDriverBindingComponentName2 ( + ImageHandle, + SystemTable, + &gPxeBcIp6DriverBinding, + NULL, + &gPxeBcComponentName, + &gPxeBcComponentName2 + ); + if (EFI_ERROR (Status)) { + gBS->UninstallMultipleProtocolInterfaces ( ImageHandle, + &gEfiDriverBindingProtocolGuid, + &gPxeBcIp4DriverBinding, + &gEfiComponentName2ProtocolGuid, + &gPxeBcComponentName2, + &gEfiComponentNameProtocolGuid, &gPxeBcComponentName, - &gPxeBcComponentName2 + NULL ); -} + } + return Status; +} /** - Test to see if this driver supports ControllerHandle. This service - is called by the EFI boot service ConnectController(). In - order to make drivers as small as possible, there are a few calling - restrictions for this service. ConnectController() must - follow these calling restrictions. If any other agent wishes to call - Supported() it must also follow these calling restrictions. + Test to see if this driver supports ControllerHandle. This is the worker function for + PxeBcIp4(6)DriverBindingSupported. @param[in] This The pointer to the driver binding protocol. @param[in] ControllerHandle The handle of device to be tested. @param[in] RemainingDevicePath Optional parameter used to pick a specific child device to be started. - + @param[in] IpVersion IP_VERSION_4 or IP_VERSION_6. + @retval EFI_SUCCESS This driver supports this device. @retval EFI_UNSUPPORTED This driver does not support this device. **/ EFI_STATUS EFIAPI -PxeBcDriverBindingSupported ( +PxeBcSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, + IN UINT8 IpVersion ) { - EFI_STATUS Ip4Status; - EFI_STATUS Ip6Status; - - // - // Try to open the Mtftp4 and Dhcp4 protocol to test whether IPv4 stack is ready. - // - Ip4Status = gBS->OpenProtocol ( - ControllerHandle, - &gEfiDhcp4ServiceBindingProtocolGuid, - NULL, - This->DriverBindingHandle, - ControllerHandle, - EFI_OPEN_PROTOCOL_TEST_PROTOCOL - ); - if (!EFI_ERROR (Ip4Status)) { - Ip4Status = gBS->OpenProtocol ( - ControllerHandle, - &gEfiMtftp4ServiceBindingProtocolGuid, - NULL, - This->DriverBindingHandle, - ControllerHandle, - EFI_OPEN_PROTOCOL_TEST_PROTOCOL - ); + EFI_STATUS Status; + EFI_GUID *DhcpServiceBindingGuid; + EFI_GUID *MtftpServiceBindingGuid; + + if (IpVersion == IP_VERSION_4) { + DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid; + MtftpServiceBindingGuid = &gEfiMtftp4ServiceBindingProtocolGuid; + } else { + DhcpServiceBindingGuid = &gEfiDhcp6ServiceBindingProtocolGuid; + MtftpServiceBindingGuid = &gEfiMtftp6ServiceBindingProtocolGuid; } // - // Try to open the Mtftp6 and Dhcp6 protocol to test whether IPv4 stack is ready. + // Try to open the Mtftp and Dhcp protocol to test whether IP stack is ready. // - Ip6Status = gBS->OpenProtocol ( + Status = gBS->OpenProtocol ( ControllerHandle, - &gEfiDhcp6ServiceBindingProtocolGuid, + DhcpServiceBindingGuid, NULL, This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_TEST_PROTOCOL ); - if (!EFI_ERROR (Ip6Status)) { - Ip6Status = gBS->OpenProtocol ( + if (!EFI_ERROR (Status)) { + Status = gBS->OpenProtocol ( ControllerHandle, - &gEfiMtftp6ServiceBindingProtocolGuid, + MtftpServiceBindingGuid, NULL, This->DriverBindingHandle, ControllerHandle, @@ -1173,28 +1339,25 @@ PxeBcDriverBindingSupported ( } // - // It's unsupported case if both stack are not ready. + // It's unsupported case if IP stack are not ready. // - if (EFI_ERROR (Ip4Status) && EFI_ERROR (Ip6Status)) { + if (EFI_ERROR (Status)) { return EFI_UNSUPPORTED; } return EFI_SUCCESS; } - /** - Start this driver on ControllerHandle. This service is called by the - EFI boot service ConnectController(). In order to make - drivers as small as possible, there are a few calling restrictions for - this service. ConnectController() must follow these - calling restrictions. If any other agent wishes to call Start() it - must also follow these calling restrictions. + Start this driver on ControllerHandle. This is the worker function for + PxeBcIp4(6)DriverBindingStart. @param[in] This The pointer to the driver binding protocol. @param[in] ControllerHandle The handle of device to be started. @param[in] RemainingDevicePath Optional parameter used to pick a specific child device to be started. + @param[in] IpVersion IP_VERSION_4 or IP_VERSION_6. + @retval EFI_SUCCESS This driver is installed to ControllerHandle. @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle. @@ -1203,18 +1366,19 @@ PxeBcDriverBindingSupported ( **/ EFI_STATUS EFIAPI -PxeBcDriverBindingStart ( +PxeBcStart ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, + IN UINT8 IpVersion ) { PXEBC_PRIVATE_DATA *Private; EFI_STATUS Status; - EFI_STATUS Ip4Status; - EFI_STATUS Ip6Status; PXEBC_PRIVATE_PROTOCOL *Id; + BOOLEAN FirstStart; + FirstStart = FALSE; Status = gBS->OpenProtocol ( ControllerHandle, &gEfiCallerIdGuid, @@ -1229,6 +1393,7 @@ PxeBcDriverBindingStart ( // Private = PXEBC_PRIVATE_DATA_FROM_ID (Id); } else { + FirstStart = TRUE; // // If the driver has not been started yet, it should do initialization. // @@ -1305,17 +1470,18 @@ PxeBcDriverBindingStart ( NetLibGetSnpHandle(ControllerHandle, &Private->Snp); } - // - // Try to create virtual NIC handle for IPv4. - // - Ip4Status = PxeBcCreateIp4Children (This, ControllerHandle, Private); - - // - // Try to create virtual NIC handle for IPv6. - // - Ip6Status = PxeBcCreateIp6Children (This, ControllerHandle, Private); - - if (EFI_ERROR (Ip4Status) && EFI_ERROR (Ip6Status)) { + if (IpVersion == IP_VERSION_4) { + // + // Try to create virtual NIC handle for IPv4. + // + Status = PxeBcCreateIp4Children (This, ControllerHandle, Private); + } else { + // + // Try to create virtual NIC handle for IPv6. + // + Status = PxeBcCreateIp6Children (This, ControllerHandle, Private); + } + if (EFI_ERROR (Status)) { // // Failed to start PXE driver if IPv4 and IPv6 stack are both not available. // @@ -1326,32 +1492,38 @@ PxeBcDriverBindingStart ( return EFI_SUCCESS; ON_ERROR: - gBS->UninstallProtocolInterface ( - ControllerHandle, - &gEfiCallerIdGuid, - &Private->Id - ); - PxeBcDestroyIp4Children (This, Private); - PxeBcDestroyIp6Children (This, Private); - FreePool (Private); + if (FirstStart) { + gBS->UninstallProtocolInterface ( + ControllerHandle, + &gEfiCallerIdGuid, + &Private->Id + ); + } + + if (IpVersion == IP_VERSION_4) { + PxeBcDestroyIp4Children (This, Private); + } else { + PxeBcDestroyIp6Children (This, Private); + } + + if (FirstStart && Private != NULL) { + FreePool (Private); + } return Status; } /** - Stop this driver on ControllerHandle. This service is called by the - EFI boot service DisconnectController(). In order to - make drivers as small as possible, there are a few calling - restrictions for this service. DisconnectController() - must follow these calling restrictions. If any other agent wishes - to call Stop() it must also follow these calling restrictions. + Stop this driver on ControllerHandle. This is the worker function for + PxeBcIp4(6)DriverBindingStop. @param[in] This Protocol instance pointer. @param[in] ControllerHandle Handle of device to stop driver on. @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. @param[in] ChildHandleBuffer List of Child Handles to Stop. + @param[in] IpVersion IP_VERSION_4 or IP_VERSION_6. @retval EFI_SUCCESS This driver was removed ControllerHandle. @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. @@ -1360,11 +1532,12 @@ ON_ERROR: **/ EFI_STATUS EFIAPI -PxeBcDriverBindingStop ( +PxeBcStop ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, - IN EFI_HANDLE *ChildHandleBuffer + IN EFI_HANDLE *ChildHandleBuffer, + IN UINT8 IpVersion ) { PXEBC_PRIVATE_DATA *Private; @@ -1372,7 +1545,6 @@ PxeBcDriverBindingStop ( EFI_LOAD_FILE_PROTOCOL *LoadFile; EFI_STATUS Status; EFI_HANDLE NicHandle; - BOOLEAN IsIpv6; PXEBC_PRIVATE_PROTOCOL *Id; Private = NULL; @@ -1380,7 +1552,6 @@ PxeBcDriverBindingStop ( VirtualNic = NULL; LoadFile = NULL; Id = NULL; - IsIpv6 = FALSE; Status = gBS->OpenProtocol ( ControllerHandle, @@ -1394,14 +1565,13 @@ PxeBcDriverBindingStop ( // // Get the Nic handle by any pass-over service child handle. // - NicHandle = PxeBcGetNicByIp4Children (ControllerHandle); - if (NicHandle == NULL) { + if (IpVersion == IP_VERSION_4) { + NicHandle = PxeBcGetNicByIp4Children (ControllerHandle); + } else { NicHandle = PxeBcGetNicByIp6Children (ControllerHandle); - if (NicHandle == NULL) { - return EFI_DEVICE_ERROR; - } else { - IsIpv6 = TRUE; - } + } + if (NicHandle == NULL) { + return EFI_SUCCESS; } // @@ -1439,10 +1609,6 @@ PxeBcDriverBindingStop ( VirtualNic = PXEBC_VIRTUAL_NIC_FROM_LOADFILE (LoadFile); Private = VirtualNic->Private; NicHandle = Private->Controller; - - if (Private->Ip6Nic == VirtualNic) { - IsIpv6 = TRUE; - } } // @@ -1454,11 +1620,11 @@ PxeBcDriverBindingStop ( } - if (Private->Ip4Nic != NULL && !IsIpv6) { + if (Private->Ip4Nic != NULL && IpVersion == IP_VERSION_4) { PxeBcDestroyIp4Children (This, Private); } - if (Private->Ip6Nic != NULL && IsIpv6) { + if (Private->Ip6Nic != NULL && IpVersion == IP_VERSION_6) { PxeBcDestroyIp6Children (This, Private); } @@ -1473,3 +1639,211 @@ PxeBcDriverBindingStop ( return EFI_SUCCESS; } + +/** + Test to see if this driver supports ControllerHandle. This service + is called by the EFI boot service ConnectController(). In + order to make drivers as small as possible, there are a few calling + restrictions for this service. ConnectController() must + follow these calling restrictions. If any other agent wishes to call + Supported() it must also follow these calling restrictions. + + @param[in] This The pointer to the driver binding protocol. + @param[in] ControllerHandle The handle of device to be tested. + @param[in] RemainingDevicePath Optional parameter used to pick a specific child + device to be started. + + @retval EFI_SUCCESS This driver supports this device. + @retval EFI_UNSUPPORTED This driver does not support this device. + +**/ +EFI_STATUS +EFIAPI +PxeBcIp4DriverBindingSupported ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL + ) +{ + return PxeBcSupported ( + This, + ControllerHandle, + RemainingDevicePath, + IP_VERSION_4 + ); +} + +/** + Start this driver on ControllerHandle. This service is called by the + EFI boot service ConnectController(). In order to make + drivers as small as possible, there are a few calling restrictions for + this service. ConnectController() must follow these + calling restrictions. If any other agent wishes to call Start() it + must also follow these calling restrictions. + + @param[in] This The pointer to the driver binding protocol. + @param[in] ControllerHandle The handle of device to be started. + @param[in] RemainingDevicePath Optional parameter used to pick a specific child + device to be started. + + @retval EFI_SUCCESS This driver is installed to ControllerHandle. + @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle. + @retval other This driver does not support this device. + +**/ +EFI_STATUS +EFIAPI +PxeBcIp4DriverBindingStart ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL + ) +{ + return PxeBcStart ( + This, + ControllerHandle, + RemainingDevicePath, + IP_VERSION_4 + ); +} + +/** + Stop this driver on ControllerHandle. This service is called by the + EFI boot service DisconnectController(). In order to + make drivers as small as possible, there are a few calling + restrictions for this service. DisconnectController() + must follow these calling restrictions. If any other agent wishes + to call Stop() it must also follow these calling restrictions. + + @param[in] This Protocol instance pointer. + @param[in] ControllerHandle Handle of device to stop driver on + @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of + children is zero stop the entire bus driver. + @param[in] ChildHandleBuffer List of Child Handles to Stop. + + @retval EFI_SUCCESS This driver is removed ControllerHandle + @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. + @retval Others This driver was not removed from this device. + +**/ +EFI_STATUS +EFIAPI +PxeBcIp4DriverBindingStop ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN UINTN NumberOfChildren, + IN EFI_HANDLE *ChildHandleBuffer + ) +{ + return PxeBcStop ( + This, + ControllerHandle, + NumberOfChildren, + ChildHandleBuffer, + IP_VERSION_4 + ); +} + +/** + Test to see if this driver supports ControllerHandle. This service + is called by the EFI boot service ConnectController(). In + order to make drivers as small as possible, there are a few calling + restrictions for this service. ConnectController() must + follow these calling restrictions. If any other agent wishes to call + Supported() it must also follow these calling restrictions. + + @param[in] This The pointer to the driver binding protocol. + @param[in] ControllerHandle The handle of device to be tested. + @param[in] RemainingDevicePath Optional parameter use to pick a specific child + device to be started. + + @retval EFI_SUCCESS This driver supports this device. + @retval EFI_UNSUPPORTED This driver does not support this device. + +**/ +EFI_STATUS +EFIAPI +PxeBcIp6DriverBindingSupported ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL + ) +{ + return PxeBcSupported ( + This, + ControllerHandle, + RemainingDevicePath, + IP_VERSION_6 + ); +} + +/** + Start this driver on ControllerHandle. This service is called by the + EFI boot service ConnectController(). In order to make + drivers as small as possible, there are a few calling restrictions for + this service. ConnectController() must follow these + calling restrictions. If any other agent wishes to call Start() it + must also follow these calling restrictions. + + @param[in] This The pointer to the driver binding protocol. + @param[in] ControllerHandle The handle of device to be started. + @param[in] RemainingDevicePath Optional parameter used to pick a specific child + device to be started. + + @retval EFI_SUCCESS This driver is installed to ControllerHandle. + @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle. + @retval other This driver does not support this device. + +**/ +EFI_STATUS +EFIAPI +PxeBcIp6DriverBindingStart ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL + ) +{ + return PxeBcStart ( + This, + ControllerHandle, + RemainingDevicePath, + IP_VERSION_6 + ); +} + +/** + Stop this driver on ControllerHandle. This service is called by the + EFI boot service DisconnectController(). In order to + make drivers as small as possible, there are a few calling + restrictions for this service. DisconnectController() + must follow these calling restrictions. If any other agent wishes + to call Stop() it must also follow these calling restrictions. + + @param[in] This Protocol instance pointer. + @param[in] ControllerHandle Handle of device to stop driver on + @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of + children is zero stop the entire bus driver. + @param[in] ChildHandleBuffer List of Child Handles to Stop. + + @retval EFI_SUCCESS This driver is removed ControllerHandle + @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. + @retval Others This driver was not removed from this device. + +**/ +EFI_STATUS +EFIAPI +PxeBcIp6DriverBindingStop ( + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN UINTN NumberOfChildren, + IN EFI_HANDLE *ChildHandleBuffer + ) +{ + return PxeBcStop ( + This, + ControllerHandle, + NumberOfChildren, + ChildHandleBuffer, + IP_VERSION_6 + ); +}