summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/GenPcdDb.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-03-17 15:25:32 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-10 13:58:14 +0800
commitc33081c912968da46fd6f0c7d2d2e52b7b410626 (patch)
treed4c118a8286deefb2e5e9e87e33294e16f8c51fd /BaseTools/Source/Python/AutoGen/GenPcdDb.py
parentf7b31aa540435f43f5c60e7bde456c272b31f7ee (diff)
downloadedk2-c33081c912968da46fd6f0c7d2d2e52b7b410626.tar.gz
edk2-c33081c912968da46fd6f0c7d2d2e52b7b410626.tar.bz2
edk2-c33081c912968da46fd6f0c7d2d2e52b7b410626.zip
BaseTools: Fix the bug for VOID* pcd max size from component section
When the Pcd defined in components section, its value's size is larger than the value's size in [pcd] section, it cause build error, because original code use the size get in [pcd] section as max size. 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/AutoGen/GenPcdDb.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/GenPcdDb.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
index a2c4fb39ec..e415cae290 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 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
# 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
@@ -1390,9 +1390,12 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
if Pcd.MaxDatumSize != '':
MaxDatumSize = int(Pcd.MaxDatumSize, 0)
if MaxDatumSize < Size:
- EdkLogger.error("build", AUTOGEN_ERROR,
+ if Pcd.MaxSizeUserSet:
+ EdkLogger.error("build", AUTOGEN_ERROR,
"The maximum size of VOID* type PCD '%s.%s' is less than its actual size occupied." % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName),
ExtraData="[%s]" % str(Platform))
+ else:
+ MaxDatumSize = Size
else:
MaxDatumSize = Size
StringTabLen = MaxDatumSize