3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 #ifndef _PLAT_DRI_OVER_H_
22 #define _PLAT_DRI_OVER_H_
26 #include <Protocol/FirmwareVolume2.h>
27 #include <Protocol/LoadedImage.h>
28 #include <Protocol/PlatformDriverOverride.h>
29 #include <Protocol/DevicePath.h>
30 #include <Protocol/DriverBinding.h>
31 #include <Protocol/BusSpecificDriverOverride.h>
33 #include <Library/BaseLib.h>
34 #include <Library/DebugLib.h>
35 #include <Library/BaseMemoryLib.h>
36 #include <Library/PrintLib.h>
37 #include <Library/UefiRuntimeServicesTableLib.h>
38 #include <Library/UefiBootServicesTableLib.h>
39 #include <Library/UefiLib.h>
40 #include <Library/DevicePathLib.h>
41 #include <Library/MemoryAllocationLib.h>
42 #include <Library/DxeServicesTableLib.h>
43 #include <Library/PlatDriOverLib.h>
45 #include <Guid/OverrideVariable.h>
48 #define PLATFORM_OVERRIDE_ITEM_SIGNATURE EFI_SIGNATURE_32('p','d','o','i')
49 typedef struct _PLATFORM_OVERRIDE_ITEM
{
53 EFI_DEVICE_PATH_PROTOCOL
*ControllerDevicePath
;
54 LIST_ENTRY DriverInfoList
; //DRIVER_IMAGE_INFO List
55 EFI_HANDLE LastReturnedImageHandle
;
56 } PLATFORM_OVERRIDE_ITEM
;
58 #define DRIVER_IMAGE_INFO_SIGNATURE EFI_SIGNATURE_32('p','d','i','i')
59 typedef struct _DRIVER_IMAGE_INFO
{
62 EFI_HANDLE ImageHandle
;
63 EFI_DEVICE_PATH_PROTOCOL
*DriverImagePath
;
68 #define DEVICE_PATH_STACK_ITEM_SIGNATURE EFI_SIGNATURE_32('d','p','s','i')
69 typedef struct _DEVICE_PATH_STACK_ITEM
{
72 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
73 } DEVICE_PATH_STACK_ITEM
;
78 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
84 OUT EFI_DEVICE_PATH_PROTOCOL
**DevicePath
90 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
95 UpdateFvFileDevicePath (
96 IN OUT EFI_DEVICE_PATH_PROTOCOL
** DevicePath
,
97 IN EFI_GUID
*FileGuid
,
98 IN EFI_HANDLE CallerImageHandle
104 IN EFI_GUID
*VendorGuid
,
105 OUT UINTN
*VariableSize
110 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePathToConnect
114 BdsConnectDeviceByPciClassType (