2 The driver binding and service binding protocol for IP6 driver.
4 Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __EFI_IP6_DRIVER_H__
11 #define __EFI_IP6_DRIVER_H__
13 extern EFI_DRIVER_BINDING_PROTOCOL gIp6DriverBinding
;
14 extern EFI_COMPONENT_NAME_PROTOCOL gIp6ComponentName
;
15 extern EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2
;
16 extern EFI_UNICODE_STRING_TABLE
*gIp6ControllerNameTable
;
19 EFI_SERVICE_BINDING_PROTOCOL
*ServiceBinding
;
20 UINTN NumberOfChildren
;
21 EFI_HANDLE
*ChildHandleBuffer
;
22 }IP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT
;
25 Clean up an IP6 service binding instance. It releases all
26 the resource allocated by the instance. The instance may be
27 partly initialized, or partly destroyed. If a resource is
28 destroyed, it is marked as that in case the destroy failed and
29 being called again later.
31 @param[in] IpSb The IP6 service binding instance to clean up.
33 @retval EFI_SUCCESS The resource used by the instance are cleaned up.
34 @retval Others Failed to clean up some of the resources.
43 // Function prototype for the driver's entry point
47 This is the declaration of an EFI image entry point. This entry point is
48 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
49 both device drivers and bus drivers.
51 The entry point for IP6 driver which installs the driver
52 binding and component name protocol on its image.
54 @param[in] ImageHandle The firmware allocated handle for the UEFI image.
55 @param[in] SystemTable A pointer to the EFI System Table.
57 @retval EFI_SUCCESS The operation completed successfully.
58 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
64 IN EFI_HANDLE ImageHandle
,
65 IN EFI_SYSTEM_TABLE
*SystemTable
69 // Function prototypes for the Driver Binding Protocol
73 Test to see if this driver supports ControllerHandle.
75 @param[in] This Protocol instance pointer.
76 @param[in] ControllerHandle Handle of device to test.
77 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
80 @retval EFI_SUCCESS This driver supports this device.
81 @retval EFI_ALREADY_STARTED This driver is already running on this device.
82 @retval other This driver does not support this device.
87 Ip6DriverBindingSupported (
88 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
89 IN EFI_HANDLE ControllerHandle
,
90 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
94 Start this driver on ControllerHandle.
96 @param[in] This Protocol instance pointer.
97 @param[in] ControllerHandle Handle of device to bind driver to.
98 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
101 @retval EFI_SUCCESS This driver is added to ControllerHandle.
102 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
103 @retval other This driver does not support this device.
108 Ip6DriverBindingStart (
109 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
110 IN EFI_HANDLE ControllerHandle
,
111 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
115 Stop this driver on ControllerHandle.
117 @param[in] This Protocol instance pointer.
118 @param[in] ControllerHandle Handle of device to stop driver on.
119 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
120 of children is zero, stop the entire bus driver.
121 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
122 if NumberOfChildren is 0.
124 @retval EFI_SUCCESS The device was stopped.
125 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
130 Ip6DriverBindingStop (
131 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
132 IN EFI_HANDLE ControllerHandle
,
133 IN UINTN NumberOfChildren
,
134 IN EFI_HANDLE
*ChildHandleBuffer OPTIONAL
138 // Function prototypes for the ServiceBinding Protocol
142 Creates a child handle with a set of I/O services.
144 @param[in] This Protocol instance pointer.
145 @param[in] ChildHandle Pointer to the handle of the child to create. If
146 it is NULL, then a new handle is created. If it
147 is not NULL, then the I/O services are added to
148 the existing child handle.
150 @retval EFI_SUCCESS The child handle was created with the I/O services.
151 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
153 @retval other The child handle was not created.
158 Ip6ServiceBindingCreateChild (
159 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
160 IN EFI_HANDLE
*ChildHandle
164 Destroys a child handle with a set of I/O services.
166 @param[in] This Protocol instance pointer.
167 @param[in] ChildHandle Handle of the child to destroy.
169 @retval EFI_SUCCESS The I/O services were removed from the child
171 @retval EFI_UNSUPPORTED The child handle does not support the I/O services
172 that are being removed.
173 @retval EFI_INVALID_PARAMETER Child handle is NULL.
174 @retval EFI_ACCESS_DENIED The child handle could not be destroyed because
175 its I/O services are being used.
176 @retval other The child handle was not destroyed.
181 Ip6ServiceBindingDestroyChild (
182 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
183 IN EFI_HANDLE ChildHandle