summaryrefslogtreecommitdiff
path: root/Tools/Source
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-21 16:07:38 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-21 16:07:38 +0000
commit6c4dc2267a9c87d40ff6bfc042e13b3e838df26e (patch)
tree213debaf93fdd701c9aa0f1cfccd119982bfd01e /Tools/Source
parentec763458292c3b747b8a7b36464f07cb9a402e37 (diff)
downloadedk2-platforms-6c4dc2267a9c87d40ff6bfc042e13b3e838df26e.tar.xz
1) Move almost new schema related to PCD on branch to transition scheme in main trunk.
2) Remove the original unused PCD schema in FPD in main trunk. 2) Modify PCD tools to support updated schema in main trunk. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@585 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Source')
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
index 92f320bc35..f9de63fc0d 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
@@ -1530,7 +1530,11 @@ public class CollectPCDAction {
pcdType = Token.getpcdTypeFromString(pcdBuildData.getItemType().toString());
datumType = Token.getdatumTypeFromString(pcdBuildData.getDatumType().toString());
tokenNumber = Integer.decode(pcdBuildData.getToken().toString());
- datum = pcdBuildData.getValue();
+ if (pcdBuildData.getValue() != null) {
+ datum = pcdBuildData.getValue().toString();
+ } else {
+ datum = null;
+ }
maxDatumSize = pcdBuildData.getMaxDatumSize();
if ((pcdType == Token.PCD_TYPE.FEATURE_FLAG) &&
@@ -2128,6 +2132,7 @@ public class CollectPCDAction {
boolean hasSkuId0 = false;
Token.PCD_TYPE pcdType = Token.PCD_TYPE.UNKNOWN;
int tokenNumber = 0;
+ String hiiDefaultValue = null;
List<DynamicPcdBuildDefinitions.PcdBuildData.SkuInfo> skuInfoList = null;
DynamicPcdBuildDefinitions.PcdBuildData dynamicInfo = null;
@@ -2198,10 +2203,10 @@ public class CollectPCDAction {
// Judge whether is DefaultGroup at first, because most case is DefautlGroup.
//
if (skuInfoList.get(index).getValue() != null) {
- skuInstance.value.setValue(skuInfoList.get(index).getValue());
+ skuInstance.value.setValue(skuInfoList.get(index).getValue().toString());
if ((exceptionString = verifyDatum(token.cName,
null,
- skuInfoList.get(index).getValue(),
+ skuInfoList.get(index).getValue().toString(),
token.datumType,
token.datumSize)) != null) {
throw new EntityException(exceptionString);
@@ -2215,7 +2220,7 @@ public class CollectPCDAction {
//
if (datum != null) {
if ((skuInstance.id == 0) &&
- !datum.equalsIgnoreCase(skuInfoList.get(index).getValue())) {
+ !datum.toString().equalsIgnoreCase(skuInfoList.get(index).getValue().toString())) {
exceptionString = "[FPD file error] For dynamic PCD " + token.cName + ", the value in module " + moduleName + " is " + datum.toString() + " but the "+
"value of sku 0 data in <DynamicPcdBuildDefinition> is " + skuInstance.value.value + ". They are must be same!"+
" or you could not define value for a dynamic PCD in every <ModuleSA>!";
@@ -2255,10 +2260,16 @@ public class CollectPCDAction {
if (exceptionString != null) {
throw new EntityException(exceptionString);
}
+
+ if (skuInfoList.get(index).getHiiDefaultValue() != null) {
+ hiiDefaultValue = skuInfoList.get(index).getHiiDefaultValue().toString();
+ } else {
+ hiiDefaultValue = null;
+ }
if ((exceptionString = verifyDatum(token.cName,
null,
- skuInfoList.get(index).getHiiDefaultValue(),
+ hiiDefaultValue,
token.datumType,
token.datumSize)) != null) {
throw new EntityException(exceptionString);
@@ -2275,7 +2286,7 @@ public class CollectPCDAction {
skuInstance.value.setHiiData(skuInfoList.get(index).getVariableName(),
translateSchemaStringToUUID(skuInfoList.get(index).getVariableGuid().toString()),
skuInfoList.get(index).getVariableOffset(),
- skuInfoList.get(index).getHiiDefaultValue());
+ skuInfoList.get(index).getHiiDefaultValue().toString());
token.skuData.add(skuInstance);
continue;
}