]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/XenBusDxe/DriverBinding.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / XenBusDxe / DriverBinding.h
CommitLineData
e65e8802
AP
1/** @file\r
2 Driver Binding functions declaration for XenBus Bus driver.\r
3\r
4 Copyright (C) 2014, Citrix Ltd.\r
5\r
b26f0cf9 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
e65e8802
AP
7\r
8**/\r
9\r
10/**\r
11 Tests to see if this driver supports a given controller. If a child device is provided,\r
12 it further tests to see if this driver supports creating a handle for the specified child device.\r
13\r
14 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
15 @param[in] ControllerHandle The handle of the controller to test. This handle\r
16 must support a protocol interface that supplies\r
17 an I/O abstraction to the driver.\r
18 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r
19 parameter is ignored by device drivers, and is optional for bus\r
20 drivers. For bus drivers, if this parameter is not NULL, then\r
21 the bus driver must determine if the bus controller specified\r
22 by ControllerHandle and the child controller specified\r
23 by RemainingDevicePath are both supported by this\r
24 bus driver.\r
25\r
26 @retval EFI_SUCCESS The device specified by ControllerHandle and\r
27 RemainingDevicePath is supported by the driver specified by This.\r
28 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r
29 RemainingDevicePath is already being managed by the driver\r
30 specified by This.\r
31 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r
32 RemainingDevicePath is already being managed by a different\r
33 driver or an application that requires exclusive access.\r
34 Currently not implemented.\r
35 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r
36 RemainingDevicePath is not supported by the driver specified by This.\r
37**/\r
38EFI_STATUS\r
39EFIAPI\r
40XenBusDxeDriverBindingSupported (\r
41 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
42 IN EFI_HANDLE ControllerHandle,\r
43 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
44 );\r
45\r
46/**\r
47 Starts a device controller or a bus controller.\r
48\r
49 The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
50 As a result, much of the error checking on the parameters to Start() has been moved into this\r
51 common boot service. It is legal to call Start() from other locations,\r
52 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
53 1. ControllerHandle must be a valid EFI_HANDLE.\r
54 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
55 EFI_DEVICE_PATH_PROTOCOL.\r
56 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
57 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
58\r
59 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
60 @param[in] ControllerHandle The handle of the controller to start. This handle\r
61 must support a protocol interface that supplies\r
62 an I/O abstraction to the driver.\r
63 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r
64 parameter is ignored by device drivers, and is optional for bus\r
65 drivers. For a bus driver, if this parameter is NULL, then handles\r
66 for all the children of Controller are created by this driver.\r
67 If this parameter is not NULL and the first Device Path Node is\r
68 not the End of Device Path Node, then only the handle for the\r
69 child device specified by the first Device Path Node of\r
70 RemainingDevicePath is created by this driver.\r
71 If the first Device Path Node of RemainingDevicePath is\r
72 the End of Device Path Node, no child handle is created by this\r
73 driver.\r
74\r
75 @retval EFI_SUCCESS The device was started.\r
76 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
77 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
493dde94 78 @retval Others The driver failed to start the device.\r
e65e8802
AP
79\r
80**/\r
81EFI_STATUS\r
82EFIAPI\r
83XenBusDxeDriverBindingStart (\r
84 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
85 IN EFI_HANDLE ControllerHandle,\r
86 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r
87 );\r
88\r
89/**\r
90 Stops a device controller or a bus controller.\r
91\r
92 The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
93 As a result, much of the error checking on the parameters to Stop() has been moved\r
94 into this common boot service. It is legal to call Stop() from other locations,\r
95 but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
96 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
97 same driver's Start() function.\r
98 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r
99 EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
100 Start() function, and the Start() function must have called OpenProtocol() on\r
101 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
102\r
103 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
104 @param[in] ControllerHandle A handle to the device being stopped. The handle must\r
105 support a bus specific I/O protocol for the driver\r
106 to use to stop the device.\r
107 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r
108 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL\r
109 if NumberOfChildren is 0.\r
110\r
111 @retval EFI_SUCCESS The device was stopped.\r
112 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
113\r
114**/\r
115EFI_STATUS\r
116EFIAPI\r
117XenBusDxeDriverBindingStop (\r
118 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
119 IN EFI_HANDLE ControllerHandle,\r
120 IN UINTN NumberOfChildren,\r
121 IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
122 );\r