]>
Commit | Line | Data |
---|---|---|
83cbd279 | 1 | /** @file\r |
2 | \r | |
3e8c18da | 3 | Copyright (c) 2005 - 2007, Intel Corporation.<BR>\r |
83cbd279 | 4 | All rights reserved. This program and the accompanying materials\r |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
83cbd279 | 12 | **/\r |
13 | \r | |
14 | #ifndef __EFI_IP4_DRIVER_H__\r | |
15 | #define __EFI_IP4_DRIVER_H__\r | |
16 | \r | |
17 | #include <Protocol/ServiceBinding.h>\r | |
18 | \r | |
19 | extern EFI_DRIVER_BINDING_PROTOCOL gIp4DriverBinding;\r | |
20 | extern EFI_COMPONENT_NAME_PROTOCOL gIp4ComponentName;\r | |
21 | extern EFI_COMPONENT_NAME2_PROTOCOL gIp4ComponentName2;\r | |
22 | \r | |
23 | //\r | |
24 | // Function prototype for the driver's entry point\r | |
25 | //\r | |
2ff29212 | 26 | /**\r |
27 | This is the declaration of an EFI image entry point. This entry point is\r | |
28 | the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r | |
29 | both device drivers and bus drivers.\r | |
30 | \r | |
31 | The entry point for IP4 driver which install the driver\r | |
32 | binding and component name protocol on its image.\r | |
33 | \r | |
3e8c18da | 34 | @param[in] ImageHandle The firmware allocated handle for the UEFI image.\r |
35 | @param[in] SystemTable A pointer to the EFI System Table.\r | |
2ff29212 | 36 | \r |
37 | @retval EFI_SUCCESS The operation completed successfully.\r | |
38 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
39 | \r | |
40 | **/\r | |
83cbd279 | 41 | EFI_STATUS\r |
42 | EFIAPI\r | |
43 | Ip4DriverEntryPoint (\r | |
44 | IN EFI_HANDLE ImageHandle,\r | |
45 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
46 | );\r | |
47 | \r | |
48 | //\r | |
49 | // Function prototypes for the Drivr Binding Protocol\r | |
50 | //\r | |
2ff29212 | 51 | /**\r |
52 | Test to see if this driver supports ControllerHandle. This service\r | |
53 | is called by the EFI boot service ConnectController(). In\r | |
54 | order to make drivers as small as possible, there are a few calling\r | |
55 | restrictions for this service. ConnectController() must\r | |
56 | follow these calling restrictions. If any other agent wishes to call\r | |
57 | Supported() it must also follow these calling restrictions.\r | |
58 | \r | |
3e8c18da | 59 | @param[in] This Protocol instance pointer.\r |
60 | @param[in] ControllerHandle Handle of device to test\r | |
61 | @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r | |
62 | device to start.\r | |
2ff29212 | 63 | \r |
64 | @retval EFI_SUCCESS This driver supports this device\r | |
65 | @retval EFI_ALREADY_STARTED This driver is already running on this device\r | |
66 | @retval other This driver does not support this device\r | |
67 | \r | |
68 | **/\r | |
83cbd279 | 69 | EFI_STATUS\r |
70 | EFIAPI\r | |
71 | Ip4DriverBindingSupported (\r | |
2ff29212 | 72 | IN EFI_DRIVER_BINDING_PROTOCOL * This,\r |
83cbd279 | 73 | IN EFI_HANDLE ControllerHandle,\r |
2ff29212 | 74 | IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL\r |
83cbd279 | 75 | );\r |
76 | \r | |
2ff29212 | 77 | /**\r |
78 | Start this driver on ControllerHandle. This service is called by the\r | |
79 | EFI boot service ConnectController(). In order to make\r | |
80 | drivers as small as possible, there are a few calling restrictions for\r | |
81 | this service. ConnectController() must follow these\r | |
82 | calling restrictions. If any other agent wishes to call Start() it\r | |
83 | must also follow these calling restrictions.\r | |
84 | \r | |
3e8c18da | 85 | @param[in] This Protocol instance pointer.\r |
86 | @param[in] ControllerHandle Handle of device to bind driver to\r | |
87 | @param[in] RemainingDevicePath Optional parameter use to pick a specific child\r | |
88 | device to start.\r | |
2ff29212 | 89 | \r |
90 | @retval EFI_SUCCESS This driver is added to ControllerHandle\r | |
91 | @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r | |
92 | @retval other This driver does not support this device\r | |
93 | \r | |
94 | **/\r | |
83cbd279 | 95 | EFI_STATUS\r |
96 | EFIAPI\r | |
97 | Ip4DriverBindingStart (\r | |
2ff29212 | 98 | IN EFI_DRIVER_BINDING_PROTOCOL * This,\r |
83cbd279 | 99 | IN EFI_HANDLE ControllerHandle,\r |
2ff29212 | 100 | IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL\r |
83cbd279 | 101 | );\r |
102 | \r | |
2ff29212 | 103 | /**\r |
104 | Stop this driver on ControllerHandle. This service is called by the\r | |
105 | EFI boot service DisconnectController(). In order to\r | |
106 | make drivers as small as possible, there are a few calling\r | |
107 | restrictions for this service. DisconnectController()\r | |
108 | must follow these calling restrictions. If any other agent wishes\r | |
109 | to call Stop() it must also follow these calling restrictions.\r | |
110 | \r | |
3e8c18da | 111 | @param[in] This Protocol instance pointer.\r |
112 | @param[in] ControllerHandle Handle of device to stop driver on\r | |
113 | @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number\r | |
114 | of children is zero stop the entire bus driver.\r | |
115 | @param[in] ChildHandleBuffer List of Child Handles to Stop.\r | |
2ff29212 | 116 | \r |
3e8c18da | 117 | @retval EFI_SUCCESS This driver is removed ControllerHandle\r |
118 | @retval other This driver was not removed from this device\r | |
2ff29212 | 119 | \r |
120 | **/\r | |
83cbd279 | 121 | EFI_STATUS\r |
122 | EFIAPI\r | |
123 | Ip4DriverBindingStop (\r | |
124 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
125 | IN EFI_HANDLE ControllerHandle,\r | |
126 | IN UINTN NumberOfChildren,\r | |
127 | IN EFI_HANDLE *ChildHandleBuffer\r | |
128 | );\r | |
129 | \r | |
130 | //\r | |
131 | // Function ptototypes for the ServiceBinding Prococol\r | |
132 | //\r | |
2ff29212 | 133 | /**\r |
3e8c18da | 134 | Creates a child handle and installs a protocol.\r |
135 | \r | |
136 | The CreateChild() function installs a protocol on ChildHandle. \r | |
137 | If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r | |
138 | If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r | |
2ff29212 | 139 | \r |
3e8c18da | 140 | @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r |
141 | @param ChildHandle Pointer to the handle of the child to create. If it is NULL,\r | |
142 | then a new handle is created. If it is a pointer to an existing UEFI handle, \r | |
143 | then the protocol is added to the existing UEFI handle.\r | |
2ff29212 | 144 | \r |
3e8c18da | 145 | @retval EFI_SUCCES The protocol was added to ChildHandle.\r |
2ff29212 | 146 | @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r |
147 | @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r | |
148 | the child\r | |
149 | @retval other The child handle was not created\r | |
150 | \r | |
151 | **/\r | |
83cbd279 | 152 | EFI_STATUS\r |
153 | EFIAPI\r | |
154 | Ip4ServiceBindingCreateChild (\r | |
155 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
2ff29212 | 156 | IN OUT EFI_HANDLE *ChildHandle\r |
83cbd279 | 157 | );\r |
158 | \r | |
2ff29212 | 159 | /**\r |
3e8c18da | 160 | Destroys a child handle with a protocol installed on it.\r |
161 | \r | |
162 | The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r | |
163 | that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r | |
164 | last protocol on ChildHandle, then ChildHandle is destroyed.\r | |
2ff29212 | 165 | \r |
3e8c18da | 166 | @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r |
2ff29212 | 167 | @param ChildHandle Handle of the child to destroy\r |
168 | \r | |
3e8c18da | 169 | @retval EFI_SUCCES The protocol was removed from ChildHandle.\r |
170 | @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r | |
171 | @retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.\r | |
172 | @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r | |
173 | because its services are being used.\r | |
2ff29212 | 174 | @retval other The child handle was not destroyed\r |
175 | \r | |
176 | **/\r | |
83cbd279 | 177 | EFI_STATUS\r |
178 | EFIAPI\r | |
179 | Ip4ServiceBindingDestroyChild (\r | |
180 | IN EFI_SERVICE_BINDING_PROTOCOL *This,\r | |
181 | IN EFI_HANDLE ChildHandle\r | |
182 | );\r | |
183 | #endif\r |