]>
Commit | Line | Data |
---|---|---|
a3bcde70 HT |
1 | /** @file\r |
2 | Driver Binding functions and Service Binding functions for the Network driver module.\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 _UDP6_DRIVER_H_\r | |
11 | #define _UDP6_DRIVER_H_\r | |
12 | \r | |
13 | #include <Protocol/DriverBinding.h>\r | |
14 | #include <Protocol/ServiceBinding.h>\r | |
15 | #include <Protocol/DevicePath.h>\r | |
16 | \r | |
17 | /**\r | |
18 | Tests to see if this driver supports a given controller. If a child device is provided,\r | |
19 | it further tests to see if this driver supports creating a handle for the specified child device.\r | |
20 | \r | |
21 | This function checks to see if the driver specified by This supports the device specified by\r | |
22 | ControllerHandle. Drivers typically use the device path attached to\r | |
23 | ControllerHandle and/or the services from the bus I/O abstraction attached to\r | |
24 | ControllerHandle to determine if the driver supports ControllerHandle. This function\r | |
25 | may be called many times during platform initialization. In order to reduce boot times, the tests\r | |
26 | performed by this function must be very small, and take as little time as possible to execute. This\r | |
27 | function must not change the state of any hardware devices, and this function must be aware that the\r | |
28 | device specified by ControllerHandle may already be managed by the same driver or a\r | |
29 | different driver. This function must match its calls to AllocatePages() with FreePages(),\r | |
30 | AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r | |
31 | Since ControllerHandle may have been previously started by the same driver, if a protocol is\r | |
32 | already in the opened state, then it must not be closed with CloseProtocol(). This is required\r | |
33 | to guarantee the state of ControllerHandle is not modified by this function.\r | |
34 | \r | |
35 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
36 | @param[in] ControllerHandle The handle of the controller to test. This handle\r | |
37 | must support a protocol interface that supplies\r | |
38 | an I/O abstraction to the driver.\r | |
39 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r | |
40 | parameter is ignored by device drivers, and is optional for bus\r | |
41 | drivers. For bus drivers, if this parameter is not NULL, then\r | |
42 | the bus driver must determine if the bus controller specified\r | |
43 | by ControllerHandle and the child controller specified\r | |
44 | by RemainingDevicePath are both supported by this\r | |
45 | bus driver.\r | |
46 | \r | |
47 | @retval EFI_SUCCESS The device specified by ControllerHandle and\r | |
48 | RemainingDevicePath is supported by the driver specified by This.\r | |
49 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r | |
50 | RemainingDevicePath is already being managed by the driver\r | |
51 | specified by This.\r | |
52 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r | |
53 | RemainingDevicePath is already being managed by a different\r | |
54 | driver or an application that requires exclusive access.\r | |
55 | Currently not implemented.\r | |
56 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r | |
57 | RemainingDevicePath is not supported by the driver specified by This.\r | |
58 | **/\r | |
59 | EFI_STATUS\r | |
60 | EFIAPI\r | |
61 | Udp6DriverBindingSupported (\r | |
62 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
63 | IN EFI_HANDLE ControllerHandle,\r | |
64 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
65 | );\r | |
66 | \r | |
67 | /**\r | |
68 | Start this driver on ControllerHandle.\r | |
69 | \r | |
70 | This service is called by the EFI boot service ConnectController(). In order to make\r | |
71 | drivers as small as possible, there are a few calling restrictions for\r | |
72 | this service. ConnectController() must follow these\r | |
73 | calling restrictions. If any other agent wishes to call Start() it\r | |
74 | must also follow these calling restrictions.\r | |
75 | \r | |
76 | @param[in] This Protocol instance pointer.\r | |
77 | @param[in] ControllerHandle Handle of device to bind a driver to.\r | |
78 | @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r | |
79 | device to start.\r | |
80 | \r | |
ff821675 | 81 | @retval EFI_SUCCESS This driver is added to ControllerHandle.\r |
a3bcde70 HT |
82 | @retval EFI_OUT_OF_RESOURCES The required system resource can't be allocated.\r |
83 | @retval other This driver does not support this device.\r | |
84 | \r | |
85 | **/\r | |
86 | EFI_STATUS\r | |
87 | EFIAPI\r | |
88 | Udp6DriverBindingStart (\r | |
89 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
90 | IN EFI_HANDLE ControllerHandle,\r | |
91 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
92 | );\r | |
93 | \r | |
94 | /**\r | |
95 | Stop this driver on ControllerHandle.\r | |
96 | \r | |
97 | This service is called by the EFI boot service DisconnectController(). In order to\r | |
98 | make drivers as small as possible, there are a few calling\r | |
99 | restrictions for this service. DisconnectController()\r | |
100 | must follow these calling restrictions. If any other agent wishes\r | |
101 | to call Stop(), it must also follow these calling restrictions.\r | |
102 | \r | |
103 | @param[in] This Protocol instance pointer.\r | |
104 | @param[in] ControllerHandle Handle of device to stop the driver on.\r | |
105 | @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number\r | |
106 | of children is zero, stop the entire bus driver.\r | |
107 | @param[in] ChildHandleBuffer List of Child Handles to Stop. It is optional.\r | |
108 | \r | |
109 | @retval EFI_SUCCESS This driver removed ControllerHandle.\r | |
110 | @retval EFI_DEVICE_ERROR Can't find the NicHandle from the ControllerHandle and specified GUID.\r | |
111 | @retval other This driver was not removed from this device.\r | |
112 | \r | |
113 | **/\r | |
114 | EFI_STATUS\r | |
115 | EFIAPI\r | |
116 | Udp6DriverBindingStop (\r | |
117 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
118 | IN EFI_HANDLE ControllerHandle,\r | |
119 | IN UINTN NumberOfChildren,\r | |
120 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r | |
121 | );\r | |
122 | \r | |
123 | /**\r | |
124 | Creates a child handle and installs a protocol.\r | |
125 | \r | |
126 | The CreateChild() function installs a protocol on ChildHandle.\r | |
127 | If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r | |
128 | If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r | |
129 | \r | |
130 | @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r | |
131 | @param[in, out] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r | |
132 | then a new handle is created. If it is a pointer to an existing UEFI handle,\r | |
133 | then the protocol is added to the existing UEFI handle.\r | |
134 | \r | |
ff821675 | 135 | @retval EFI_SUCCESS The protocol was added to ChildHandle.\r |
a3bcde70 | 136 | @retval EFI_INVALID_PARAMETER This is NULL or ChildHandle is NULL.\r |
c2adf51f | 137 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r |
a3bcde70 HT |
138 | the child.\r |
139 | @retval other The child handle was not created.\r | |
140 | \r | |
141 | **/\r | |
142 | EFI_STATUS\r | |
143 | EFIAPI\r | |
144 | Udp6ServiceBindingCreateChild (\r | |
145 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
146 | IN OUT EFI_HANDLE *ChildHandle\r | |
147 | );\r | |
148 | \r | |
149 | /**\r | |
150 | Destroys a child handle with a set of I/O services.\r | |
151 | The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r | |
152 | that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r | |
153 | last protocol on ChildHandle, then ChildHandle is destroyed.\r | |
154 | \r | |
155 | @param[in] This Protocol instance pointer.\r | |
156 | @param[in] ChildHandle Handle of the child to destroy.\r | |
157 | \r | |
ff821675 | 158 | @retval EFI_SUCCESS The I/O services were removed from the child\r |
a3bcde70 HT |
159 | handle.\r |
160 | @retval EFI_UNSUPPORTED The child handle does not support the I/O services\r | |
161 | that are being removed.\r | |
15ee13fc | 162 | @retval EFI_INVALID_PARAMETER Child handle is NULL.\r |
a3bcde70 HT |
163 | @retval EFI_ACCESS_DENIED The child handle could not be destroyed because\r |
164 | its I/O services are being used.\r | |
165 | @retval other The child handle was not destroyed.\r | |
166 | \r | |
167 | **/\r | |
168 | EFI_STATUS\r | |
169 | EFIAPI\r | |
170 | Udp6ServiceBindingDestroyChild (\r | |
171 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
172 | IN EFI_HANDLE ChildHandle\r | |
173 | );\r | |
174 | \r | |
175 | #endif\r |