]> git.proxmox.com Git - mirror_edk2.git/blob - NetworkPkg/Mtftp6Dxe/Mtftp6Driver.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / NetworkPkg / Mtftp6Dxe / Mtftp6Driver.h
1 /** @file
2 Driver Binding functions and Service Binding functions
3 declaration for Mtftp6 Driver.
4
5 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef __EFI_MTFTP6_DRIVER_H__
12 #define __EFI_MTFTP6_DRIVER_H__
13
14 #include <Protocol/ServiceBinding.h>
15
16 extern EFI_COMPONENT_NAME_PROTOCOL gMtftp6ComponentName;
17 extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp6ComponentName2;
18 extern EFI_UNICODE_STRING_TABLE *gMtftp6ControllerNameTable;
19
20 /**
21 Test to see if this driver supports Controller. This service
22 is called by the EFI boot service ConnectController(). In
23 order to make drivers as small as possible, there are a few calling
24 restrictions for this service. ConnectController() must
25 follow these calling restrictions. If any other agent wishes to call
26 Supported(), it must also follow these calling restrictions.
27
28 @param[in] This Protocol instance pointer.
29 @param[in] Controller Handle of device to test.
30 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
31 device to start.
32
33 @retval EFI_SUCCESS This driver supports this device.
34 @retval Others This driver does not support this device.
35
36 **/
37 EFI_STATUS
38 EFIAPI
39 Mtftp6DriverBindingSupported (
40 IN EFI_DRIVER_BINDING_PROTOCOL *This,
41 IN EFI_HANDLE Controller,
42 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
43 );
44
45 /**
46 Start this driver on Controller. This service is called by the
47 EFI boot service ConnectController(). In order to make
48 drivers as small as possible, there are calling restrictions for
49 this service. ConnectController() must follow these
50 calling restrictions. If any other agent wishes to call Start() it
51 must also follow these calling restrictions.
52
53 @param[in] This Protocol instance pointer.
54 @param[in] Controller Handle of device to bind driver to.
55 @param[in] RemainingDevicePath Optional parameter use to pick a specific child
56 device to start.
57
58 @retval EFI_SUCCESS This driver is added to Controller.
59 @retval EFI_ALREADY_STARTED This driver is already running on Controller.
60 @retval Others This driver does not support this device.
61
62 **/
63 EFI_STATUS
64 EFIAPI
65 Mtftp6DriverBindingStart (
66 IN EFI_DRIVER_BINDING_PROTOCOL *This,
67 IN EFI_HANDLE Controller,
68 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
69 );
70
71 /**
72 Stop this driver on Controller. This service is called by the
73 EFI boot service DisconnectController(). In order to
74 make drivers as small as possible, there are calling
75 restrictions for this service. DisconnectController()
76 must follow these calling restrictions. If any other agent wishes
77 to call Stop(), it must also follow these calling restrictions.
78
79 @param[in] This Protocol instance pointer.
80 @param[in] Controller Handle of device to stop driver on
81 @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
82 children is zero, stop the entire bus driver.
83 @param[in] ChildHandleBuffer List of Child Handles to Stop.
84
85 @retval EFI_SUCCESS This driver is removed Controller.
86 @retval EFI_DEVICE_ERROR An unexpected error.
87 @retval Others This driver was not removed from this device.
88
89 **/
90 EFI_STATUS
91 EFIAPI
92 Mtftp6DriverBindingStop (
93 IN EFI_DRIVER_BINDING_PROTOCOL *This,
94 IN EFI_HANDLE Controller,
95 IN UINTN NumberOfChildren,
96 IN EFI_HANDLE *ChildHandleBuffer
97 );
98
99 /**
100 Creates a child handle and installs a protocol.
101
102 The CreateChild() function installs a protocol on ChildHandle.
103 If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
104 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
105
106 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
107 @param[in, out] ChildHandle Pointer to the handle of the child to create. If it is NULL,
108 then a new handle is created. If it is a pointer to an existing
109 UEFI handle, then the protocol is added to the existing UEFI handle.
110
111 @retval EFI_SUCCESS The protocol was added to ChildHandle.
112 @retval EFI_INVALID_PARAMETER ChildHandle is NULL.
113 @retval Others The child handle was not created.
114
115 **/
116 EFI_STATUS
117 EFIAPI
118 Mtftp6ServiceBindingCreateChild (
119 IN EFI_SERVICE_BINDING_PROTOCOL *This,
120 IN OUT EFI_HANDLE *ChildHandle
121 );
122
123 /**
124 Destroys a child handle with a protocol installed on it.
125
126 The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
127 that was installed by CreateChild() from ChildHandle. If the removed protocol is the
128 last protocol on ChildHandle, then ChildHandle is destroyed.
129
130 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
131 @param[in] ChildHandle Handle of the child to destroy.
132
133 @retval EFI_SUCCESS The protocol was removed from ChildHandle.
134 @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
135 @retval EFI_INVALID_PARAMETER Child handle is NULL.
136 @retval Others The child handle was not destroyed
137
138 **/
139 EFI_STATUS
140 EFIAPI
141 Mtftp6ServiceBindingDestroyChild (
142 IN EFI_SERVICE_BINDING_PROTOCOL *This,
143 IN EFI_HANDLE ChildHandle
144 );
145
146 #endif