mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
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
This commit is contained in:
parent
2eaa5ba11d
commit
9efa2da011
@ -259,14 +259,27 @@ public class UsageInstance {
|
|||||||
parentToken.GetAutogenDefinedatumTypeString(parentToken.datumType),
|
parentToken.GetAutogenDefinedatumTypeString(parentToken.datumType),
|
||||||
parentToken.cName);
|
parentToken.cName);
|
||||||
if (!isBuildUsedLibrary) {
|
if (!isBuildUsedLibrary) {
|
||||||
hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",
|
if (parentToken.datumType == Token.DATUM_TYPE.POINTER) {
|
||||||
parentToken.cName,
|
if (isByteArray) {
|
||||||
printDatum);
|
hAutogenStr += String.format("#define _PCD_VALUE_%s (VOID*)_gPcd_FixedAtBuild_%s\r\n",
|
||||||
if (isByteArray) {
|
parentToken.cName,
|
||||||
cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_%s[] = _PCD_VALUE_%s;\r\n",
|
parentToken.cName);
|
||||||
parentToken.cName,
|
cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_%s[] = %s;\r\n",
|
||||||
parentToken.cName);
|
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 {
|
} 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",
|
cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const %s _gPcd_FixedAtBuild_%s = _PCD_VALUE_%s;\r\n",
|
||||||
Token.getAutogendatumTypeString(parentToken.datumType),
|
Token.getAutogendatumTypeString(parentToken.datumType),
|
||||||
parentToken.cName,
|
parentToken.cName,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user