VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/XenBusDxe/DriverBinding.h@ 98412

Last change on this file since 98412 was 85718, checked in by vboxsync, 4 years ago

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

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