MdeModulePkg/PciBus: Correct typos
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciDriverOverride.h
CommitLineData
9060e3ec 1/** @file\r
fcdfcdbf 2 Functions declaration for Bus Specific Driver Override protocol.\r
9060e3ec 3\r
fcdfcdbf 4Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
cd5ebaa0 5This program and the accompanying materials\r
9060e3ec 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15\r
16#ifndef _EFI_PCI_DRIVER_OVERRRIDE_H_\r
17#define _EFI_PCI_DRIVER_OVERRRIDE_H_\r
18\r
19#define DRIVER_OVERRIDE_SIGNATURE SIGNATURE_32 ('d', 'r', 'o', 'v')\r
20\r
21//\r
22// PCI driver override driver image list\r
23//\r
24typedef struct {\r
b5cbef4e
RN
25 UINT32 Signature;\r
26 LIST_ENTRY Link;\r
27 EFI_HANDLE DriverImageHandle;\r
28 EFI_DEVICE_PATH_PROTOCOL *DriverImagePath;\r
9060e3ec 29} PCI_DRIVER_OVERRIDE_LIST;\r
30\r
31\r
32#define DRIVER_OVERRIDE_FROM_LINK(a) \\r
33 CR (a, PCI_DRIVER_OVERRIDE_LIST, Link, DRIVER_OVERRIDE_SIGNATURE)\r
34\r
35/**\r
36 Initializes a PCI Driver Override Instance.\r
37\r
38 @param PciIoDevice PCI Device instance.\r
39\r
40**/\r
41VOID\r
42InitializePciDriverOverrideInstance (\r
43 IN OUT PCI_IO_DEVICE *PciIoDevice\r
44 );\r
45\r
46/**\r
47 Add an overriding driver image.\r
48\r
49 @param PciIoDevice Instance of PciIo device.\r
b5cbef4e
RN
50 @param DriverImageHandle Image handle of newly added driver image.\r
51 @param DriverImagePath Device path of newly added driver image.\r
9060e3ec 52\r
53 @retval EFI_SUCCESS Successfully added driver.\r
54 @retval EFI_OUT_OF_RESOURCES No memory resource for new driver instance.\r
55 @retval other Some error occurred when locating gEfiLoadedImageProtocolGuid.\r
56\r
57**/\r
58EFI_STATUS\r
59AddDriver (\r
b5cbef4e
RN
60 IN PCI_IO_DEVICE *PciIoDevice,\r
61 IN EFI_HANDLE DriverImageHandle,\r
62 IN EFI_DEVICE_PATH_PROTOCOL *DriverImagePath\r
9060e3ec 63 );\r
64\r
65\r
66/**\r
67 Uses a bus specific algorithm to retrieve a driver image handle for a controller.\r
68\r
69 @param This A pointer to the EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL instance.\r
70 @param DriverImageHandle On input, a pointer to the previous driver image handle returned\r
71 by GetDriver(). On output, a pointer to the next driver\r
72 image handle. Passing in a NULL, will return the first driver\r
73 image handle.\r
74\r
75 @retval EFI_SUCCESS A bus specific override driver is returned in DriverImageHandle.\r
76 @retval EFI_NOT_FOUND The end of the list of override drivers was reached.\r
77 A bus specific override driver is not returned in DriverImageHandle.\r
78 @retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a\r
79 previous call to GetDriver().\r
80\r
81**/\r
82EFI_STATUS\r
83EFIAPI\r
84GetDriver (\r
85 IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This,\r
86 IN OUT EFI_HANDLE *DriverImageHandle\r
87 );\r
88\r
89#endif\r