mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
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
This commit is contained in:
parent
01413f0ccb
commit
a390c35d8a
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user