]> git.proxmox.com Git - mirror_edk2.git/blob - NetworkPkg/Ip6Dxe/Ip6Driver.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Driver.h
1 /** @file
2 The driver binding and service binding protocol for IP6 driver.
3
4 Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __EFI_IP6_DRIVER_H__
11 #define __EFI_IP6_DRIVER_H__
12
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;
17
18 typedef struct {
19 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
20 UINTN NumberOfChildren;
21 EFI_HANDLE *ChildHandleBuffer;
22 }IP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;
23
24 /**
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.
30
31 @param[in] IpSb The IP6 service binding instance to clean up.
32
33 @retval EFI_SUCCESS The resource used by the instance are cleaned up.
34 @retval Others Failed to clean up some of the resources.
35
36 **/
37 EFI_STATUS
38 Ip6CleanService (
39 IN IP6_SERVICE *IpSb
40 );
41
42 //
43 // Function prototype for the driver's entry point
44 //
45
46 /**
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.
50
51 The entry point for IP6 driver which installs the driver
52 binding and component name protocol on its image.
53
54 @param[in] ImageHandle The firmware allocated handle for the UEFI image.
55 @param[in] SystemTable A pointer to the EFI System Table.
56
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.
59
60 **/
61 EFI_STATUS
62 EFIAPI
63 Ip6DriverEntryPoint (
64 IN EFI_HANDLE ImageHandle,
65 IN EFI_SYSTEM_TABLE *SystemTable
66 );
67
68 //
69 // Function prototypes for the Driver Binding Protocol
70 //
71
72 /**
73 Test to see if this driver supports ControllerHandle.
74
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
78 device to start.
79
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.
83
84 **/
85 EFI_STATUS
86 EFIAPI
87 Ip6DriverBindingSupported (
88 IN EFI_DRIVER_BINDING_PROTOCOL *This,
89 IN EFI_HANDLE ControllerHandle,
90 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
91 );
92
93 /**
94 Start this driver on ControllerHandle.
95
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
99 device to start.
100
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.
104
105 **/
106 EFI_STATUS
107 EFIAPI
108 Ip6DriverBindingStart (
109 IN EFI_DRIVER_BINDING_PROTOCOL *This,
110 IN EFI_HANDLE ControllerHandle,
111 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
112 );
113
114 /**
115 Stop this driver on ControllerHandle.
116
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.
123
124 @retval EFI_SUCCESS The device was stopped.
125 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
126
127 **/
128 EFI_STATUS
129 EFIAPI
130 Ip6DriverBindingStop (
131 IN EFI_DRIVER_BINDING_PROTOCOL *This,
132 IN EFI_HANDLE ControllerHandle,
133 IN UINTN NumberOfChildren,
134 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
135 );
136
137 //
138 // Function prototypes for the ServiceBinding Protocol
139 //
140
141 /**
142 Creates a child handle with a set of I/O services.
143
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.
149
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
152 the child.
153 @retval other The child handle was not created.
154
155 **/
156 EFI_STATUS
157 EFIAPI
158 Ip6ServiceBindingCreateChild (
159 IN EFI_SERVICE_BINDING_PROTOCOL *This,
160 IN EFI_HANDLE *ChildHandle
161 );
162
163 /**
164 Destroys a child handle with a set of I/O services.
165
166 @param[in] This Protocol instance pointer.
167 @param[in] ChildHandle Handle of the child to destroy.
168
169 @retval EFI_SUCCESS The I/O services were removed from the child
170 handle.
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.
177
178 **/
179 EFI_STATUS
180 EFIAPI
181 Ip6ServiceBindingDestroyChild (
182 IN EFI_SERVICE_BINDING_PROTOCOL *This,
183 IN EFI_HANDLE ChildHandle
184 );
185
186 #endif