VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/Ip4Dxe/Ip4Driver.h@ 80721

Last change on this file since 80721 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette