mirror of https://github.com/acidanthera/audk.git
BaseTools: Fixed some small issues
1. The structure pcd default value should use the default value under sku. 2. Incorrect VpdOffset value for those un-used in module Vpd 3. Add a checkpoint for Structure Pcd Name Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
841d86fe40
commit
8e011d83bb
|
@ -1751,8 +1751,8 @@ class PlatformAutoGen(AutoGen):
|
|||
PcdValue = DefaultSku.DefaultValue
|
||||
if PcdValue not in SkuValueMap:
|
||||
SkuValueMap[PcdValue] = []
|
||||
VpdFile.Add(DscPcdEntry, 'DEFAULT',Sku.VpdOffset)
|
||||
SkuValueMap[PcdValue].append(Sku)
|
||||
VpdFile.Add(DscPcdEntry, 'DEFAULT',DefaultSku.VpdOffset)
|
||||
SkuValueMap[PcdValue].append(DefaultSku)
|
||||
for (SkuName,Sku) in DscPcdEntry.SkuInfoList.items():
|
||||
Sku.VpdOffset = Sku.VpdOffset.strip()
|
||||
|
||||
|
|
|
@ -1298,8 +1298,11 @@ class DscBuildData(PlatformBuildClassObject):
|
|||
CApp = CApp + ' %s *Pcd; // From %s Line %d \n' % (Pcd.DatumType, Pcd.PkgPath, Pcd.PcdDefineLineNo)
|
||||
CApp = CApp + '\n'
|
||||
|
||||
Pcd.DefaultValue = Pcd.DefaultValue.strip()
|
||||
PcdDefaultValue = StringToArray(Pcd.DefaultValue)
|
||||
if SkuName in Pcd.SkuInfoList:
|
||||
DefaultValue = Pcd.SkuInfoList[SkuName].DefaultStoreDict.get(DefaultStoreName,Pcd.SkuInfoList[SkuName].HiiDefaultValue) if Pcd.SkuInfoList[SkuName].HiiDefaultValue else Pcd.SkuInfoList[SkuName].DefaultValue
|
||||
else:
|
||||
DefaultValue = Pcd.DefaultValue
|
||||
PcdDefaultValue = StringToArray(DefaultValue.strip())
|
||||
|
||||
InitByteValue += '%s.%s.%s.%s|%s|%s\n' % (SkuName, DefaultStoreName, Pcd.TokenSpaceGuidCName, Pcd.TokenCName, Pcd.DatumType, PcdDefaultValue)
|
||||
|
||||
|
|
|
@ -1915,6 +1915,9 @@ class DecParser(MetaFileParser):
|
|||
if len(PcdNames) == 2:
|
||||
self._CurrentStructurePcdName = ""
|
||||
else:
|
||||
if self._CurrentStructurePcdName != TAB_SPLIT.join(PcdNames[:2]):
|
||||
EdkLogger.error('Parser', FORMAT_INVALID, "Pcd Name does not match: %s and %s " % (self._CurrentStructurePcdName , TAB_SPLIT.join(PcdNames[:2])),
|
||||
File=self.MetaFile, Line=self._LineIndex + 1)
|
||||
self._ValueList[1] = TAB_SPLIT.join(PcdNames[2:])
|
||||
self._ValueList[2] = PcdTockens[1]
|
||||
if not self._CurrentStructurePcdName:
|
||||
|
|
Loading…
Reference in New Issue