]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenPcdDb.py
BaseTools: Fix the bug for VOID* pcd max size from component section
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenPcdDb.py
index a2c4fb39ec85b13000ff30757e992ea52370bbdb..e415cae2905480b5a4b217151b04e6ad191cc741 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Routines for generating Pcd Database\r
 #\r
-# Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -1390,9 +1390,12 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
                     if Pcd.MaxDatumSize != '':\r
                         MaxDatumSize = int(Pcd.MaxDatumSize, 0)\r
                         if MaxDatumSize < Size:\r
-                            EdkLogger.error("build", AUTOGEN_ERROR,\r
+                            if Pcd.MaxSizeUserSet:\r
+                                EdkLogger.error("build", AUTOGEN_ERROR,\r
                                             "The maximum size of VOID* type PCD '%s.%s' is less than its actual size occupied." % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName),\r
                                             ExtraData="[%s]" % str(Platform))\r
+                            else:\r
+                                MaxDatumSize = Size\r
                     else:\r
                         MaxDatumSize = Size\r
                     StringTabLen = MaxDatumSize\r