diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-30 14:48:14 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-30 14:48:14 +0000 |
commit | 9efa2da0115c22a36c2cbde7e118e232fae115c2 (patch) | |
tree | 14da3b6cfd09b77d89e38f5dcff3b8c2ce652499 | |
parent | 2eaa5ba11d2439b323e113f45c7eb702b873f790 (diff) | |
download | edk2-platforms-9efa2da0115c22a36c2cbde7e118e232fae115c2.tar.xz |
Fixed track EDKT153, change PCDAutogen code to generate static variable referent for _PCD_VALUE_... for byte array type PCD in FIXED_AT_BUILD case.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1153 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java index 2abcea8bdc..2f7d5ae523 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java +++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java @@ -259,14 +259,27 @@ public class UsageInstance { parentToken.GetAutogenDefinedatumTypeString(parentToken.datumType),
parentToken.cName);
if (!isBuildUsedLibrary) {
- hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",
- parentToken.cName,
- printDatum);
- if (isByteArray) {
- cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_%s[] = _PCD_VALUE_%s;\r\n",
- parentToken.cName,
- parentToken.cName);
+ if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {
+ if (isByteArray) {
+ hAutogenStr += String.format("#define _PCD_VALUE_%s (VOID*)_gPcd_FixedAtBuild_%s\r\n",
+ parentToken.cName,
+ parentToken.cName);
+ cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_%s[] = %s;\r\n",
+ parentToken.cName,
+ printDatum);
+ } else {
+ hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",
+ parentToken.cName,
+ printDatum);
+ cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const %s _gPcd_FixedAtBuild_%s = _PCD_VALUE_%s;\r\n",
+ Token.getAutogendatumTypeString(parentToken.datumType),
+ parentToken.cName,
+ parentToken.cName);
+ }
} else {
+ hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",
+ parentToken.cName,
+ printDatum);
cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const %s _gPcd_FixedAtBuild_%s = _PCD_VALUE_%s;\r\n",
Token.getAutogendatumTypeString(parentToken.datumType),
parentToken.cName,
|