]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: Correct the value assignment for StructurePcd
authorFan, ZhijuX <zhijux.fan@intel.com>
Thu, 9 May 2019 09:19:56 +0000 (17:19 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Fri, 10 May 2019 09:06:44 +0000 (17:06 +0800)
commitafe8c4110c072126b9fb3821397a0216bf7dd8ad
tree853f1fc2abaa6022bf993c4034ef249b8a879569
parent70023bab7efe1147402bcb8d31378f949c4527f6
BaseTools: Correct the value assignment for StructurePcd

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1752

This patch is to fix the code bug in StructurePcd overall
value assignment logic. If a Pcd Array size is fixed but the
size of actual value in Dsc or Dec is bigger than the Pcd
array size, the tool will report error about such setting and
stop build.

The patch is tested minplatform, Ovmf, structure pcd regression test
These tests are build pass. The patch also tested the following cases.
Our cases focused on PcdArraySize. 1.flexiable PcdArraySize.
 2.Fixed PcdArraySize, Pcd overall value exceeds the size of PcdArray.
 3.Fixed PcdArraySize, Pcd overall value Not exceeds the size of PcdArray.

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>
BaseTools/Source/Python/Common/Misc.py
BaseTools/Source/Python/Workspace/BuildClassObject.py
BaseTools/Source/Python/Workspace/DecBuildData.py
BaseTools/Source/Python/Workspace/DscBuildData.py