BaseTools: Generate correct VPD PCD value to store the default setting

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Liming Gao
2017-12-22 20:23:21 +08:00
parent b23957242c
commit 0b6c5954e1
2 changed files with 41 additions and 33 deletions

View File

@ -503,6 +503,14 @@ class GenVPD :
#
self.PcdUnknownOffsetList.sort(lambda x, y: cmp(x.PcdBinSize, y.PcdBinSize))
index =0
for pcd in self.PcdUnknownOffsetList:
index += 1
if pcd.PcdCName == ".".join(("gEfiMdeModulePkgTokenSpaceGuid","PcdNvStoreDefaultValueBuffer")):
if index != len(self.PcdUnknownOffsetList):
for i in range(len(self.PcdUnknownOffsetList) - index):
self.PcdUnknownOffsetList[index+i -1 ] , self.PcdUnknownOffsetList[index+i] = self.PcdUnknownOffsetList[index+i] , self.PcdUnknownOffsetList[index+i -1]
#
# Process all Offset value are "*"
#