]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOver.h
Port PlatformDriOverrideDxe into R9.
[mirror_edk2.git] / MdeModulePkg / Library / DxePlatDriOverLib / PlatDriOver.h
CommitLineData
b290614d 1/** @file
2
3Copyright (c) 2007, Intel Corporation
4All rights reserved. This program and the accompanying materials
5are licensed and made available under the terms and conditions of the BSD License
6which accompanies this distribution. The full text of the license may be found at
7http://opensource.org/licenses/bsd-license.php
8
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12Module Name:
13
14 PlatDriOver.h
15
16Abstract:
17
18
19**/
20
21#ifndef _PLAT_DRI_OVER_H_
22#define _PLAT_DRI_OVER_H_
23
24#include <PiDxe.h>
25
26#include <Protocol/FirmwareVolume2.h>\r
27#include <Protocol/LoadedImage.h>\r
28#include <Protocol/PlatformDriverOverride.h>\r
29#include <Protocol/DevicePath.h>\r
30#include <Protocol/DriverBinding.h>\r
31#include <Protocol/BusSpecificDriverOverride.h>\r
32\r
33#include <Library/BaseLib.h>\r
34#include <Library/DebugLib.h>\r
35#include <Library/BaseMemoryLib.h>\r
36#include <Library/PrintLib.h>\r
37#include <Library/UefiRuntimeServicesTableLib.h>\r
38#include <Library/UefiBootServicesTableLib.h>\r
39#include <Library/UefiLib.h>\r
40#include <Library/DevicePathLib.h>\r
41#include <Library/MemoryAllocationLib.h>\r
42#include <Library/DxeServicesTableLib.h>
43#include <Library/PlatDriOverLib.h>\r
44
45#include <Guid/OverrideVariable.h>
46
47
48#define PLATFORM_OVERRIDE_ITEM_SIGNATURE EFI_SIGNATURE_32('p','d','o','i')
49 typedef struct _PLATFORM_OVERRIDE_ITEM{
50 UINTN Signature;
51 LIST_ENTRY Link;
52 UINT32 DriverInfoNum;
53 EFI_DEVICE_PATH_PROTOCOL *ControllerDevicePath;
54 LIST_ENTRY DriverInfoList; //DRIVER_IMAGE_INFO List
55 EFI_HANDLE LastReturnedImageHandle;
56} PLATFORM_OVERRIDE_ITEM;
57
58#define DRIVER_IMAGE_INFO_SIGNATURE EFI_SIGNATURE_32('p','d','i','i')
59typedef struct _DRIVER_IMAGE_INFO{
60 UINTN Signature;
61 LIST_ENTRY Link;
62 EFI_HANDLE ImageHandle;
63 EFI_DEVICE_PATH_PROTOCOL *DriverImagePath;
64 BOOLEAN UnLoadable;
65 BOOLEAN UnStartable;
66} DRIVER_IMAGE_INFO;
67
68#define DEVICE_PATH_STACK_ITEM_SIGNATURE EFI_SIGNATURE_32('d','p','s','i')
69typedef struct _DEVICE_PATH_STACK_ITEM{
70 UINTN Signature;
71 LIST_ENTRY Link;
72 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
73} DEVICE_PATH_STACK_ITEM;
74
75EFI_STATUS
76EFIAPI
77PushDevPathStack (
78 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
79 );
80
81EFI_STATUS
82EFIAPI
83PopDevPathStack (
84 OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
85 );
86
87BOOLEAN
88EFIAPI
89CheckExistInStack (
90 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
91 );
92
93EFI_STATUS
94EFIAPI
95UpdateFvFileDevicePath (
96 IN OUT EFI_DEVICE_PATH_PROTOCOL ** DevicePath,
97 IN EFI_GUID *FileGuid,
98 IN EFI_HANDLE CallerImageHandle
99 );
100
101VOID *
102GetVariableAndSize (
103 IN CHAR16 *Name,
104 IN EFI_GUID *VendorGuid,
105 OUT UINTN *VariableSize
106 );
107
108EFI_STATUS
109ConnectDevicePath (
110 IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect
111 );
112
113EFI_STATUS
114BdsConnectDeviceByPciClassType (
115 UINT8 ClassType,
116 UINT8 SubClassCode,
117 UINT8 PI,
118 BOOLEAN Recursive
119 );
120
121#endif