MdeModulePkg PCD: Add DynamicEx PcdVpdBaseAddress64 for non SPI platform
https://bugzilla.tianocore.org/show_bug.cgi?id=1356 Current PcdVpdBaseAddress is 32bit static Pcd. NON SPI platform needs to configure it as Dynamic PCD. Emulator platform (such as NT32) may set its value to 64bit address. To meet with this usage, 64bit DynamicEx PcdVpdBaseAddress64 is introduced. If its value is not zero, it will be used. If its value is zero, static PcdVpdBaseAddress will be used. When NON SPI platform enables VPD PCD, they need to set PcdVpdBaseAddress64. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Dandan Bi <dandan.bi@intel.com>
This commit is contained in:
@@ -109,6 +109,7 @@ EFI_GET_PCD_INFO_PROTOCOL mEfiGetPcdInfoInstance = {
|
||||
};
|
||||
|
||||
EFI_HANDLE mPcdHandle = NULL;
|
||||
UINTN mVpdBaseAddress = 0;
|
||||
|
||||
/**
|
||||
Main entry for PCD DXE driver.
|
||||
@@ -175,6 +176,21 @@ PcdDxeInit (
|
||||
&Registration
|
||||
);
|
||||
|
||||
//
|
||||
// Cache VpdBaseAddress in entry point for the following usage.
|
||||
//
|
||||
|
||||
//
|
||||
// PcdVpdBaseAddress64 is DynamicEx PCD only. So, DxePcdGet64Ex() is used to get its value.
|
||||
//
|
||||
mVpdBaseAddress = (UINTN) DxePcdGet64Ex (&gEfiMdeModulePkgTokenSpaceGuid, PcdToken (PcdVpdBaseAddress64));
|
||||
if (mVpdBaseAddress == 0) {
|
||||
//
|
||||
// PcdVpdBaseAddress64 is not set, get value from PcdVpdBaseAddress.
|
||||
//
|
||||
mVpdBaseAddress = (UINTN) PcdGet32 (PcdVpdBaseAddress);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user