diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2018-12-09 21:44:47 +0800 |
---|---|---|
committer | BobCF <bob.c.feng@intel.com> | 2018-12-15 15:45:07 +0800 |
commit | 5695877ec8f636bd4ad873ef50eceb9da7a0f382 (patch) | |
tree | e103883da2ad80afc3f716b05d21c01172890795 /BaseTools/Source/Python/Common/VpdInfoFile.py | |
parent | a9ff32909b47b1a1c9a02f21113c615552f6a043 (diff) | |
download | edk2-5695877ec8f636bd4ad873ef50eceb9da7a0f382.tar.gz edk2-5695877ec8f636bd4ad873ef50eceb9da7a0f382.tar.bz2 edk2-5695877ec8f636bd4ad873ef50eceb9da7a0f382.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/Common/VpdInfoFile.py')
-rw-r--r-- | BaseTools/Source/Python/Common/VpdInfoFile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py index 3be0670e36..cebc1f7187 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -177,8 +177,8 @@ class VpdInfoFile: Found = False
if (TokenSpaceName, PcdTokenName) not in self._VpdInfo:
- self._VpdInfo[(TokenSpaceName, PcdTokenName)] = []
- self._VpdInfo[(TokenSpaceName, PcdTokenName)].append((SkuId, Offset, Value))
+ self._VpdInfo[(TokenSpaceName, PcdTokenName)] = {}
+ self._VpdInfo[(TokenSpaceName, PcdTokenName)][(SkuId, Offset)] = Value
for VpdObject in self._VpdArray:
VpdObjectTokenCName = VpdObject.TokenCName
for PcdItem in GlobalData.MixedPcd:
@@ -219,7 +219,7 @@ class VpdInfoFile: return self._VpdArray[vpd]
def GetVpdInfo(self, 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
#
|