]>
Commit | Line | Data |
---|---|---|
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 | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | /**\r | |
17 | Tests to see if this driver supports a given controller. If a child device is provided,\r | |
18 | it further tests to see if this driver supports creating a handle for the specified child device.\r | |
19 | \r | |
20 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
21 | @param[in] ControllerHandle The handle of the controller to test. This handle\r | |
22 | must support a protocol interface that supplies\r | |
23 | an I/O abstraction to the driver.\r | |
24 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r | |
25 | parameter is ignored by device drivers, and is optional for bus\r | |
26 | drivers. For bus drivers, if this parameter is not NULL, then\r | |
27 | the bus driver must determine if the bus controller specified\r | |
28 | by ControllerHandle and the child controller specified\r | |
29 | by RemainingDevicePath are both supported by this\r | |
30 | bus driver.\r | |
31 | \r | |
32 | @retval EFI_SUCCESS The device specified by ControllerHandle and\r | |
33 | RemainingDevicePath is supported by the driver specified by This.\r | |
34 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r | |
35 | RemainingDevicePath is already being managed by the driver\r | |
36 | specified by This.\r | |
37 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r | |
38 | RemainingDevicePath is already being managed by a different\r | |
39 | driver or an application that requires exclusive access.\r | |
40 | Currently not implemented.\r | |
41 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r | |
42 | RemainingDevicePath is not supported by the driver specified by This.\r | |
43 | **/\r | |
44 | EFI_STATUS\r | |
45 | EFIAPI\r | |
46 | XenBusDxeDriverBindingSupported (\r | |
47 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
48 | IN EFI_HANDLE ControllerHandle,\r | |
49 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
50 | );\r | |
51 | \r | |
52 | /**\r | |
53 | Starts a device controller or a bus controller.\r | |
54 | \r | |
55 | The Start() function is designed to be invoked from the EFI boot service ConnectController().\r | |
56 | As a result, much of the error checking on the parameters to Start() has been moved into this\r | |
57 | common boot service. It is legal to call Start() from other locations,\r | |
58 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
59 | 1. ControllerHandle must be a valid EFI_HANDLE.\r | |
60 | 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r | |
61 | EFI_DEVICE_PATH_PROTOCOL.\r | |
62 | 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r | |
63 | have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r | |
64 | \r | |
65 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
66 | @param[in] ControllerHandle The handle of the controller to start. This handle\r | |
67 | must support a protocol interface that supplies\r | |
68 | an I/O abstraction to the driver.\r | |
69 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r | |
70 | parameter is ignored by device drivers, and is optional for bus\r | |
71 | drivers. For a bus driver, if this parameter is NULL, then handles\r | |
72 | for all the children of Controller are created by this driver.\r | |
73 | If this parameter is not NULL and the first Device Path Node is\r | |
74 | not the End of Device Path Node, then only the handle for the\r | |
75 | child device specified by the first Device Path Node of\r | |
76 | RemainingDevicePath is created by this driver.\r | |
77 | If the first Device Path Node of RemainingDevicePath is\r | |
78 | the End of Device Path Node, no child handle is created by this\r | |
79 | driver.\r | |
80 | \r | |
81 | @retval EFI_SUCCESS The device was started.\r | |
82 | @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r | |
83 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
84 | @retval Others The driver failded to start the device.\r | |
85 | \r | |
86 | **/\r | |
87 | EFI_STATUS\r | |
88 | EFIAPI\r | |
89 | XenBusDxeDriverBindingStart (\r | |
90 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
91 | IN EFI_HANDLE ControllerHandle,\r | |
92 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
93 | );\r | |
94 | \r | |
95 | /**\r | |
96 | Stops a device controller or a bus controller.\r | |
97 | \r | |
98 | The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r | |
99 | As a result, much of the error checking on the parameters to Stop() has been moved\r | |
100 | into this common boot service. It is legal to call Stop() from other locations,\r | |
101 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
102 | 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r | |
103 | same driver's Start() function.\r | |
104 | 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r | |
105 | EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r | |
106 | Start() function, and the Start() function must have called OpenProtocol() on\r | |
107 | ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r | |
108 | \r | |
109 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
110 | @param[in] ControllerHandle A handle to the device being stopped. The handle must\r | |
111 | support a bus specific I/O protocol for the driver\r | |
112 | to use to stop the device.\r | |
113 | @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r | |
114 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL\r | |
115 | if NumberOfChildren is 0.\r | |
116 | \r | |
117 | @retval EFI_SUCCESS The device was stopped.\r | |
118 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r | |
119 | \r | |
120 | **/\r | |
121 | EFI_STATUS\r | |
122 | EFIAPI\r | |
123 | XenBusDxeDriverBindingStop (\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 OPTIONAL\r | |
128 | );\r |