X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FAutoGen%2FGenPcdDb.py;h=d5997f0e66aaf16d7a6f112f6bbcecb927a3b4e9;hb=481252bbc9c0883e444bcbedd990d8164d10cf89;hp=d07ac60ef363884a59e7b490724eea6284ebc05e;hpb=c1b9129c3c1f09a4847c7ff3179ef2edc475cf56;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py index d07ac60ef3..d5997f0e66 100644 --- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py +++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py @@ -1,7 +1,7 @@ ## @file # Routines for generating Pcd Database # -# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -784,11 +784,11 @@ def BuildExDataBase(Dict): DbTotal = [InitValueUint64, VardefValueUint64, InitValueUint32, VardefValueUint32, VpdHeadValue, ExMapTable, LocalTokenNumberTable, GuidTable, StringHeadValue, PcdNameOffsetTable,VariableTable,SkuTable, StringTableLen, PcdTokenTable,PcdCNameTable, - SizeTableValue, InitValueUint16, VardefValueUint16,InitValueUint8, VardefValueUint8, InitValueBoolean, + SizeTableValue, InitValueUint16, VardefValueUint16, InitValueUint8, VardefValueUint8, InitValueBoolean, VardefValueBoolean, SkuidValue, SkuIndexValue, UnInitValueUint64, UnInitValueUint32, UnInitValueUint16, UnInitValueUint8, UnInitValueBoolean] DbItemTotal = [DbInitValueUint64, DbVardefValueUint64, DbInitValueUint32, DbVardefValueUint32, DbVpdHeadValue, DbExMapTable, DbLocalTokenNumberTable, DbGuidTable, DbStringHeadValue, DbPcdNameOffsetTable,DbVariableTable,DbSkuTable, DbStringTableLen, DbPcdTokenTable, DbPcdCNameTable, - DbSizeTableValue, DbInitValueUint16, DbVardefValueUint16,DbInitValueUint8, DbVardefValueUint8, DbInitValueBoolean, + DbSizeTableValue, DbInitValueUint16, DbVardefValueUint16, DbInitValueUint8, DbVardefValueUint8, DbInitValueBoolean, DbVardefValueBoolean, DbSkuidValue, DbSkuIndexValue, DbUnInitValueUint64, DbUnInitValueUint32, DbUnInitValueUint16, DbUnInitValueUint8, DbUnInitValueBoolean] # SkuidValue is the last table in the init table items @@ -1141,6 +1141,16 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase): CName = Pcd.TokenCName TokenSpaceGuidCName = Pcd.TokenSpaceGuidCName + for PcdItem in GlobalData.MixedPcd: + if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in GlobalData.MixedPcd[PcdItem]: + CName = PcdItem[0] + + if GlobalData.BuildOptionPcd: + for PcdItem in GlobalData.BuildOptionPcd: + if (Pcd.TokenSpaceGuidCName, CName) == (PcdItem[0], PcdItem[1]): + Pcd.DefaultValue = PcdItem[2] + break + EdkLogger.debug(EdkLogger.DEBUG_3, "PCD: %s %s (%s : %s)" % (CName, TokenSpaceGuidCName, Pcd.Phase, Phase)) if Pcd.Phase == 'PEI': @@ -1343,7 +1353,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase): Dict['STRING_TABLE_VALUE'].append(DefaultValueBinStructure) elif Sku.DefaultValue[0] == '"': DefaultValueBinStructure = StringToArray(Sku.DefaultValue) - Size = len(Sku.DefaultValue) -2 + 1 + Size = len(Sku.DefaultValue) - 2 + 1 Dict['STRING_TABLE_VALUE'].append(DefaultValueBinStructure) elif Sku.DefaultValue[0] == '{': DefaultValueBinStructure = StringToArray(Sku.DefaultValue) @@ -1375,7 +1385,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase): Pcd.InitString = 'INIT' else: if int(Sku.DefaultValue, 0) != 0: - Pcd.InitString = 'INIT' + Pcd.InitString = 'INIT' # # For UNIT64 type PCD's value, ULL should be append to avoid # warning under linux building environment. @@ -1464,6 +1474,17 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase): if len(Pcd.SkuInfoList) > 1: Dict['PCD_ORDER_TOKEN_NUMBER_MAP'][GeneratedTokenNumber] = SkuEnablePcdIndex SkuEnablePcdIndex += 1 + + for PcdItem in GlobalData.MixedPcd: + if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in GlobalData.MixedPcd[PcdItem]: + CName = PcdItem[0] + + if GlobalData.BuildOptionPcd: + for PcdItem in GlobalData.BuildOptionPcd: + if (Pcd.TokenSpaceGuidCName, CName) == (PcdItem[0], PcdItem[1]): + Pcd.DefaultValue = PcdItem[2] + break + EdkLogger.debug(EdkLogger.DEBUG_1, "PCD = %s.%s" % (CName, TokenSpaceGuidCName)) EdkLogger.debug(EdkLogger.DEBUG_1, "phase = %s" % Phase) EdkLogger.debug(EdkLogger.DEBUG_1, "GeneratedTokenNumber = %s" % str(GeneratedTokenNumber))