]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/Ip6Dxe/Ip6Driver.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Driver.h
CommitLineData
a3bcde70
HT
1/** @file\r
2 The driver binding and service binding protocol for IP6 driver.\r
3\r
c2adf51f 4 Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
a3bcde70 5\r
ecf98fbc 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
a3bcde70
HT
7\r
8**/\r
9\r
10#ifndef __EFI_IP6_DRIVER_H__\r
11#define __EFI_IP6_DRIVER_H__\r
12\r
d1050b9d
MK
13extern EFI_DRIVER_BINDING_PROTOCOL gIp6DriverBinding;\r
14extern EFI_COMPONENT_NAME_PROTOCOL gIp6ComponentName;\r
15extern EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2;\r
16extern EFI_UNICODE_STRING_TABLE *gIp6ControllerNameTable;\r
216f7970 17\r
18typedef struct {\r
d1050b9d
MK
19 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;\r
20 UINTN NumberOfChildren;\r
21 EFI_HANDLE *ChildHandleBuffer;\r
22} IP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r
a3bcde70
HT
23\r
24/**\r
25 Clean up an IP6 service binding instance. It releases all\r
26 the resource allocated by the instance. The instance may be\r
27 partly initialized, or partly destroyed. If a resource is\r
75dce340 28 destroyed, it is marked as that in case the destroy failed and\r
a3bcde70
HT
29 being called again later.\r
30\r
31 @param[in] IpSb The IP6 service binding instance to clean up.\r
32\r
33 @retval EFI_SUCCESS The resource used by the instance are cleaned up.\r
34 @retval Others Failed to clean up some of the resources.\r
35\r
36**/\r
37EFI_STATUS\r
38Ip6CleanService (\r
d1050b9d 39 IN IP6_SERVICE *IpSb\r
a3bcde70
HT
40 );\r
41\r
42//\r
43// Function prototype for the driver's entry point\r
44//\r
45\r
46/**\r
47 This is the declaration of an EFI image entry point. This entry point is\r
48 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r
49 both device drivers and bus drivers.\r
50\r
51 The entry point for IP6 driver which installs the driver\r
52 binding and component name protocol on its image.\r
53\r
54 @param[in] ImageHandle The firmware allocated handle for the UEFI image.\r
55 @param[in] SystemTable A pointer to the EFI System Table.\r
56\r
57 @retval EFI_SUCCESS The operation completed successfully.\r
58 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
59\r
60**/\r
61EFI_STATUS\r
62EFIAPI\r
63Ip6DriverEntryPoint (\r
d1050b9d
MK
64 IN EFI_HANDLE ImageHandle,\r
65 IN EFI_SYSTEM_TABLE *SystemTable\r
a3bcde70
HT
66 );\r
67\r
68//\r
7de8045a 69// Function prototypes for the Driver Binding Protocol\r
a3bcde70
HT
70//\r
71\r
72/**\r
73 Test to see if this driver supports ControllerHandle.\r
74\r
75 @param[in] This Protocol instance pointer.\r
76 @param[in] ControllerHandle Handle of device to test.\r
77 @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r
78 device to start.\r
79\r
80 @retval EFI_SUCCESS This driver supports this device.\r
81 @retval EFI_ALREADY_STARTED This driver is already running on this device.\r
82 @retval other This driver does not support this device.\r
83\r
84**/\r
85EFI_STATUS\r
86EFIAPI\r
87Ip6DriverBindingSupported (\r
88 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
89 IN EFI_HANDLE ControllerHandle,\r
90 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
91 );\r
92\r
93/**\r
94 Start this driver on ControllerHandle.\r
95\r
96 @param[in] This Protocol instance pointer.\r
97 @param[in] ControllerHandle Handle of device to bind driver to.\r
98 @param[in] RemainingDevicePath Optional parameter used to pick a specific child\r
99 device to start.\r
100\r
7de8045a 101 @retval EFI_SUCCESS This driver is added to ControllerHandle.\r
a3bcde70
HT
102 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.\r
103 @retval other This driver does not support this device.\r
104\r
105**/\r
106EFI_STATUS\r
107EFIAPI\r
108Ip6DriverBindingStart (\r
109 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
110 IN EFI_HANDLE ControllerHandle,\r
111 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
112 );\r
113\r
114/**\r
115 Stop this driver on ControllerHandle.\r
116\r
117 @param[in] This Protocol instance pointer.\r
118 @param[in] ControllerHandle Handle of device to stop driver on.\r
119 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number\r
120 of children is zero, stop the entire bus driver.\r
121 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL\r
122 if NumberOfChildren is 0.\r
123\r
124 @retval EFI_SUCCESS The device was stopped.\r
125 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
126\r
127**/\r
128EFI_STATUS\r
129EFIAPI\r
130Ip6DriverBindingStop (\r
131 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
132 IN EFI_HANDLE ControllerHandle,\r
133 IN UINTN NumberOfChildren,\r
134 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
135 );\r
136\r
137//\r
c2adf51f 138// Function prototypes for the ServiceBinding Protocol\r
a3bcde70
HT
139//\r
140\r
141/**\r
142 Creates a child handle with a set of I/O services.\r
143\r
144 @param[in] This Protocol instance pointer.\r
145 @param[in] ChildHandle Pointer to the handle of the child to create. If\r
146 it is NULL, then a new handle is created. If it\r
147 is not NULL, then the I/O services are added to\r
148 the existing child handle.\r
149\r
7de8045a 150 @retval EFI_SUCCESS The child handle was created with the I/O services.\r
c2adf51f 151 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r
a3bcde70
HT
152 the child.\r
153 @retval other The child handle was not created.\r
154\r
155**/\r
156EFI_STATUS\r
157EFIAPI\r
158Ip6ServiceBindingCreateChild (\r
159 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
160 IN EFI_HANDLE *ChildHandle\r
161 );\r
162\r
163/**\r
164 Destroys a child handle with a set of I/O services.\r
165\r
166 @param[in] This Protocol instance pointer.\r
167 @param[in] ChildHandle Handle of the child to destroy.\r
168\r
7de8045a 169 @retval EFI_SUCCESS The I/O services were removed from the child\r
a3bcde70
HT
170 handle.\r
171 @retval EFI_UNSUPPORTED The child handle does not support the I/O services\r
172 that are being removed.\r
15ee13fc 173 @retval EFI_INVALID_PARAMETER Child handle is NULL.\r
a3bcde70
HT
174 @retval EFI_ACCESS_DENIED The child handle could not be destroyed because\r
175 its I/O services are being used.\r
176 @retval other The child handle was not destroyed.\r
177\r
178**/\r
179EFI_STATUS\r
180EFIAPI\r
181Ip6ServiceBindingDestroyChild (\r
182 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
183 IN EFI_HANDLE ChildHandle\r
184 );\r
185\r
186#endif\r