diff options
| author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-03-21 05:36:59 +0300 | 
|---|---|---|
| committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-03-21 06:48:33 +0300 | 
| commit | c8ae65ac5218973e473ba1ba4bd5f9ccb547a219 (patch) | |
| tree | e7211b37760f8bcc55a1e1190aae4af33adaa3f8 /BaseTools/Source/Python/Workspace/DscBuildData.py | |
| parent | 2b85beae0b2e980a310193f9a35372fb7dae2c23 (diff) | |
| download | edk2-c8ae65ac5218973e473ba1ba4bd5f9ccb547a219.tar.xz | |
BaseTools: Override Max size by build Option Pcd for HII type
Current code will generate maxsize for HII type PCD when parser DSC
file, while this HII type PCD value maybe override in build command
per --pcd option, so the max size need re-calculate.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
| -rw-r--r-- | BaseTools/Source/Python/Workspace/DscBuildData.py | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index d60d491e10..8fe4d4f5cb 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1254,6 +1254,14 @@ class DscBuildData(PlatformBuildClassObject):                              SkuInfo.HiiDefaultValue = NoFiledValues[(Pcd.TokenSpaceGuidCName,Pcd.TokenCName)][0]
                              for defaultstore in SkuInfo.DefaultStoreDict:
                                  SkuInfo.DefaultStoreDict[defaultstore] = NoFiledValues[(Pcd.TokenSpaceGuidCName,Pcd.TokenCName)][0]
 +                    if Pcd.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX_HII], self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_HII]]:
 +                        if Pcd.DatumType == "VOID*":
 +                            if not Pcd.MaxDatumSize:
 +                                Pcd.MaxDatumSize = '0'
 +                            CurrentSize = int(Pcd.MaxDatumSize,16) if Pcd.MaxDatumSize.upper().startswith("0X") else int(Pcd.MaxDatumSize)
 +                            OptionSize = len((StringToArray(Pcd.PcdValueFromComm)).split(","))
 +                            MaxSize = max(CurrentSize, OptionSize)
 +                            Pcd.MaxDatumSize = str(MaxSize)
              else:
                  PcdInDec = self.DecPcds.get((Name,Guid))
                  if PcdInDec:
 | 
