mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 08:04:07 +02:00
BaseTools: Fix PcdNvStoreDefaultValueBuffer Value.
https://bugzilla.tianocore.org/show_bug.cgi?id=1385 This patch is going to fix the regression issue that is introduced by commit e6eae3b4c7b9b756263ecec79694de5f1e85b73a and commit 0b6c5954e1d9a17e01eee7d5ef840a5b4790e2e8. PcdNvStoreDefaultValueBuffer value is update to Vpd Info File, but it is not update into a internal cache. This patch will fix this incorrect value in that internal cache. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
a9ff32909b
commit
5695877ec8
@ -1570,6 +1570,12 @@ class PlatformAutoGen(AutoGen):
|
|||||||
self.FixVpdOffset(VpdFile)
|
self.FixVpdOffset(VpdFile)
|
||||||
|
|
||||||
self.FixVpdOffset(self.UpdateNVStoreMaxSize(VpdFile))
|
self.FixVpdOffset(self.UpdateNVStoreMaxSize(VpdFile))
|
||||||
|
PcdNvStoreDfBuffer = [item for item in self._DynamicPcdList if item.TokenCName == "PcdNvStoreDefaultValueBuffer" and item.TokenSpaceGuidCName == "gEfiMdeModulePkgTokenSpaceGuid"]
|
||||||
|
if PcdNvStoreDfBuffer:
|
||||||
|
PcdName,PcdGuid = PcdNvStoreDfBuffer[0].TokenCName, PcdNvStoreDfBuffer[0].TokenSpaceGuidCName
|
||||||
|
if (PcdName,PcdGuid) in VpdSkuMap:
|
||||||
|
DefaultSku = PcdNvStoreDfBuffer[0].SkuInfoList.get(TAB_DEFAULT)
|
||||||
|
VpdSkuMap[(PcdName,PcdGuid)] = {DefaultSku.DefaultValue:[DefaultSku]}
|
||||||
|
|
||||||
# Process VPD map file generated by third party BPDG tool
|
# Process VPD map file generated by third party BPDG tool
|
||||||
if NeedProcessVpdMapFile:
|
if NeedProcessVpdMapFile:
|
||||||
@ -1887,14 +1893,16 @@ class PlatformAutoGen(AutoGen):
|
|||||||
return {(Pcd.TokenCName, Pcd.TokenSpaceGuidCName):Pcd for Pcd in self.NonDynamicPcdList}
|
return {(Pcd.TokenCName, Pcd.TokenSpaceGuidCName):Pcd for Pcd in self.NonDynamicPcdList}
|
||||||
|
|
||||||
## Get list of non-dynamic PCDs
|
## Get list of non-dynamic PCDs
|
||||||
@cached_property
|
@property
|
||||||
def NonDynamicPcdList(self):
|
def NonDynamicPcdList(self):
|
||||||
|
if not self._NonDynamicPcdList:
|
||||||
self.CollectPlatformDynamicPcds()
|
self.CollectPlatformDynamicPcds()
|
||||||
return self._NonDynamicPcdList
|
return self._NonDynamicPcdList
|
||||||
|
|
||||||
## Get list of dynamic PCDs
|
## Get list of dynamic PCDs
|
||||||
@cached_property
|
@property
|
||||||
def DynamicPcdList(self):
|
def DynamicPcdList(self):
|
||||||
|
if not self._DynamicPcdList:
|
||||||
self.CollectPlatformDynamicPcds()
|
self.CollectPlatformDynamicPcds()
|
||||||
return self._DynamicPcdList
|
return self._DynamicPcdList
|
||||||
|
|
||||||
|
@ -177,8 +177,8 @@ class VpdInfoFile:
|
|||||||
Found = False
|
Found = False
|
||||||
|
|
||||||
if (TokenSpaceName, PcdTokenName) not in self._VpdInfo:
|
if (TokenSpaceName, PcdTokenName) not in self._VpdInfo:
|
||||||
self._VpdInfo[(TokenSpaceName, PcdTokenName)] = []
|
self._VpdInfo[(TokenSpaceName, PcdTokenName)] = {}
|
||||||
self._VpdInfo[(TokenSpaceName, PcdTokenName)].append((SkuId, Offset, Value))
|
self._VpdInfo[(TokenSpaceName, PcdTokenName)][(SkuId, Offset)] = Value
|
||||||
for VpdObject in self._VpdArray:
|
for VpdObject in self._VpdArray:
|
||||||
VpdObjectTokenCName = VpdObject.TokenCName
|
VpdObjectTokenCName = VpdObject.TokenCName
|
||||||
for PcdItem in GlobalData.MixedPcd:
|
for PcdItem in GlobalData.MixedPcd:
|
||||||
@ -219,7 +219,7 @@ class VpdInfoFile:
|
|||||||
return self._VpdArray[vpd]
|
return self._VpdArray[vpd]
|
||||||
def GetVpdInfo(self, arg):
|
def GetVpdInfo(self, arg):
|
||||||
(PcdTokenName, TokenSpaceName) = arg
|
(PcdTokenName, TokenSpaceName) = arg
|
||||||
return self._VpdInfo.get((TokenSpaceName, PcdTokenName))
|
return [(sku,offset,value) for (sku,offset),value in self._VpdInfo.get((TokenSpaceName, PcdTokenName)).items()]
|
||||||
|
|
||||||
## Call external BPDG tool to process VPD file
|
## Call external BPDG tool to process VPD file
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user