mirror of https://github.com/acidanthera/audk.git
Clean up code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9471 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a32c6dcf3e
commit
17e7fa8fb1
|
@ -28,10 +28,10 @@ EFI_GUID *TmpTokenSpaceBuffer[PEI_EXMAPPING_TABLE_SIZE + DXE_EXMAPPING_TABLE_SIZ
|
||||||
///
|
///
|
||||||
EFI_LOCK mPcdDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE(TPL_NOTIFY);
|
EFI_LOCK mPcdDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE(TPL_NOTIFY);
|
||||||
|
|
||||||
//
|
///
|
||||||
// PCD_PROTOCOL the native implementation provided by MdePkg which support dynamic
|
/// PCD_PROTOCOL the EDKII native implementation which support dynamic
|
||||||
// type and dynamicEx type PCD.
|
/// type and dynamicEx type PCDs.
|
||||||
//
|
///
|
||||||
PCD_PROTOCOL mPcdInstance = {
|
PCD_PROTOCOL mPcdInstance = {
|
||||||
DxePcdSetSku,
|
DxePcdSetSku,
|
||||||
|
|
||||||
|
@ -71,10 +71,10 @@ PCD_PROTOCOL mPcdInstance = {
|
||||||
DxePcdGetNextTokenSpace
|
DxePcdGetNextTokenSpace
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
///
|
||||||
// EFI_PCD_PROTOCOL is defined in PI 1.2 Vol 3 which only support dynamicEx type
|
/// EFI_PCD_PROTOCOL is defined in PI 1.2 Vol 3 which only support dynamicEx type
|
||||||
// PCD.
|
/// PCD.
|
||||||
//
|
///
|
||||||
EFI_PCD_PROTOCOL mEfiPcdInstance = {
|
EFI_PCD_PROTOCOL mEfiPcdInstance = {
|
||||||
DxePcdSetSku,
|
DxePcdSetSku,
|
||||||
DxePcdGet8Ex,
|
DxePcdGet8Ex,
|
||||||
|
@ -96,8 +96,7 @@ EFI_PCD_PROTOCOL mEfiPcdInstance = {
|
||||||
DxePcdGetNextTokenSpace
|
DxePcdGetNextTokenSpace
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EFI_HANDLE mPcdHandle = NULL;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Main entry for PCD DXE driver.
|
Main entry for PCD DXE driver.
|
||||||
|
@ -118,7 +117,6 @@ PcdDxeInit (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_HANDLE mNewHandle;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make sure the Pcd Protocol is not already installed in the system
|
// Make sure the Pcd Protocol is not already installed in the system
|
||||||
|
@ -128,23 +126,20 @@ PcdDxeInit (
|
||||||
|
|
||||||
BuildPcdDxeDataBase ();
|
BuildPcdDxeDataBase ();
|
||||||
|
|
||||||
mNewHandle = NULL;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install PCD_PROTOCOL to handle dynamic type PCD
|
// Install PCD_PROTOCOL to handle dynamic type PCD
|
||||||
// Install EFI_PCD_PROTOCOL to handle dynamicEx type PCD
|
// Install EFI_PCD_PROTOCOL to handle dynamicEx type PCD
|
||||||
//
|
//
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&mNewHandle,
|
&mPcdHandle,
|
||||||
&gPcdProtocolGuid,
|
&gPcdProtocolGuid, &mPcdInstance,
|
||||||
&mPcdInstance,
|
&gEfiPcdProtocolGuid, &mEfiPcdInstance,
|
||||||
&gEfiPcdProtocolGuid,
|
NULL
|
||||||
&mEfiPcdInstance
|
|
||||||
);
|
);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
#include "Service.h"
|
#include "Service.h"
|
||||||
|
|
||||||
//
|
///
|
||||||
// Instance of PCD_PPI protocol is native implementation by MdePkg.
|
/// Instance of PCD_PPI protocol is EDKII native implementation.
|
||||||
// This protocol instance support dynamic and dynamicEx type PCDs.
|
/// This protocol instance support dynamic and dynamicEx type PCDs.
|
||||||
//
|
///
|
||||||
PCD_PPI mPcdPpiInstance = {
|
PCD_PPI mPcdPpiInstance = {
|
||||||
PeiPcdSetSku,
|
PeiPcdSetSku,
|
||||||
|
|
||||||
|
@ -57,10 +57,10 @@ PCD_PPI mPcdPpiInstance = {
|
||||||
PeiPcdGetNextTokenSpace
|
PeiPcdGetNextTokenSpace
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
///
|
||||||
// Instance of EFI_PEI_PCD_PPI which is defined in PI 1.2 Vol 3.
|
/// Instance of EFI_PEI_PCD_PPI which is defined in PI 1.2 Vol 3.
|
||||||
// This PPI instance only support dyanmicEx type PCD.
|
/// This PPI instance only support dyanmicEx type PCD.
|
||||||
//
|
///
|
||||||
EFI_PEI_PCD_PPI mEfiPcdPpiInstance = {
|
EFI_PEI_PCD_PPI mEfiPcdPpiInstance = {
|
||||||
PeiPcdSetSku,
|
PeiPcdSetSku,
|
||||||
|
|
||||||
|
@ -83,16 +83,17 @@ EFI_PEI_PCD_PPI mEfiPcdPpiInstance = {
|
||||||
PeiPcdGetNextTokenSpace
|
PeiPcdGetNextTokenSpace
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_PEI_PPI_DESCRIPTOR mPpiPCD = {
|
EFI_PEI_PPI_DESCRIPTOR mPpiList[] = {
|
||||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
{
|
||||||
|
EFI_PEI_PPI_DESCRIPTOR_PPI,
|
||||||
&gPcdPpiGuid,
|
&gPcdPpiGuid,
|
||||||
&mPcdPpiInstance
|
&mPcdPpiInstance
|
||||||
};
|
},
|
||||||
|
{
|
||||||
EFI_PEI_PPI_DESCRIPTOR mEfiPpiPCD = {
|
|
||||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||||
&gEfiPeiPcdPpiGuid,
|
&gEfiPeiPcdPpiGuid,
|
||||||
&mEfiPcdPpiInstance
|
&mEfiPcdPpiInstance
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,16 +119,9 @@ PcdPeimInit (
|
||||||
BuildPcdDatabase ();
|
BuildPcdDatabase ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install PCD_PPI which produce support for dynamic and dynamicEx PCD
|
// Install PCD_PPI and EFI_PEI_PCD_PPI.
|
||||||
//
|
//
|
||||||
Status = PeiServicesInstallPpi (&mPpiPCD);
|
Status = PeiServicesInstallPpi (&mPpiList[0]);
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Install EFI_PCD_PPI which produce support for dynamicEx PCD which is defined
|
|
||||||
// in PI 1.2 Vol 3 specification.
|
|
||||||
//
|
|
||||||
Status = PeiServicesInstallPpi (&mEfiPpiPCD);
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in New Issue