mirror of https://github.com/acidanthera/audk.git
MdeModulePkg and Nt32Pkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and EFI_GET_PCD_INFO_PPI support for PI 1.2.1 compliance.
It has no obviously benefit to reduce size by PcdPcdInfoGeneration, so remove this PCD. And PCD_INFO_GENERATION flag can be used to enable/disable PCD info feature, a sample is added in Nt32Pkg to show how to use this flag. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14869 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a4d5fa17f4
commit
61d8989f87
|
@ -376,12 +376,6 @@
|
|||
gEdkiiFormBrowserEx2ProtocolGuid = { 0xa770c357, 0xb693, 0x4e6d, { 0xa6, 0xcf, 0xd2, 0x1c, 0x72, 0x8e, 0x55, 0xb } }
|
||||
|
||||
[PcdsFeatureFlag]
|
||||
## Indicates if the Pcd Info Ppi and Protocol should be produced.<BR><BR>
|
||||
# It can be disabled to save size.<BR><BR>
|
||||
# TRUE - Pcd Info Ppi and Protocol will be produced.<BR>
|
||||
# FALSE - Pcd Info Ppi and Protocol will not be produced.<BR>
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPcdInfoGeneration|FALSE|BOOLEAN|0x0001001C
|
||||
|
||||
## Indicate whether platform can support update capsule across a system reset
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE|BOOLEAN|0x0001001d
|
||||
|
||||
|
|
|
@ -150,7 +150,10 @@ PcdDxeInit (
|
|||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (FeaturePcdGet (PcdPcdInfoGeneration) && mPcdDatabase.DxeDb->PcdNameTableOffset != 0) {
|
||||
//
|
||||
// Only install PcdInfo PROTOCOL when PCD info content is present.
|
||||
//
|
||||
if (mPcdDatabase.DxeDb->PcdNameTableOffset != 0) {
|
||||
//
|
||||
// Install GET_PCD_INFO_PROTOCOL to handle dynamic type PCD
|
||||
// Install EFI_GET_PCD_INFO_PROTOCOL to handle dynamicEx type PCD
|
||||
|
@ -228,9 +231,6 @@ DxeGetPcdInfoGetSku (
|
|||
VOID
|
||||
)
|
||||
{
|
||||
if (!FeaturePcdGet (PcdPcdInfoGeneration)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
return mPcdDatabase.PeiDb->SystemSkuId;
|
||||
}
|
||||
|
||||
|
|
|
@ -340,7 +340,6 @@
|
|||
|
||||
[Pcd]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress ## SOMETIMES_CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPcdInfoGeneration
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
|
|
@ -283,10 +283,6 @@ DxeGetPcdInfo (
|
|||
UINT32 LocalTokenNumber;
|
||||
BOOLEAN IsPeiDb;
|
||||
|
||||
if (!FeaturePcdGet (PcdPcdInfoGeneration)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
ASSERT (PcdInfo != NULL);
|
||||
|
||||
Status = EFI_NOT_FOUND;
|
||||
|
|
|
@ -158,9 +158,9 @@ PcdPeimInit (
|
|||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
// Only install PcdInfo PPI when the feature is enabled and PCD info content is present.
|
||||
// Only install PcdInfo PPI when PCD info content is present.
|
||||
//
|
||||
if (FeaturePcdGet (PcdPcdInfoGeneration) && (DataBase->PcdNameTableOffset != 0)) {
|
||||
if (DataBase->PcdNameTableOffset != 0) {
|
||||
//
|
||||
// Install GET_PCD_INFO_PPI and EFI_GET_PCD_INFO_PPI.
|
||||
//
|
||||
|
@ -232,9 +232,6 @@ PeiGetPcdInfoGetSku (
|
|||
VOID
|
||||
)
|
||||
{
|
||||
if (!FeaturePcdGet (PcdPcdInfoGeneration)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
return GetPcdDatabase()->SystemSkuId;
|
||||
}
|
||||
|
||||
|
|
|
@ -343,7 +343,6 @@
|
|||
[Pcd]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress ## SOMETIMES_CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry || gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable ## SOMETIMES_CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPcdInfoGeneration
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
|
|
@ -247,10 +247,6 @@ PeiGetPcdInfo (
|
|||
UINTN PeiNexTokenNumber;
|
||||
UINT32 LocalTokenNumber;
|
||||
|
||||
if (!FeaturePcdGet (PcdPcdInfoGeneration)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
ASSERT (PcdInfo != NULL);
|
||||
|
||||
PeiPcdDb = GetPcdDatabase ();
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
BUILD_TARGETS = DEBUG|RELEASE
|
||||
SKUID_IDENTIFIER = DEFAULT
|
||||
FLASH_DEFINITION = Nt32Pkg/Nt32Pkg.fdf
|
||||
//
|
||||
// This flag is to control tool to generate PCD info for dynamic(ex) PCD,
|
||||
// then enable or disable PCD info feature. TRUE is enable, and FLASE is disable.
|
||||
// If the flag is absent, it will be same as FALSE.
|
||||
//
|
||||
PCD_INFO_GENERATION = TRUE
|
||||
|
||||
#
|
||||
# Defines for default states. These can be changed on the command line.
|
||||
|
|
Loading…
Reference in New Issue