mirror of https://github.com/acidanthera/audk.git
Code Scrub for Pcd, PlatformDriOverride and PlatOverMngr driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6998 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c84507ab52
commit
cebc8d486e
|
@ -439,8 +439,8 @@ CreateStringOpCode (
|
||||||
|
|
||||||
@param ConfigRequest The Config request string. If set to NULL, all the
|
@param ConfigRequest The Config request string. If set to NULL, all the
|
||||||
configurable elements will be extracted from BlockNameArray.
|
configurable elements will be extracted from BlockNameArray.
|
||||||
@param ConfigAltResp The returned <ConfigAltResp>.
|
|
||||||
@param Progress On return, points to a character in the Request.
|
@param Progress On return, points to a character in the Request.
|
||||||
|
@param ConfigAltResp The returned <ConfigAltResp>.
|
||||||
@param Guid GUID of the buffer storage.
|
@param Guid GUID of the buffer storage.
|
||||||
@param Name Name of the buffer storage.
|
@param Name Name of the buffer storage.
|
||||||
@param DriverHandle The DriverHandle which is used to invoke HiiDatabase
|
@param DriverHandle The DriverHandle which is used to invoke HiiDatabase
|
||||||
|
@ -452,7 +452,8 @@ CreateStringOpCode (
|
||||||
The sequential input parameters will be number of
|
The sequential input parameters will be number of
|
||||||
AltCfgId and DefaultValueArray pairs. When set to 0,
|
AltCfgId and DefaultValueArray pairs. When set to 0,
|
||||||
there will be no <AltResp>.
|
there will be no <AltResp>.
|
||||||
|
@param ... Variable argument list.
|
||||||
|
|
||||||
retval EFI_OUT_OF_RESOURCES Run out of memory resource.
|
retval EFI_OUT_OF_RESOURCES Run out of memory resource.
|
||||||
retval EFI_INVALID_PARAMETER ConfigAltResp is NULL.
|
retval EFI_INVALID_PARAMETER ConfigAltResp is NULL.
|
||||||
retval EFI_SUCCESS Operation successful.
|
retval EFI_SUCCESS Operation successful.
|
||||||
|
|
|
@ -660,7 +660,6 @@ NetLibGetMacString (
|
||||||
@param Protocol The protocol type in the IP header.
|
@param Protocol The protocol type in the IP header.
|
||||||
@param UseDefaultAddress Whether this instance is using default address or not.
|
@param UseDefaultAddress Whether this instance is using default address or not.
|
||||||
|
|
||||||
@retval None
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
|
|
@ -163,6 +163,9 @@ Crc32GuidedSectionHandler (
|
||||||
/**
|
/**
|
||||||
Register Crc32 section handler.
|
Register Crc32 section handler.
|
||||||
|
|
||||||
|
@param ImageHandle ImageHandle of the loaded driver.
|
||||||
|
@param SystemTable Pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval RETURN_SUCCESS Register successfully.
|
@retval RETURN_SUCCESS Register successfully.
|
||||||
@retval RETURN_OUT_OF_RESOURCES No enough memory to register this handler.
|
@retval RETURN_OUT_OF_RESOURCES No enough memory to register this handler.
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -70,7 +70,7 @@ typedef struct _DEVICE_PATH_STACK_ITEM{
|
||||||
} DEVICE_PATH_STACK_ITEM;
|
} DEVICE_PATH_STACK_ITEM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Push a controller device path into a globle device path list
|
Push a controller device path into a globle device path list.
|
||||||
|
|
||||||
@param DevicePath The controller device path to push into stack
|
@param DevicePath The controller device path to push into stack
|
||||||
|
|
||||||
|
@ -114,6 +114,8 @@ CheckExistInStack (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Update the FV file device path if it is not valid.
|
||||||
|
|
||||||
According to a file GUID, check a Fv file device path is valid. If it is invalid,
|
According to a file GUID, check a Fv file device path is valid. If it is invalid,
|
||||||
try to return the valid device path.
|
try to return the valid device path.
|
||||||
FV address maybe changes for memory layout adjust from time to time, use this funciton
|
FV address maybe changes for memory layout adjust from time to time, use this funciton
|
||||||
|
@ -143,6 +145,8 @@ UpdateFvFileDevicePath (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Gets the data and size of a variable.
|
||||||
|
|
||||||
Read the EFI variable (VendorGuid/Name) and return a dynamically allocated
|
Read the EFI variable (VendorGuid/Name) and return a dynamically allocated
|
||||||
buffer, and the size of the buffer. If failure return NULL.
|
buffer, and the size of the buffer. If failure return NULL.
|
||||||
|
|
||||||
|
@ -165,6 +169,8 @@ GetVariableAndSize (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Connect to the handle to a device on the device path.
|
||||||
|
|
||||||
This function will create all handles associate with every device
|
This function will create all handles associate with every device
|
||||||
path node. If the handle associate with one device path node can not
|
path node. If the handle associate with one device path node can not
|
||||||
be created success, then still give one chance to do the dispatch,
|
be created success, then still give one chance to do the dispatch,
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
PCD PEIM manage PCD database to manage all dynamic PCD in PEI phase. PCD PEIM
|
PCD PEIM produces PCD database to manage all dynamic PCD in PEI phase and install Pcd Ppi.
|
||||||
also produce PCD_PPI.
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# Component description file for Pcd Database PEIM module
|
# PCD PEIM produces PCD database to manage all dynamic PCD in PEI phase and install Pcd Ppi.
|
||||||
#
|
#
|
||||||
# This PEIM driver implement and produce PCD PPI.
|
# Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
# Copyright (c) 2006 - 2007, Intel Corporation
|
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Private functions used by PCD PEIM.
|
Private functions used by PCD PEIM.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -10,9 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name: Service.c
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Service.h"
|
#include "Service.h"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Private functions used by PCD PEIM.
|
Private functions used by PCD PEIM.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -10,9 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name: Service.h
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _PEI_PCD_SERVICE_H_
|
#ifndef _PEI_PCD_SERVICE_H_
|
||||||
|
@ -1007,11 +1004,13 @@ SetPtrTypeSize (
|
||||||
IN PEI_PCD_DATABASE *Database
|
IN PEI_PCD_DATABASE *Database
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
extern EFI_GUID gPcdDataBaseHobGuid;
|
extern EFI_GUID gPcdDataBaseHobGuid;
|
||||||
|
|
||||||
extern EFI_GUID gPcdPeiCallbackFnTableHobGuid;
|
extern EFI_GUID gPcdPeiCallbackFnTableHobGuid;
|
||||||
|
|
||||||
|
//
|
||||||
|
// The init Database created by PCD Database generation tool
|
||||||
|
//
|
||||||
extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
|
extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -55,7 +55,7 @@ PciCfg2Read (
|
||||||
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
||||||
IN UINT64 Address,
|
IN UINT64 Address,
|
||||||
IN OUT VOID *Buffer
|
IN OUT VOID *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Write to a given location in the PCI configuration space.
|
Write to a given location in the PCI configuration space.
|
||||||
|
@ -89,7 +89,7 @@ PciCfg2Write (
|
||||||
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
||||||
IN UINT64 Address,
|
IN UINT64 Address,
|
||||||
IN OUT VOID *Buffer
|
IN OUT VOID *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -130,7 +130,7 @@ PciCfg2Modify (
|
||||||
IN UINT64 Address,
|
IN UINT64 Address,
|
||||||
IN VOID *SetBits,
|
IN VOID *SetBits,
|
||||||
IN VOID *ClearBits
|
IN VOID *ClearBits
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ PciCfg2Read (
|
||||||
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
||||||
IN UINT64 Address,
|
IN UINT64 Address,
|
||||||
IN OUT VOID *Buffer
|
IN OUT VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN PciLibAddress;
|
UINTN PciLibAddress;
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ PciCfg2Write (
|
||||||
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
|
||||||
IN UINT64 Address,
|
IN UINT64 Address,
|
||||||
IN OUT VOID *Buffer
|
IN OUT VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN PciLibAddress;
|
UINTN PciLibAddress;
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ PciCfg2Modify (
|
||||||
IN UINT64 Address,
|
IN UINT64 Address,
|
||||||
IN VOID *SetBits,
|
IN VOID *SetBits,
|
||||||
IN VOID *ClearBits
|
IN VOID *ClearBits
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN PciLibAddress;
|
UINTN PciLibAddress;
|
||||||
UINT16 ClearValue16;
|
UINT16 ClearValue16;
|
||||||
|
@ -353,7 +353,15 @@ PciCfg2Modify (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Module's entry function.
|
||||||
|
This routine will install EFI_PEI_PCI_CFG2_PPI.
|
||||||
|
|
||||||
|
@param FileHandle Handle of the file being invoked.
|
||||||
|
@param PeiServices Describes the list of possible PEI Services.
|
||||||
|
|
||||||
|
@return Whether success to install service.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PeimInitializePciCfg (
|
PeimInitializePciCfg (
|
||||||
|
|
|
@ -336,7 +336,7 @@ GetComponentName (
|
||||||
**/
|
**/
|
||||||
CHAR16 *
|
CHAR16 *
|
||||||
GetImageName (
|
GetImageName (
|
||||||
EFI_LOADED_IMAGE_PROTOCOL *Image
|
IN EFI_LOADED_IMAGE_PROTOCOL *Image
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -347,9 +347,9 @@ GetImageName (
|
||||||
UINTN BufferSize;
|
UINTN BufferSize;
|
||||||
UINT32 AuthenticationStatus;
|
UINT32 AuthenticationStatus;
|
||||||
EFI_GUID *NameGuid;
|
EFI_GUID *NameGuid;
|
||||||
EFI_FIRMWARE_VOLUME2_PROTOCOL *FV2;
|
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv2;
|
||||||
|
|
||||||
FV2 = NULL;
|
Fv2 = NULL;
|
||||||
Buffer = NULL;
|
Buffer = NULL;
|
||||||
BufferSize = 0;
|
BufferSize = 0;
|
||||||
|
|
||||||
|
@ -378,11 +378,11 @@ GetImageName (
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
Image->DeviceHandle,
|
Image->DeviceHandle,
|
||||||
&gEfiFirmwareVolume2ProtocolGuid,
|
&gEfiFirmwareVolume2ProtocolGuid,
|
||||||
(VOID **) &FV2
|
(VOID **) &Fv2
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
Status = FV2->ReadSection (
|
Status = Fv2->ReadSection (
|
||||||
FV2,
|
Fv2,
|
||||||
&FvFilePath->FvFileName,
|
&FvFilePath->FvFileName,
|
||||||
EFI_SECTION_USER_INTERFACE,
|
EFI_SECTION_USER_INTERFACE,
|
||||||
0,
|
0,
|
||||||
|
@ -1158,12 +1158,12 @@ PlatOverMngrExtractConfig (
|
||||||
/**
|
/**
|
||||||
This function processes the results of changes in configuration.
|
This function processes the results of changes in configuration.
|
||||||
|
|
||||||
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||||
@param Request A null-terminated Unicode string in <ConfigRequest> format.
|
@param Configuration A null-terminated Unicode string in <ConfigRequest> format.
|
||||||
@param Progress A pointer to a string filled in with the offset of the most
|
@param Progress A pointer to a string filled in with the offset of the most
|
||||||
recent '&' before the first failing name/value pair (or the
|
recent '&' before the first failing name/value pair (or the
|
||||||
beginning of the string if the failure is in the first
|
beginning of the string if the failure is in the first
|
||||||
name/value pair) or the terminating NULL if all was successful.
|
name/value pair) or the terminating NULL if all was successful.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Results is processed successfully.
|
@retval EFI_SUCCESS The Results is processed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER Configuration is NULL.
|
@retval EFI_INVALID_PARAMETER Configuration is NULL.
|
||||||
|
|
|
@ -134,15 +134,51 @@ typedef struct {
|
||||||
EFI_STRING_ID DescriptionToken;
|
EFI_STRING_ID DescriptionToken;
|
||||||
} CFG_PROTOCOL_INVOKER_CHOICE;
|
} CFG_PROTOCOL_INVOKER_CHOICE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
This function allows a caller to extract the current configuration for one
|
||||||
|
or more named elements from the target driver.
|
||||||
|
|
||||||
|
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||||
|
@param Request A null-terminated Unicode string in <ConfigRequest> format.
|
||||||
|
@param Progress On return, points to a character in the Request string.
|
||||||
|
Points to the string's null terminator if request was successful.
|
||||||
|
Points to the most recent '&' before the first failing name/value
|
||||||
|
pair (or the beginning of the string if the failure is in the
|
||||||
|
first name/value pair) if the request was not successful.
|
||||||
|
@param Results A null-terminated Unicode string in <ConfigAltResp> format which
|
||||||
|
has all values filled in for the names in the Request string.
|
||||||
|
String to be allocated by the called function.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Results is filled with the requested values.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
|
||||||
|
@retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.
|
||||||
|
@retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatOverMngrExtractConfig (
|
PlatOverMngrExtractConfig (
|
||||||
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
|
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
|
||||||
IN CONST EFI_STRING Request,
|
IN CONST EFI_STRING Request,
|
||||||
OUT EFI_STRING *Progress,
|
OUT EFI_STRING *Progress,
|
||||||
OUT EFI_STRING *Results
|
OUT EFI_STRING *Results
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
This function processes the results of changes in configuration.
|
||||||
|
|
||||||
|
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||||
|
@param Configuration A null-terminated Unicode string in <ConfigRequest> format.
|
||||||
|
@param Progress A pointer to a string filled in with the offset of the most
|
||||||
|
recent '&' before the first failing name/value pair (or the
|
||||||
|
beginning of the string if the failure is in the first
|
||||||
|
name/value pair) or the terminating NULL if all was successful.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Results is processed successfully.
|
||||||
|
@retval EFI_INVALID_PARAMETER Configuration is NULL.
|
||||||
|
@retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatOverMngrRouteConfig (
|
PlatOverMngrRouteConfig (
|
||||||
|
@ -151,6 +187,27 @@ PlatOverMngrRouteConfig (
|
||||||
OUT EFI_STRING *Progress
|
OUT EFI_STRING *Progress
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
This is the function that is called to provide results data to the driver. This data
|
||||||
|
consists of a unique key which is used to identify what data is either being passed back
|
||||||
|
or being asked for.
|
||||||
|
|
||||||
|
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||||
|
@param Action A null-terminated Unicode string in <ConfigRequest> format.
|
||||||
|
@param KeyValue A unique Goto OpCode callback value which record user's selection.
|
||||||
|
0x100 <= KeyValue <0x500 : user select a controller item in the first page;
|
||||||
|
KeyValue == 0x1234 : user select 'Refresh' in first page, or user select 'Go to Previous Menu' in second page
|
||||||
|
KeyValue == 0x1235 : user select 'Pci device filter' in first page
|
||||||
|
KeyValue == 0x1500 : user select 'order ... priority' item in second page
|
||||||
|
KeyValue == 0x1800 : user select 'commint changes' in third page
|
||||||
|
KeyValue == 0x2000 : user select 'Go to Previous Menu' in third page
|
||||||
|
@param Type The type of value for the question.
|
||||||
|
@param Value A pointer to the data being sent to the original exporting driver.
|
||||||
|
@param ActionRequest On return, points to the action requested by the callback function.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Always returned.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatOverMngrCallback (
|
PlatOverMngrCallback (
|
||||||
|
@ -162,14 +219,32 @@ PlatOverMngrCallback (
|
||||||
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
|
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get the image name
|
||||||
|
|
||||||
|
@param Image Image to search.
|
||||||
|
|
||||||
|
@retval !NULL Pointer into the image name if the image name is found,
|
||||||
|
@retval NULL Pointer to NULL if the image name is not found.
|
||||||
|
|
||||||
|
**/
|
||||||
CHAR16 *
|
CHAR16 *
|
||||||
GetImageName (
|
GetImageName (
|
||||||
IN EFI_LOADED_IMAGE_PROTOCOL *Image
|
IN EFI_LOADED_IMAGE_PROTOCOL *Image
|
||||||
);
|
);
|
||||||
|
|
||||||
CHAR16 *
|
/**
|
||||||
|
Get the description string by device path.
|
||||||
|
|
||||||
|
@param DevPath The input device path.
|
||||||
|
|
||||||
|
@retval !NULL The description string retured.
|
||||||
|
@retval NULL The description string cannot be found.
|
||||||
|
|
||||||
|
**/
|
||||||
|
CHAR16 *
|
||||||
DevicePathToStr (
|
DevicePathToStr (
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevPath
|
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,25 +31,23 @@ LIST_ENTRY mMappingDataBase = INITIALIZE_LIST_HEAD_VARIABLE (mMappingDataBa
|
||||||
BOOLEAN mEnvironmentVariableRead = FALSE;
|
BOOLEAN mEnvironmentVariableRead = FALSE;
|
||||||
EFI_HANDLE mCallerImageHandle;
|
EFI_HANDLE mCallerImageHandle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Platform Driver Override driver entry point, install the Platform Driver Override Protocol
|
||||||
|
|
||||||
|
@param ImageHandle ImageHandle of the loaded driver.
|
||||||
|
@param SystemTable Pointer to the EFI System Table.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The DXE Driver, DXE Runtime Driver, DXE SMM Driver,
|
||||||
|
or UEFI Driver exited normally.
|
||||||
|
@retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.
|
||||||
|
@retval Other Return value from ProcessModuleEntryPointList().
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
PlatformDriverOverrideEntry (
|
PlatformDriverOverrideEntry (
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Platform Driver Override driver entry point, install the Platform Driver Override Protocol
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_STATUS
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
mEnvironmentVariableRead = FALSE;
|
mEnvironmentVariableRead = FALSE;
|
||||||
mCallerImageHandle = ImageHandle;
|
mCallerImageHandle = ImageHandle;
|
||||||
|
@ -145,11 +143,16 @@ GetDriver (
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
For the use of the ControllerHandle parameter in the GetDriverPath() and DriverLoaded() APIs
|
For the use of the ControllerHandle parameter in the GetDriverPath()
|
||||||
makes those APIs very difficult to use, so not support.
|
But this API is very difficult to use, so not support.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@param This A pointer to the
|
||||||
|
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.
|
||||||
|
@param ControllerHandle The device handle of the controller to check if a
|
||||||
|
driver override exists.
|
||||||
|
@param DriverImagePath The device path for this Image.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -164,11 +167,21 @@ GetDriverPath (
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
For the use of the ControllerHandle parameter in the GetDriverPath() and DriverLoaded() APIs
|
For the use of the ControllerHandle parameter in the DriverLoaded()
|
||||||
makes those APIs very difficult to use, so not support.
|
But this API is very difficult to use, so not support.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@param This A pointer to the
|
||||||
|
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.
|
||||||
|
@param ControllerHandle The device handle of the controller to check if a
|
||||||
|
driver override exists.
|
||||||
|
@param DriverImagePath The device path for this Image.
|
||||||
|
@param DriverImageHandle On input, a pointer to the previous driver image
|
||||||
|
handle returned by GetDriver(). On output, a
|
||||||
|
pointer to the next driver image handle. Passing
|
||||||
|
in a NULL, will return the first driver image
|
||||||
|
handle for ControllerHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
|
|
@ -18,8 +18,8 @@ Abstract:
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef PLATFORM_DRI_OVERRIDE_H_
|
#ifndef _PLATFORM_DRI_OVERRIDE_H_
|
||||||
#define PLATFORM_DRI_OVERRIDE_H_
|
#define _PLATFORM_DRI_OVERRIDE_H_
|
||||||
|
|
||||||
#include <Uefi.h>
|
#include <Uefi.h>
|
||||||
|
|
||||||
|
@ -28,6 +28,29 @@ Abstract:
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/PlatDriOverLib.h>
|
#include <Library/PlatDriOverLib.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves the image handle of the platform override driver for a controller in the system.
|
||||||
|
|
||||||
|
@param This A pointer to the
|
||||||
|
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.
|
||||||
|
@param ControllerHandle The device handle of the controller to check if a
|
||||||
|
driver override exists.
|
||||||
|
@param DriverImageHandle On input, a pointer to the previous driver image
|
||||||
|
handle returned by GetDriver(). On output, a
|
||||||
|
pointer to the next driver image handle. Passing
|
||||||
|
in a NULL, will return the first driver image
|
||||||
|
handle for ControllerHandle.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The driver override for ControllerHandle was
|
||||||
|
returned in DriverImageHandle.
|
||||||
|
@retval EFI_NOT_FOUND A driver override for ControllerHandle was not
|
||||||
|
found.
|
||||||
|
@retval EFI_INVALID_PARAMETER The handle specified by ControllerHandle is not a
|
||||||
|
valid handle. DriverImageHandle is not a handle
|
||||||
|
that was returned on a previous call to
|
||||||
|
GetDriver().
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
GetDriver (
|
GetDriver (
|
||||||
|
@ -36,6 +59,18 @@ GetDriver (
|
||||||
IN OUT EFI_HANDLE * DriverImageHandle
|
IN OUT EFI_HANDLE * DriverImageHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
For the use of the ControllerHandle parameter in the GetDriverPath()
|
||||||
|
But this API is very difficult to use, so not support.
|
||||||
|
|
||||||
|
@param This A pointer to the
|
||||||
|
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.
|
||||||
|
@param ControllerHandle The device handle of the controller to check if a
|
||||||
|
driver override exists.
|
||||||
|
@param DriverImagePath The device path for this Image.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
GetDriverPath (
|
GetDriverPath (
|
||||||
|
@ -44,6 +79,23 @@ GetDriverPath (
|
||||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DriverImagePath
|
IN OUT EFI_DEVICE_PATH_PROTOCOL **DriverImagePath
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
For the use of the ControllerHandle parameter in the DriverLoaded()
|
||||||
|
But this API is very difficult to use, so not support.
|
||||||
|
|
||||||
|
@param This A pointer to the
|
||||||
|
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.
|
||||||
|
@param ControllerHandle The device handle of the controller to check if a
|
||||||
|
driver override exists.
|
||||||
|
@param DriverImagePath The device path for this Image.
|
||||||
|
@param DriverImageHandle On input, a pointer to the previous driver image
|
||||||
|
handle returned by GetDriver(). On output, a
|
||||||
|
pointer to the next driver image handle. Passing
|
||||||
|
in a NULL, will return the first driver image
|
||||||
|
handle for ControllerHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DriverLoaded (
|
DriverLoaded (
|
||||||
|
|
Loading…
Reference in New Issue