2 The driver binding and service binding protocol for IP6 driver.
4 Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __EFI_IP6_DRIVER_H__
17 #define __EFI_IP6_DRIVER_H__
19 extern EFI_DRIVER_BINDING_PROTOCOL gIp6DriverBinding
;
20 extern EFI_COMPONENT_NAME_PROTOCOL gIp6ComponentName
;
21 extern EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2
;
22 extern EFI_UNICODE_STRING_TABLE
*gIp6ControllerNameTable
;
25 EFI_SERVICE_BINDING_PROTOCOL
*ServiceBinding
;
26 UINTN NumberOfChildren
;
27 EFI_HANDLE
*ChildHandleBuffer
;
28 }IP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT
;
31 Clean up an IP6 service binding instance. It releases all
32 the resource allocated by the instance. The instance may be
33 partly initialized, or partly destroyed. If a resource is
34 destroyed, it is marked as that in case the destroy failed and
35 being called again later.
37 @param[in] IpSb The IP6 service binding instance to clean up.
39 @retval EFI_SUCCESS The resource used by the instance are cleaned up.
40 @retval Others Failed to clean up some of the resources.
49 // Function prototype for the driver's entry point
53 This is the declaration of an EFI image entry point. This entry point is
54 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
55 both device drivers and bus drivers.
57 The entry point for IP6 driver which installs the driver
58 binding and component name protocol on its image.
60 @param[in] ImageHandle The firmware allocated handle for the UEFI image.
61 @param[in] SystemTable A pointer to the EFI System Table.
63 @retval EFI_SUCCESS The operation completed successfully.
64 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
70 IN EFI_HANDLE ImageHandle
,
71 IN EFI_SYSTEM_TABLE
*SystemTable
75 // Function prototypes for the Drivr Binding Protocol
79 Test to see if this driver supports ControllerHandle.
81 @param[in] This Protocol instance pointer.
82 @param[in] ControllerHandle Handle of device to test.
83 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
86 @retval EFI_SUCCESS This driver supports this device.
87 @retval EFI_ALREADY_STARTED This driver is already running on this device.
88 @retval other This driver does not support this device.
93 Ip6DriverBindingSupported (
94 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
95 IN EFI_HANDLE ControllerHandle
,
96 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
100 Start this driver on ControllerHandle.
102 @param[in] This Protocol instance pointer.
103 @param[in] ControllerHandle Handle of device to bind driver to.
104 @param[in] RemainingDevicePath Optional parameter used to pick a specific child
107 @retval EFI_SUCCES This driver is added to ControllerHandle.
108 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
109 @retval other This driver does not support this device.
114 Ip6DriverBindingStart (
115 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
116 IN EFI_HANDLE ControllerHandle
,
117 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
121 Stop this driver on ControllerHandle.
123 @param[in] This Protocol instance pointer.
124 @param[in] ControllerHandle Handle of device to stop driver on.
125 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
126 of children is zero, stop the entire bus driver.
127 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
128 if NumberOfChildren is 0.
130 @retval EFI_SUCCESS The device was stopped.
131 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
136 Ip6DriverBindingStop (
137 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
138 IN EFI_HANDLE ControllerHandle
,
139 IN UINTN NumberOfChildren
,
140 IN EFI_HANDLE
*ChildHandleBuffer OPTIONAL
144 // Function prototypes for the ServiceBinding Protocol
148 Creates a child handle with a set of I/O services.
150 @param[in] This Protocol instance pointer.
151 @param[in] ChildHandle Pointer to the handle of the child to create. If
152 it is NULL, then a new handle is created. If it
153 is not NULL, then the I/O services are added to
154 the existing child handle.
156 @retval EFI_SUCCES The child handle was created with the I/O services.
157 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
159 @retval other The child handle was not created.
164 Ip6ServiceBindingCreateChild (
165 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
166 IN EFI_HANDLE
*ChildHandle
170 Destroys a child handle with a set of I/O services.
172 @param[in] This Protocol instance pointer.
173 @param[in] ChildHandle Handle of the child to destroy.
175 @retval EFI_SUCCES The I/O services were removed from the child
177 @retval EFI_UNSUPPORTED The child handle does not support the I/O services
178 that are being removed.
179 @retval EFI_INVALID_PARAMETER Child handle is NULL.
180 @retval EFI_ACCESS_DENIED The child handle could not be destroyed because
181 its I/O services are being used.
182 @retval other The child handle was not destroyed.
187 Ip6ServiceBindingDestroyChild (
188 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
189 IN EFI_HANDLE ChildHandle