diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-11-24 23:19:57 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-11-29 19:49:20 +0800 |
commit | 8401d3983d00194b5a9aa77cf65477bfc1716588 (patch) | |
tree | a1163f71d8711575889a1d119ae27ecc21916ab3 /BaseTools/Source/Python/build | |
parent | 45a70db3c3a59b64e0f517870415963fbfacf507 (diff) | |
download | edk2-8401d3983d00194b5a9aa77cf65477bfc1716588.tar.gz edk2-8401d3983d00194b5a9aa77cf65477bfc1716588.tar.bz2 edk2-8401d3983d00194b5a9aa77cf65477bfc1716588.zip |
BaseTools: Fix bug for decimal value of VPDPCD offset display in report
current if we set VPD PCD's offset to a decimal value, eg: 22, this
value is displayed incorrectly in the "FD VPD Region" section in the
report.txt.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/build')
-rw-r--r-- | BaseTools/Source/Python/build/BuildReport.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index 4c57754b3b..fb28970f66 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1560,7 +1560,10 @@ class FdReport(object): try:
PcdName, SkuId, Offset, Size, Value = Line.split("#")[0].split("|")
PcdName, SkuId, Offset, Size, Value = PcdName.strip(), SkuId.strip(), Offset.strip(), Size.strip(), Value.strip()
- Offset = '0x%08X' % (int(Offset, 16) + self.VPDBaseAddress)
+ if Offset.lower().startswith('0x'):
+ Offset = '0x%08X' % (int(Offset, 16) + self.VPDBaseAddress)
+ else:
+ Offset = '0x%08X' % (int(Offset, 10) + self.VPDBaseAddress)
self.VPDInfoList.append("%s | %s | %s | %s | %s" % (PcdName, SkuId, Offset, Size, Value))
except:
EdkLogger.error("BuildReport", CODE_ERROR, "Fail to parse VPD information file %s" % self.VpdFilePath)
|