summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-03 03:45:57 +0000
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-03 03:45:57 +0000
commita390c35d8a99be7adcc551ce541b5a6ce3f5fd2a (patch)
treed2f413164778db0ff0ab0a8f4be2c1d83a3487f3 /Tools
parent01413f0ccb4e678f633c42d300a1eced780a22d5 (diff)
downloadedk2-platforms-a390c35d8a99be7adcc551ce541b5a6ce3f5fd2a.tar.xz
set default value of PCD from msa file or spd file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1180 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
index e0a0137ef7..d942addf50 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
@@ -906,6 +906,21 @@ public class FpdFileContents {
fpdPcd.setTokenSpaceGuidCName(tsGuid);
fpdPcd.setDatumType(PcdDataTypes.Enum.forString(dataType));
fpdPcd.setItemType(PcdItemTypes.Enum.forString(itemType));
+
+ if (defaultVal != null){
+ fpdPcd.setValue(defaultVal);
+ }
+ else {
+ if (dataType.equals("UINT8") || dataType.equals("UINT16") || dataType.equals("UINT32") || dataType.equals("UINT64")) {
+ fpdPcd.setValue("0");
+ }
+ if (dataType.equals("BOOLEAN")){
+ fpdPcd.setValue("false");
+ }
+ if (dataType.equals("VOID*")) {
+ fpdPcd.setValue("");
+ }
+ }
if (dataType.equals("UINT8")){
fpdPcd.setMaxDatumSize(1);
}
@@ -926,6 +941,7 @@ public class FpdFileContents {
fpdPcd.setMaxDatumSize(maxSize);
}
+
if (itemType.equals("DYNAMIC") || itemType.equals("DYNAMIC_EX")) {
ArrayList<String> al = LookupDynamicPcdBuildDefinition(cName + " " + tsGuid);
//
@@ -937,6 +953,7 @@ public class FpdFileContents {
}
}
else {
+ /*
if (defaultVal != null){
fpdPcd.setValue(defaultVal);
}
@@ -951,7 +968,7 @@ public class FpdFileContents {
fpdPcd.setValue("");
}
}
- /*
+
if (dataType.equals("UINT8")){
fpdPcd.setMaxDatumSize(1);
}