2 Driver Binding functions implementationfor for UefiPxeBc Driver.
4 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
5 Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include "PxeBcImpl.h"
20 EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp4DriverBinding
= {
21 PxeBcIp4DriverBindingSupported
,
22 PxeBcIp4DriverBindingStart
,
23 PxeBcIp4DriverBindingStop
,
29 EFI_DRIVER_BINDING_PROTOCOL gPxeBcIp6DriverBinding
= {
30 PxeBcIp6DriverBindingSupported
,
31 PxeBcIp6DriverBindingStart
,
32 PxeBcIp6DriverBindingStop
,
39 Get the Nic handle using any child handle in the IPv4 stack.
41 @param[in] ControllerHandle Pointer to child handle over IPv4.
43 @return NicHandle The pointer to the Nic handle.
47 PxeBcGetNicByIp4Children (
48 IN EFI_HANDLE ControllerHandle
53 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiArpProtocolGuid
);
54 if (NicHandle
== NULL
) {
55 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiIp4ProtocolGuid
);
56 if (NicHandle
== NULL
) {
57 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiUdp4ProtocolGuid
);
58 if (NicHandle
== NULL
) {
59 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiDhcp4ProtocolGuid
);
60 if (NicHandle
== NULL
) {
61 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiMtftp4ProtocolGuid
);
62 if (NicHandle
== NULL
) {
75 Get the Nic handle using any child handle in the IPv6 stack.
77 @param[in] ControllerHandle Pointer to child handle over IPv6.
79 @return NicHandle The pointer to the Nic handle.
83 PxeBcGetNicByIp6Children (
84 IN EFI_HANDLE ControllerHandle
89 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiIp6ProtocolGuid
);
90 if (NicHandle
== NULL
) {
91 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiUdp6ProtocolGuid
);
92 if (NicHandle
== NULL
) {
93 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiDhcp6ProtocolGuid
);
94 if (NicHandle
== NULL
) {
95 NicHandle
= NetLibGetNicHandle (ControllerHandle
, &gEfiMtftp6ProtocolGuid
);
96 if (NicHandle
== NULL
) {
108 Destroy the opened instances based on IPv4.
110 @param[in] This Pointer to the EFI_DRIVER_BINDING_PROTOCOL.
111 @param[in] Private Pointer to PXEBC_PRIVATE_DATA.
115 PxeBcDestroyIp4Children (
116 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
117 IN PXEBC_PRIVATE_DATA
*Private
120 ASSERT(Private
!= NULL
);
122 if (Private
->ArpChild
!= NULL
) {
124 // Close Arp for PxeBc->Arp and destroy the instance.
128 &gEfiArpProtocolGuid
,
129 This
->DriverBindingHandle
,
133 NetLibDestroyServiceChild (
135 This
->DriverBindingHandle
,
136 &gEfiArpServiceBindingProtocolGuid
,
141 if (Private
->Ip4Child
!= NULL
) {
143 // Close Ip4 for background ICMP error message and destroy the instance.
147 &gEfiIp4ProtocolGuid
,
148 This
->DriverBindingHandle
,
152 NetLibDestroyServiceChild (
154 This
->DriverBindingHandle
,
155 &gEfiIp4ServiceBindingProtocolGuid
,
160 if (Private
->Udp4WriteChild
!= NULL
) {
162 // Close Udp4 for PxeBc->UdpWrite and destroy the instance.
165 Private
->Udp4WriteChild
,
166 &gEfiUdp4ProtocolGuid
,
167 This
->DriverBindingHandle
,
171 NetLibDestroyServiceChild (
173 This
->DriverBindingHandle
,
174 &gEfiUdp4ServiceBindingProtocolGuid
,
175 Private
->Udp4WriteChild
179 if (Private
->Udp4ReadChild
!= NULL
) {
181 // Close Udp4 for PxeBc->UdpRead and destroy the instance.
184 Private
->Udp4ReadChild
,
185 &gEfiUdp4ProtocolGuid
,
186 This
->DriverBindingHandle
,
190 NetLibDestroyServiceChild (
192 This
->DriverBindingHandle
,
193 &gEfiUdp4ServiceBindingProtocolGuid
,
194 Private
->Udp4ReadChild
198 if (Private
->Mtftp4Child
!= NULL
) {
200 // Close Mtftp4 for PxeBc->Mtftp4 and destroy the instance.
203 Private
->Mtftp4Child
,
204 &gEfiMtftp4ProtocolGuid
,
205 This
->DriverBindingHandle
,
209 NetLibDestroyServiceChild (
211 This
->DriverBindingHandle
,
212 &gEfiMtftp4ServiceBindingProtocolGuid
,
217 if (Private
->Dhcp4Child
!= NULL
) {
219 // Close Dhcp4 for PxeBc->Dhcp4 and destroy the instance.
223 &gEfiDhcp4ProtocolGuid
,
224 This
->DriverBindingHandle
,
228 NetLibDestroyServiceChild (
230 This
->DriverBindingHandle
,
231 &gEfiDhcp4ServiceBindingProtocolGuid
,
236 if (Private
->Ip4Nic
!= NULL
) {
238 // Close PxeBcPrivate from the parent Nic handle and destroy the virtual handle.
243 This
->DriverBindingHandle
,
244 Private
->Ip4Nic
->Controller
247 gBS
->UninstallMultipleProtocolInterfaces (
248 Private
->Ip4Nic
->Controller
,
249 &gEfiDevicePathProtocolGuid
,
250 Private
->Ip4Nic
->DevicePath
,
251 &gEfiLoadFileProtocolGuid
,
252 &Private
->Ip4Nic
->LoadFile
,
253 &gEfiPxeBaseCodeProtocolGuid
,
258 if (Private
->Snp
!= NULL
) {
260 // Close SNP from the child virtual handle
263 Private
->Ip4Nic
->Controller
,
264 &gEfiSimpleNetworkProtocolGuid
,
265 This
->DriverBindingHandle
,
266 Private
->Ip4Nic
->Controller
269 gBS
->UninstallProtocolInterface (
270 Private
->Ip4Nic
->Controller
,
271 &gEfiSimpleNetworkProtocolGuid
,
275 FreePool (Private
->Ip4Nic
);
278 Private
->ArpChild
= NULL
;
279 Private
->Ip4Child
= NULL
;
280 Private
->Udp4WriteChild
= NULL
;
281 Private
->Udp4ReadChild
= NULL
;
282 Private
->Mtftp4Child
= NULL
;
283 Private
->Dhcp4Child
= NULL
;
284 Private
->Ip4Nic
= NULL
;
289 Destroy the opened instances based on IPv6.
291 @param[in] This Pointer to the EFI_DRIVER_BINDING_PROTOCOL.
292 @param[in] Private Pointer to PXEBC_PRIVATE_DATA.
296 PxeBcDestroyIp6Children (
297 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
298 IN PXEBC_PRIVATE_DATA
*Private
301 ASSERT(Private
!= NULL
);
303 if (Private
->Ip6Child
!= NULL
) {
305 // Close Ip6 for Ip6->Ip6Config and destroy the instance.
309 &gEfiIp6ProtocolGuid
,
310 This
->DriverBindingHandle
,
314 NetLibDestroyServiceChild (
316 This
->DriverBindingHandle
,
317 &gEfiIp6ServiceBindingProtocolGuid
,
322 if (Private
->Udp6WriteChild
!= NULL
) {
324 // Close Udp6 for PxeBc->UdpWrite and destroy the instance.
327 Private
->Udp6WriteChild
,
328 &gEfiUdp6ProtocolGuid
,
329 This
->DriverBindingHandle
,
332 NetLibDestroyServiceChild (
334 This
->DriverBindingHandle
,
335 &gEfiUdp6ServiceBindingProtocolGuid
,
336 Private
->Udp6WriteChild
340 if (Private
->Udp6ReadChild
!= NULL
) {
342 // Close Udp6 for PxeBc->UdpRead and destroy the instance.
345 Private
->Udp6ReadChild
,
346 &gEfiUdp6ProtocolGuid
,
347 This
->DriverBindingHandle
,
350 NetLibDestroyServiceChild (
352 This
->DriverBindingHandle
,
353 &gEfiUdp6ServiceBindingProtocolGuid
,
354 Private
->Udp6ReadChild
358 if (Private
->Mtftp6Child
!= NULL
) {
360 // Close Mtftp6 for PxeBc->Mtftp and destroy the instance.
363 Private
->Mtftp6Child
,
364 &gEfiMtftp6ProtocolGuid
,
365 This
->DriverBindingHandle
,
369 NetLibDestroyServiceChild (
371 This
->DriverBindingHandle
,
372 &gEfiMtftp6ServiceBindingProtocolGuid
,
377 if (Private
->Dhcp6Child
!= NULL
) {
379 // Close Dhcp6 for PxeBc->Dhcp and destroy the instance.
383 &gEfiDhcp6ProtocolGuid
,
384 This
->DriverBindingHandle
,
388 NetLibDestroyServiceChild (
390 This
->DriverBindingHandle
,
391 &gEfiDhcp6ServiceBindingProtocolGuid
,
396 if (Private
->Ip6Nic
!= NULL
) {
398 // Close PxeBcPrivate from the parent Nic handle and destroy the virtual handle.
403 This
->DriverBindingHandle
,
404 Private
->Ip6Nic
->Controller
407 gBS
->UninstallMultipleProtocolInterfaces (
408 Private
->Ip6Nic
->Controller
,
409 &gEfiDevicePathProtocolGuid
,
410 Private
->Ip6Nic
->DevicePath
,
411 &gEfiLoadFileProtocolGuid
,
412 &Private
->Ip6Nic
->LoadFile
,
413 &gEfiPxeBaseCodeProtocolGuid
,
417 if (Private
->Snp
!= NULL
) {
419 // Close SNP from the child virtual handle
422 Private
->Ip6Nic
->Controller
,
423 &gEfiSimpleNetworkProtocolGuid
,
424 This
->DriverBindingHandle
,
425 Private
->Ip6Nic
->Controller
427 gBS
->UninstallProtocolInterface (
428 Private
->Ip6Nic
->Controller
,
429 &gEfiSimpleNetworkProtocolGuid
,
433 FreePool (Private
->Ip6Nic
);
436 Private
->Ip6Child
= NULL
;
437 Private
->Udp6WriteChild
= NULL
;
438 Private
->Udp6ReadChild
= NULL
;
439 Private
->Mtftp6Child
= NULL
;
440 Private
->Dhcp6Child
= NULL
;
441 Private
->Ip6Nic
= NULL
;
442 Private
->Mode
.Ipv6Available
= FALSE
;
447 Create the opened instances based on IPv4.
449 @param[in] This Pointer to EFI_DRIVER_BINDING_PROTOCOL.
450 @param[in] ControllerHandle Handle of the child to destroy.
451 @param[in] Private Handle Pointer to PXEBC_PRIVATE_DATA.
453 @retval EFI_SUCCESS The instances based on IPv4 were all created successfully.
454 @retval Others An unexpected error occurred.
458 PxeBcCreateIp4Children (
459 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
460 IN EFI_HANDLE ControllerHandle
,
461 IN PXEBC_PRIVATE_DATA
*Private
465 IPv4_DEVICE_PATH Ip4Node
;
466 EFI_PXE_BASE_CODE_MODE
*Mode
;
467 EFI_UDP4_CONFIG_DATA
*Udp4CfgData
;
468 EFI_IP4_CONFIG_DATA
*Ip4CfgData
;
469 EFI_IP4_MODE_DATA Ip4ModeData
;
470 PXEBC_PRIVATE_PROTOCOL
*Id
;
471 EFI_SIMPLE_NETWORK_PROTOCOL
*Snp
;
473 if (Private
->Ip4Nic
!= NULL
) {
475 // Already created before.
481 // Create Dhcp4 child and open Dhcp4 protocol for PxeBc->Dhcp.
483 Status
= NetLibCreateServiceChild (
485 This
->DriverBindingHandle
,
486 &gEfiDhcp4ServiceBindingProtocolGuid
,
489 if (EFI_ERROR (Status
)) {
493 Status
= gBS
->OpenProtocol (
495 &gEfiDhcp4ProtocolGuid
,
496 (VOID
**) &Private
->Dhcp4
,
497 This
->DriverBindingHandle
,
499 EFI_OPEN_PROTOCOL_BY_DRIVER
501 if (EFI_ERROR (Status
)) {
506 // Create Mtftp4 child and open Mtftp4 protocol for PxeBc->Mtftp.
508 Status
= NetLibCreateServiceChild (
510 This
->DriverBindingHandle
,
511 &gEfiMtftp4ServiceBindingProtocolGuid
,
512 &Private
->Mtftp4Child
514 if (EFI_ERROR (Status
)) {
518 Status
= gBS
->OpenProtocol (
519 Private
->Mtftp4Child
,
520 &gEfiMtftp4ProtocolGuid
,
521 (VOID
**) &Private
->Mtftp4
,
522 This
->DriverBindingHandle
,
524 EFI_OPEN_PROTOCOL_BY_DRIVER
526 if (EFI_ERROR (Status
)) {
531 // Create Udp4 child and open Udp4 protocol for PxeBc->UdpRead.
533 Status
= NetLibCreateServiceChild (
535 This
->DriverBindingHandle
,
536 &gEfiUdp4ServiceBindingProtocolGuid
,
537 &Private
->Udp4ReadChild
539 if (EFI_ERROR (Status
)) {
543 Status
= gBS
->OpenProtocol (
544 Private
->Udp4ReadChild
,
545 &gEfiUdp4ProtocolGuid
,
546 (VOID
**) &Private
->Udp4Read
,
547 This
->DriverBindingHandle
,
549 EFI_OPEN_PROTOCOL_BY_DRIVER
551 if (EFI_ERROR (Status
)) {
556 // Create Udp4 child and open Udp4 protocol for PxeBc->UdpWrite.
558 Status
= NetLibCreateServiceChild (
560 This
->DriverBindingHandle
,
561 &gEfiUdp4ServiceBindingProtocolGuid
,
562 &Private
->Udp4WriteChild
564 if (EFI_ERROR (Status
)) {
568 Status
= gBS
->OpenProtocol (
569 Private
->Udp4WriteChild
,
570 &gEfiUdp4ProtocolGuid
,
571 (VOID
**) &Private
->Udp4Write
,
572 This
->DriverBindingHandle
,
574 EFI_OPEN_PROTOCOL_BY_DRIVER
576 if (EFI_ERROR (Status
)) {
581 // Create Arp child and open Arp protocol for PxeBc->Arp.
583 Status
= NetLibCreateServiceChild (
585 This
->DriverBindingHandle
,
586 &gEfiArpServiceBindingProtocolGuid
,
589 if (EFI_ERROR (Status
)) {
593 Status
= gBS
->OpenProtocol (
595 &gEfiArpProtocolGuid
,
596 (VOID
**) &Private
->Arp
,
597 This
->DriverBindingHandle
,
599 EFI_OPEN_PROTOCOL_BY_DRIVER
601 if (EFI_ERROR (Status
)) {
606 // Create Ip4 child and open Ip4 protocol for background ICMP packets.
608 Status
= NetLibCreateServiceChild (
610 This
->DriverBindingHandle
,
611 &gEfiIp4ServiceBindingProtocolGuid
,
614 if (EFI_ERROR (Status
)) {
618 Status
= gBS
->OpenProtocol (
620 &gEfiIp4ProtocolGuid
,
621 (VOID
**) &Private
->Ip4
,
622 This
->DriverBindingHandle
,
624 EFI_OPEN_PROTOCOL_BY_DRIVER
626 if (EFI_ERROR (Status
)) {
631 // Get max packet size from Ip4 to calculate block size for Tftp later.
633 Status
= Private
->Ip4
->GetModeData (Private
->Ip4
, &Ip4ModeData
, NULL
, NULL
);
634 if (EFI_ERROR (Status
)) {
638 Private
->Ip4MaxPacketSize
= Ip4ModeData
.MaxPacketSize
;
640 Private
->Ip4Nic
= AllocateZeroPool (sizeof (PXEBC_VIRTUAL_NIC
));
641 if (Private
->Ip4Nic
== NULL
) {
642 return EFI_OUT_OF_RESOURCES
;
645 Private
->Ip4Nic
->Private
= Private
;
646 Private
->Ip4Nic
->Signature
= PXEBC_VIRTUAL_NIC_SIGNATURE
;
649 // Create a device path node for Ipv4 virtual nic, and append it.
651 ZeroMem (&Ip4Node
, sizeof (IPv4_DEVICE_PATH
));
652 Ip4Node
.Header
.Type
= MESSAGING_DEVICE_PATH
;
653 Ip4Node
.Header
.SubType
= MSG_IPv4_DP
;
654 Ip4Node
.StaticIpAddress
= FALSE
;
656 SetDevicePathNodeLength (&Ip4Node
.Header
, sizeof (Ip4Node
));
658 Private
->Ip4Nic
->DevicePath
= AppendDevicePathNode (Private
->DevicePath
, &Ip4Node
.Header
);
660 if (Private
->Ip4Nic
->DevicePath
== NULL
) {
661 Status
= EFI_OUT_OF_RESOURCES
;
666 &Private
->Ip4Nic
->LoadFile
,
667 &gLoadFileProtocolTemplate
,
668 sizeof (EFI_LOAD_FILE_PROTOCOL
)
672 // Create a new handle for IPv4 virtual nic,
673 // and install PxeBaseCode, LoadFile and DevicePath protocols.
675 Status
= gBS
->InstallMultipleProtocolInterfaces (
676 &Private
->Ip4Nic
->Controller
,
677 &gEfiDevicePathProtocolGuid
,
678 Private
->Ip4Nic
->DevicePath
,
679 &gEfiLoadFileProtocolGuid
,
680 &Private
->Ip4Nic
->LoadFile
,
681 &gEfiPxeBaseCodeProtocolGuid
,
685 if (EFI_ERROR (Status
)) {
689 if (Private
->Snp
!= NULL
) {
691 // Install SNP protocol on purpose is for some OS loader backward
692 // compatibility consideration.
694 Status
= gBS
->InstallProtocolInterface (
695 &Private
->Ip4Nic
->Controller
,
696 &gEfiSimpleNetworkProtocolGuid
,
697 EFI_NATIVE_INTERFACE
,
700 if (EFI_ERROR (Status
)) {
705 // Open SNP on the child handle BY_DRIVER. It will prevent any additionally
706 // layering to perform the experiment.
708 Status
= gBS
->OpenProtocol (
709 Private
->Ip4Nic
->Controller
,
710 &gEfiSimpleNetworkProtocolGuid
,
712 This
->DriverBindingHandle
,
713 Private
->Ip4Nic
->Controller
,
714 EFI_OPEN_PROTOCOL_BY_DRIVER
716 if (EFI_ERROR (Status
)) {
722 // Open PxeBaseCodePrivate protocol by child to setup a parent-child relationship between
723 // real NIC handle and the virtual IPv4 NIC handle.
725 Status
= gBS
->OpenProtocol (
729 This
->DriverBindingHandle
,
730 Private
->Ip4Nic
->Controller
,
731 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
733 if (EFI_ERROR (Status
)) {
738 // Set default configure data for Udp4Read and Ip4 instance.
740 Mode
= Private
->PxeBc
.Mode
;
741 Udp4CfgData
= &Private
->Udp4CfgData
;
742 Ip4CfgData
= &Private
->Ip4CfgData
;
744 Udp4CfgData
->AcceptBroadcast
= FALSE
;
745 Udp4CfgData
->AcceptAnyPort
= TRUE
;
746 Udp4CfgData
->AllowDuplicatePort
= TRUE
;
747 Udp4CfgData
->TypeOfService
= Mode
->ToS
;
748 Udp4CfgData
->TimeToLive
= Mode
->TTL
;
749 Udp4CfgData
->ReceiveTimeout
= PXEBC_DEFAULT_LIFETIME
;
750 Udp4CfgData
->TransmitTimeout
= PXEBC_DEFAULT_LIFETIME
;
752 Ip4CfgData
->AcceptIcmpErrors
= TRUE
;
753 Ip4CfgData
->DefaultProtocol
= EFI_IP_PROTO_ICMP
;
754 Ip4CfgData
->TypeOfService
= Mode
->ToS
;
755 Ip4CfgData
->TimeToLive
= Mode
->TTL
;
756 Ip4CfgData
->ReceiveTimeout
= PXEBC_DEFAULT_LIFETIME
;
757 Ip4CfgData
->TransmitTimeout
= PXEBC_DEFAULT_LIFETIME
;
762 PxeBcDestroyIp4Children (This
, Private
);
768 Create the opened instances based on IPv6.
770 @param[in] This Pointer to EFI_DRIVER_BINDING_PROTOCOL.
771 @param[in] ControllerHandle Handle of the child to destroy.
772 @param[in] Private Handle Pointer to PXEBC_PRIVATE_DATA.
774 @retval EFI_SUCCESS The instances based on IPv6 were all created successfully.
775 @retval Others An unexpected error occurred.
779 PxeBcCreateIp6Children (
780 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
781 IN EFI_HANDLE ControllerHandle
,
782 IN PXEBC_PRIVATE_DATA
*Private
786 IPv6_DEVICE_PATH Ip6Node
;
787 EFI_UDP6_CONFIG_DATA
*Udp6CfgData
;
788 EFI_IP6_CONFIG_DATA
*Ip6CfgData
;
789 EFI_IP6_MODE_DATA Ip6ModeData
;
790 PXEBC_PRIVATE_PROTOCOL
*Id
;
791 EFI_SIMPLE_NETWORK_PROTOCOL
*Snp
;
794 if (Private
->Ip6Nic
!= NULL
) {
796 // Already created before.
801 Private
->Ip6Nic
= AllocateZeroPool (sizeof (PXEBC_VIRTUAL_NIC
));
803 if (Private
->Ip6Nic
== NULL
) {
804 return EFI_OUT_OF_RESOURCES
;
807 Private
->Ip6Nic
->Private
= Private
;
808 Private
->Ip6Nic
->Signature
= PXEBC_VIRTUAL_NIC_SIGNATURE
;
811 // Create Dhcp6 child and open Dhcp6 protocol for PxeBc->Dhcp.
813 Status
= NetLibCreateServiceChild (
815 This
->DriverBindingHandle
,
816 &gEfiDhcp6ServiceBindingProtocolGuid
,
819 if (EFI_ERROR (Status
)) {
823 Status
= gBS
->OpenProtocol (
825 &gEfiDhcp6ProtocolGuid
,
826 (VOID
**) &Private
->Dhcp6
,
827 This
->DriverBindingHandle
,
829 EFI_OPEN_PROTOCOL_BY_DRIVER
831 if (EFI_ERROR (Status
)) {
836 // Generate a random IAID for the Dhcp6 assigned address.
838 Private
->IaId
= NET_RANDOM (NetRandomInitSeed ());
839 if (Private
->Snp
!= NULL
) {
840 for (Index
= 0; Index
< Private
->Snp
->Mode
->HwAddressSize
; Index
++) {
841 Private
->IaId
|= (Private
->Snp
->Mode
->CurrentAddress
.Addr
[Index
] << ((Index
<< 3) & 31));
846 // Create Mtftp6 child and open Mtftp6 protocol for PxeBc->Mtftp.
848 Status
= NetLibCreateServiceChild (
850 This
->DriverBindingHandle
,
851 &gEfiMtftp6ServiceBindingProtocolGuid
,
852 &Private
->Mtftp6Child
854 if (EFI_ERROR (Status
)) {
858 Status
= gBS
->OpenProtocol (
859 Private
->Mtftp6Child
,
860 &gEfiMtftp6ProtocolGuid
,
861 (VOID
**) &Private
->Mtftp6
,
862 This
->DriverBindingHandle
,
864 EFI_OPEN_PROTOCOL_BY_DRIVER
866 if (EFI_ERROR (Status
)) {
871 // Create Udp6 child and open Udp6 protocol for PxeBc->UdpRead.
873 Status
= NetLibCreateServiceChild (
875 This
->DriverBindingHandle
,
876 &gEfiUdp6ServiceBindingProtocolGuid
,
877 &Private
->Udp6ReadChild
879 if (EFI_ERROR (Status
)) {
883 Status
= gBS
->OpenProtocol (
884 Private
->Udp6ReadChild
,
885 &gEfiUdp6ProtocolGuid
,
886 (VOID
**) &Private
->Udp6Read
,
887 This
->DriverBindingHandle
,
889 EFI_OPEN_PROTOCOL_BY_DRIVER
891 if (EFI_ERROR (Status
)) {
896 // Create Udp6 child and open Udp6 protocol for PxeBc->UdpWrite.
898 Status
= NetLibCreateServiceChild (
900 This
->DriverBindingHandle
,
901 &gEfiUdp6ServiceBindingProtocolGuid
,
902 &Private
->Udp6WriteChild
904 if (EFI_ERROR (Status
)) {
908 Status
= gBS
->OpenProtocol (
909 Private
->Udp6WriteChild
,
910 &gEfiUdp6ProtocolGuid
,
911 (VOID
**) &Private
->Udp6Write
,
912 This
->DriverBindingHandle
,
914 EFI_OPEN_PROTOCOL_BY_DRIVER
916 if (EFI_ERROR (Status
)) {
921 // Create Ip6 child and open Ip6 protocol for background ICMP6 packets.
923 Status
= NetLibCreateServiceChild (
925 This
->DriverBindingHandle
,
926 &gEfiIp6ServiceBindingProtocolGuid
,
929 if (EFI_ERROR (Status
)) {
933 Status
= gBS
->OpenProtocol (
935 &gEfiIp6ProtocolGuid
,
936 (VOID
**) &Private
->Ip6
,
937 This
->DriverBindingHandle
,
939 EFI_OPEN_PROTOCOL_BY_DRIVER
941 if (EFI_ERROR (Status
)) {
946 // Get max packet size from Ip6 to calculate block size for Tftp later.
948 Status
= Private
->Ip6
->GetModeData (Private
->Ip6
, &Ip6ModeData
, NULL
, NULL
);
949 if (EFI_ERROR (Status
)) {
953 Private
->Ip6MaxPacketSize
= Ip6ModeData
.MaxPacketSize
;
956 // Locate Ip6->Ip6Config and store it for set IPv6 address.
958 Status
= gBS
->HandleProtocol (
960 &gEfiIp6ConfigProtocolGuid
,
961 (VOID
**) &Private
->Ip6Cfg
963 if (EFI_ERROR (Status
)) {
968 // Create a device path node for Ipv6 virtual nic, and append it.
970 ZeroMem (&Ip6Node
, sizeof (IPv6_DEVICE_PATH
));
971 Ip6Node
.Header
.Type
= MESSAGING_DEVICE_PATH
;
972 Ip6Node
.Header
.SubType
= MSG_IPv6_DP
;
973 Ip6Node
.PrefixLength
= IP6_PREFIX_LENGTH
;
975 SetDevicePathNodeLength (&Ip6Node
.Header
, sizeof (Ip6Node
));
977 Private
->Ip6Nic
->DevicePath
= AppendDevicePathNode (Private
->DevicePath
, &Ip6Node
.Header
);
979 if (Private
->Ip6Nic
->DevicePath
== NULL
) {
980 Status
= EFI_OUT_OF_RESOURCES
;
985 &Private
->Ip6Nic
->LoadFile
,
986 &gLoadFileProtocolTemplate
,
987 sizeof (EFI_LOAD_FILE_PROTOCOL
)
991 // Create a new handle for IPv6 virtual nic,
992 // and install PxeBaseCode, LoadFile and DevicePath protocols.
994 Status
= gBS
->InstallMultipleProtocolInterfaces (
995 &Private
->Ip6Nic
->Controller
,
996 &gEfiDevicePathProtocolGuid
,
997 Private
->Ip6Nic
->DevicePath
,
998 &gEfiLoadFileProtocolGuid
,
999 &Private
->Ip6Nic
->LoadFile
,
1000 &gEfiPxeBaseCodeProtocolGuid
,
1004 if (EFI_ERROR (Status
)) {
1008 if (Private
->Snp
!= NULL
) {
1010 // Install SNP protocol on purpose is for some OS loader backward
1011 // compatibility consideration.
1013 Status
= gBS
->InstallProtocolInterface (
1014 &Private
->Ip6Nic
->Controller
,
1015 &gEfiSimpleNetworkProtocolGuid
,
1016 EFI_NATIVE_INTERFACE
,
1019 if (EFI_ERROR (Status
)) {
1024 // Open SNP on the child handle BY_DRIVER. It will prevent any additionally
1025 // layering to perform the experiment.
1027 Status
= gBS
->OpenProtocol (
1028 Private
->Ip6Nic
->Controller
,
1029 &gEfiSimpleNetworkProtocolGuid
,
1031 This
->DriverBindingHandle
,
1032 Private
->Ip6Nic
->Controller
,
1033 EFI_OPEN_PROTOCOL_BY_DRIVER
1035 if (EFI_ERROR (Status
)) {
1041 // Open PxeBaseCodePrivate protocol by child to setup a parent-child relationship between
1042 // real NIC handle and the virtual IPv6 NIC handle.
1044 Status
= gBS
->OpenProtocol (
1048 This
->DriverBindingHandle
,
1049 Private
->Ip6Nic
->Controller
,
1050 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
1052 if (EFI_ERROR (Status
)) {
1057 // Set IPv6 avaiable flag and set default configure data for
1058 // Udp6Read and Ip6 instance.
1060 Private
->Mode
.Ipv6Available
= TRUE
;
1061 Udp6CfgData
= &Private
->Udp6CfgData
;
1062 Ip6CfgData
= &Private
->Ip6CfgData
;
1064 Udp6CfgData
->AcceptAnyPort
= TRUE
;
1065 Udp6CfgData
->AllowDuplicatePort
= TRUE
;
1066 Udp6CfgData
->HopLimit
= PXEBC_DEFAULT_HOPLIMIT
;
1067 Udp6CfgData
->ReceiveTimeout
= PXEBC_DEFAULT_LIFETIME
;
1068 Udp6CfgData
->TransmitTimeout
= PXEBC_DEFAULT_LIFETIME
;
1070 Ip6CfgData
->AcceptIcmpErrors
= TRUE
;
1071 Ip6CfgData
->DefaultProtocol
= IP6_ICMP
;
1072 Ip6CfgData
->HopLimit
= PXEBC_DEFAULT_HOPLIMIT
;
1073 Ip6CfgData
->ReceiveTimeout
= PXEBC_DEFAULT_LIFETIME
;
1074 Ip6CfgData
->TransmitTimeout
= PXEBC_DEFAULT_LIFETIME
;
1079 PxeBcDestroyIp6Children (This
, Private
);
1085 The entry point for UefiPxeBc driver that installs the driver
1086 binding and component name protocol on its image.
1088 @param[in] ImageHandle The Image handle of the driver.
1089 @param[in] SystemTable The system table.
1097 PxeBcDriverEntryPoint (
1098 IN EFI_HANDLE ImageHandle
,
1099 IN EFI_SYSTEM_TABLE
*SystemTable
1104 Status
= EfiLibInstallDriverBindingComponentName2 (
1107 &gPxeBcIp4DriverBinding
,
1109 &gPxeBcComponentName
,
1110 &gPxeBcComponentName2
1112 if (EFI_ERROR (Status
)) {
1116 Status
= EfiLibInstallDriverBindingComponentName2 (
1119 &gPxeBcIp6DriverBinding
,
1121 &gPxeBcComponentName
,
1122 &gPxeBcComponentName2
1124 if (EFI_ERROR (Status
)) {
1125 gBS
->UninstallMultipleProtocolInterfaces (
1127 &gEfiDriverBindingProtocolGuid
,
1128 &gPxeBcIp4DriverBinding
,
1129 &gEfiComponentName2ProtocolGuid
,
1130 &gPxeBcComponentName2
,
1131 &gEfiComponentNameProtocolGuid
,
1132 &gPxeBcComponentName
,
1141 Test to see if this driver supports ControllerHandle. This is the worker function for
1142 PxeBcIp4(6)DriverBindingSupported.
1144 @param[in] This The pointer to the driver binding protocol.
1145 @param[in] ControllerHandle The handle of device to be tested.
1146 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
1147 device to be started.
1148 @param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
1150 @retval EFI_SUCCESS This driver supports this device.
1151 @retval EFI_UNSUPPORTED This driver does not support this device.
1157 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1158 IN EFI_HANDLE ControllerHandle
,
1159 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
,
1164 EFI_GUID
*DhcpServiceBindingGuid
;
1165 EFI_GUID
*MtftpServiceBindingGuid
;
1167 if (IpVersion
== IP_VERSION_4
) {
1168 DhcpServiceBindingGuid
= &gEfiDhcp4ServiceBindingProtocolGuid
;
1169 MtftpServiceBindingGuid
= &gEfiMtftp4ServiceBindingProtocolGuid
;
1171 DhcpServiceBindingGuid
= &gEfiDhcp6ServiceBindingProtocolGuid
;
1172 MtftpServiceBindingGuid
= &gEfiMtftp6ServiceBindingProtocolGuid
;
1176 // Try to open the Mtftp and Dhcp protocol to test whether IP stack is ready.
1178 Status
= gBS
->OpenProtocol (
1180 DhcpServiceBindingGuid
,
1182 This
->DriverBindingHandle
,
1184 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
1186 if (!EFI_ERROR (Status
)) {
1187 Status
= gBS
->OpenProtocol (
1189 MtftpServiceBindingGuid
,
1191 This
->DriverBindingHandle
,
1193 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
1198 // It's unsupported case if IP stack are not ready.
1200 if (EFI_ERROR (Status
)) {
1201 return EFI_UNSUPPORTED
;
1208 Start this driver on ControllerHandle. This is the worker function for
1209 PxeBcIp4(6)DriverBindingStart.
1211 @param[in] This The pointer to the driver binding protocol.
1212 @param[in] ControllerHandle The handle of device to be started.
1213 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
1214 device to be started.
1215 @param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
1218 @retval EFI_SUCCESS This driver is installed to ControllerHandle.
1219 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
1220 @retval other This driver does not support this device.
1226 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1227 IN EFI_HANDLE ControllerHandle
,
1228 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
,
1232 PXEBC_PRIVATE_DATA
*Private
;
1234 PXEBC_PRIVATE_PROTOCOL
*Id
;
1238 Status
= gBS
->OpenProtocol (
1242 This
->DriverBindingHandle
,
1244 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1246 if (!EFI_ERROR (Status
)) {
1248 // Skip the initialization if the driver has been started already.
1250 Private
= PXEBC_PRIVATE_DATA_FROM_ID (Id
);
1254 // If the driver has not been started yet, it should do initialization.
1256 Private
= AllocateZeroPool (sizeof (PXEBC_PRIVATE_DATA
));
1257 if (Private
== NULL
) {
1258 return EFI_OUT_OF_RESOURCES
;
1263 &gPxeBcProtocolTemplate
,
1264 sizeof (EFI_PXE_BASE_CODE_PROTOCOL
)
1267 Private
->Signature
= PXEBC_PRIVATE_DATA_SIGNATURE
;
1268 Private
->Controller
= ControllerHandle
;
1269 Private
->Image
= This
->ImageHandle
;
1270 Private
->PxeBc
.Mode
= &Private
->Mode
;
1271 Private
->Mode
.Ipv6Supported
= TRUE
;
1272 Private
->Mode
.AutoArp
= TRUE
;
1273 Private
->Mode
.TTL
= DEFAULT_TTL
;
1274 Private
->Mode
.ToS
= DEFAULT_ToS
;
1277 // Open device path to prepare for appending virtual NIC node.
1279 Status
= gBS
->OpenProtocol (
1281 &gEfiDevicePathProtocolGuid
,
1282 (VOID
**) &Private
->DevicePath
,
1283 This
->DriverBindingHandle
,
1285 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1288 if (EFI_ERROR (Status
)) {
1293 // Get the NII interface if it exists, it's not required.
1295 Status
= gBS
->OpenProtocol (
1297 &gEfiNetworkInterfaceIdentifierProtocolGuid_31
,
1298 (VOID
**) &Private
->Nii
,
1299 This
->DriverBindingHandle
,
1301 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1303 if (EFI_ERROR (Status
)) {
1304 Private
->Nii
= NULL
;
1308 // Install PxeBaseCodePrivate protocol onto the real NIC handler.
1309 // PxeBaseCodePrivate protocol is only used to keep the relationship between
1310 // NIC handle and virtual child handles.
1311 // gEfiCallerIdGuid will be used as its protocol guid.
1313 Status
= gBS
->InstallProtocolInterface (
1316 EFI_NATIVE_INTERFACE
,
1319 if (EFI_ERROR (Status
)) {
1324 // Try to locate SNP protocol.
1326 NetLibGetSnpHandle(ControllerHandle
, &Private
->Snp
);
1329 if (IpVersion
== IP_VERSION_4
) {
1331 // Try to create virtual NIC handle for IPv4.
1333 Status
= PxeBcCreateIp4Children (This
, ControllerHandle
, Private
);
1336 // Try to create virtual NIC handle for IPv6.
1338 Status
= PxeBcCreateIp6Children (This
, ControllerHandle
, Private
);
1340 if (EFI_ERROR (Status
)) {
1342 // Failed to start PXE driver if IPv4 and IPv6 stack are both not available.
1344 Status
= EFI_DEVICE_ERROR
;
1352 gBS
->UninstallProtocolInterface (
1359 if (IpVersion
== IP_VERSION_4
) {
1360 PxeBcDestroyIp4Children (This
, Private
);
1362 PxeBcDestroyIp6Children (This
, Private
);
1365 if (FirstStart
&& Private
!= NULL
) {
1374 Stop this driver on ControllerHandle. This is the worker function for
1375 PxeBcIp4(6)DriverBindingStop.
1377 @param[in] This Protocol instance pointer.
1378 @param[in] ControllerHandle Handle of device to stop driver on.
1379 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
1380 children is zero stop the entire bus driver.
1381 @param[in] ChildHandleBuffer List of Child Handles to Stop.
1382 @param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
1384 @retval EFI_SUCCESS This driver was removed ControllerHandle.
1385 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
1386 @retval Others This driver was not removed from this device
1392 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1393 IN EFI_HANDLE ControllerHandle
,
1394 IN UINTN NumberOfChildren
,
1395 IN EFI_HANDLE
*ChildHandleBuffer
,
1399 PXEBC_PRIVATE_DATA
*Private
;
1400 PXEBC_VIRTUAL_NIC
*VirtualNic
;
1401 EFI_LOAD_FILE_PROTOCOL
*LoadFile
;
1403 EFI_HANDLE NicHandle
;
1404 PXEBC_PRIVATE_PROTOCOL
*Id
;
1412 Status
= gBS
->OpenProtocol (
1414 &gEfiLoadFileProtocolGuid
,
1415 (VOID
**) &LoadFile
,
1416 This
->DriverBindingHandle
,
1418 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1420 if (EFI_ERROR (Status
)) {
1422 // Get the Nic handle by any pass-over service child handle.
1424 if (IpVersion
== IP_VERSION_4
) {
1425 NicHandle
= PxeBcGetNicByIp4Children (ControllerHandle
);
1427 NicHandle
= PxeBcGetNicByIp6Children (ControllerHandle
);
1429 if (NicHandle
== NULL
) {
1434 // Try to retrieve the private data by PxeBcPrivate protocol.
1436 Status
= gBS
->OpenProtocol (
1440 This
->DriverBindingHandle
,
1442 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1444 if (EFI_ERROR (Status
)) {
1447 Private
= PXEBC_PRIVATE_DATA_FROM_ID (Id
);
1451 // It's a virtual handle with LoadFileProtocol.
1453 Status
= gBS
->OpenProtocol (
1455 &gEfiLoadFileProtocolGuid
,
1456 (VOID
**) &LoadFile
,
1457 This
->DriverBindingHandle
,
1459 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1461 if (EFI_ERROR (Status
)) {
1465 VirtualNic
= PXEBC_VIRTUAL_NIC_FROM_LOADFILE (LoadFile
);
1466 Private
= VirtualNic
->Private
;
1467 NicHandle
= Private
->Controller
;
1471 // Stop functionality of PXE Base Code protocol
1473 Status
= Private
->PxeBc
.Stop (&Private
->PxeBc
);
1474 if (Status
!= EFI_SUCCESS
&& Status
!= EFI_NOT_STARTED
) {
1479 if (Private
->Ip4Nic
!= NULL
&& IpVersion
== IP_VERSION_4
) {
1480 PxeBcDestroyIp4Children (This
, Private
);
1483 if (Private
->Ip6Nic
!= NULL
&& IpVersion
== IP_VERSION_6
) {
1484 PxeBcDestroyIp6Children (This
, Private
);
1487 if (Private
->Ip4Nic
== NULL
&& Private
->Ip6Nic
== NULL
) {
1488 gBS
->UninstallProtocolInterface (
1500 Test to see if this driver supports ControllerHandle. This service
1501 is called by the EFI boot service ConnectController(). In
1502 order to make drivers as small as possible, there are a few calling
1503 restrictions for this service. ConnectController() must
1504 follow these calling restrictions. If any other agent wishes to call
1505 Supported() it must also follow these calling restrictions.
1507 @param[in] This The pointer to the driver binding protocol.
1508 @param[in] ControllerHandle The handle of device to be tested.
1509 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
1510 device to be started.
1512 @retval EFI_SUCCESS This driver supports this device.
1513 @retval EFI_UNSUPPORTED This driver does not support this device.
1518 PxeBcIp4DriverBindingSupported (
1519 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1520 IN EFI_HANDLE ControllerHandle
,
1521 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
1524 return PxeBcSupported (
1527 RemainingDevicePath
,
1533 Start this driver on ControllerHandle. This service is called by the
1534 EFI boot service ConnectController(). In order to make
1535 drivers as small as possible, there are a few calling restrictions for
1536 this service. ConnectController() must follow these
1537 calling restrictions. If any other agent wishes to call Start() it
1538 must also follow these calling restrictions.
1540 @param[in] This The pointer to the driver binding protocol.
1541 @param[in] ControllerHandle The handle of device to be started.
1542 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
1543 device to be started.
1545 @retval EFI_SUCCESS This driver is installed to ControllerHandle.
1546 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
1547 @retval other This driver does not support this device.
1552 PxeBcIp4DriverBindingStart (
1553 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1554 IN EFI_HANDLE ControllerHandle
,
1555 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
1561 RemainingDevicePath
,
1567 Stop this driver on ControllerHandle. This service is called by the
1568 EFI boot service DisconnectController(). In order to
1569 make drivers as small as possible, there are a few calling
1570 restrictions for this service. DisconnectController()
1571 must follow these calling restrictions. If any other agent wishes
1572 to call Stop() it must also follow these calling restrictions.
1574 @param[in] This Protocol instance pointer.
1575 @param[in] ControllerHandle Handle of device to stop driver on
1576 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
1577 children is zero stop the entire bus driver.
1578 @param[in] ChildHandleBuffer List of Child Handles to Stop.
1580 @retval EFI_SUCCESS This driver is removed ControllerHandle
1581 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
1582 @retval Others This driver was not removed from this device.
1587 PxeBcIp4DriverBindingStop (
1588 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1589 IN EFI_HANDLE ControllerHandle
,
1590 IN UINTN NumberOfChildren
,
1591 IN EFI_HANDLE
*ChildHandleBuffer
1604 Test to see if this driver supports ControllerHandle. This service
1605 is called by the EFI boot service ConnectController(). In
1606 order to make drivers as small as possible, there are a few calling
1607 restrictions for this service. ConnectController() must
1608 follow these calling restrictions. If any other agent wishes to call
1609 Supported() it must also follow these calling restrictions.
1611 @param[in] This The pointer to the driver binding protocol.
1612 @param[in] ControllerHandle The handle of device to be tested.
1613 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
1614 device to be started.
1616 @retval EFI_SUCCESS This driver supports this device.
1617 @retval EFI_UNSUPPORTED This driver does not support this device.
1622 PxeBcIp6DriverBindingSupported (
1623 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1624 IN EFI_HANDLE ControllerHandle
,
1625 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
1628 return PxeBcSupported (
1631 RemainingDevicePath
,
1637 Start this driver on ControllerHandle. This service is called by the
1638 EFI boot service ConnectController(). In order to make
1639 drivers as small as possible, there are a few calling restrictions for
1640 this service. ConnectController() must follow these
1641 calling restrictions. If any other agent wishes to call Start() it
1642 must also follow these calling restrictions.
1644 @param[in] This The pointer to the driver binding protocol.
1645 @param[in] ControllerHandle The handle of device to be started.
1646 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
1647 device to be started.
1649 @retval EFI_SUCCESS This driver is installed to ControllerHandle.
1650 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
1651 @retval other This driver does not support this device.
1656 PxeBcIp6DriverBindingStart (
1657 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1658 IN EFI_HANDLE ControllerHandle
,
1659 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
1665 RemainingDevicePath
,
1671 Stop this driver on ControllerHandle. This service is called by the
1672 EFI boot service DisconnectController(). In order to
1673 make drivers as small as possible, there are a few calling
1674 restrictions for this service. DisconnectController()
1675 must follow these calling restrictions. If any other agent wishes
1676 to call Stop() it must also follow these calling restrictions.
1678 @param[in] This Protocol instance pointer.
1679 @param[in] ControllerHandle Handle of device to stop driver on
1680 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
1681 children is zero stop the entire bus driver.
1682 @param[in] ChildHandleBuffer List of Child Handles to Stop.
1684 @retval EFI_SUCCESS This driver is removed ControllerHandle
1685 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
1686 @retval Others This driver was not removed from this device.
1691 PxeBcIp6DriverBindingStop (
1692 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
1693 IN EFI_HANDLE ControllerHandle
,
1694 IN UINTN NumberOfChildren
,
1695 IN EFI_HANDLE
*ChildHandleBuffer