Add PcdDxe and PcdPEIM to all-arch for EdkModulePkg-All-Archs.fpd

Fix a few bugs in PcdDxe and PcdPEIM


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@722 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2006-07-03 15:40:49 +00:00
parent a15bb0d31f
commit bb5545b663
10 changed files with 15409 additions and 15132 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<PlatformSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
<PlatformHeader>
<PlatformName>EdkModuleAll</PlatformName>
@ -26,6 +26,198 @@
<FlashDefinitionFile>dummy.fdf</FlashDefinitionFile>
</Flash>
<FrameworkModules>
<ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="80CF7257-87AB-47f9-A3FE-D50B76D89541">
<Libraries>
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="f12b59c9-76d0-4661-ad7c-f04d1bef0558" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3a004ba5-efe0-4a61-9f1a-267a46ae5ba9" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="1e2c4c2e-67e6-4e57-b3ae-cf5a5af72c2c" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="f1bbe03d-2f28-4dee-bec7-d98d7a30c36a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="331deb15-454b-48d8-9b74-70d01f3f3556" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3ddc3b12-99ea-4364-b315-6310a2050be5" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="4674739d-3195-4fb2-8094-ac1d22d00194" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="b1ee6c28-54aa-4d17-b705-3e28ccb27b2e" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="PATCHABLE_IN_MODULE">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x07</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdVpdBaseAddress</C_Name>
<Token>0x00010010</Token>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x0</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>FV_RECOVERY</FvBinding>
<FfsFormatKey>BS_DRIVER</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50">
<Libraries>
<Instance ModuleGuid="fa177ff7-1fc7-458d-a358-d9d62ae61cec" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="27d67720-ea68-48ae-93da-a3a074c90e30" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="a804239b-4155-446f-acc8-f0825d74908c" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="1c747f6b-0a58-49ae-8ea3-0327a4fa10e3" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="9643128f-ac24-4b3e-b6be-d8849a306153" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="bda39d3a-451b-4350-8266-81ab10fa0523" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="3a9759d2-53bc-4eb2-abcd-c93099419063" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="8c690838-7a22-45c4-aa58-a33e3e515cd4" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
<Instance ModuleGuid="b694e0dc-cd4e-4b30-885b-9c164ed3e74a" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
</Libraries>
<PcdBuildDefinition>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaxPeiPcdCallBackNumberPerPcdEntry</C_Name>
<Token>0x0001000f</Token>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x08</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdVpdBaseAddress</C_Name>
<Token>0x00010010</Token>
<TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x10000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumUnicodeStringLength</C_Name>
<Token>0x00000001</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumAsciiStringLength</C_Name>
<Token>0x00000002</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugPropertyMask</C_Name>
<Token>0x00000005</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x0f</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdSpinLockTimeout</C_Name>
<Token>0x00000004</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>10000000</Value>
</PcdData>
<PcdData ItemType="PATCHABLE_IN_MODULE">
<C_Name>PcdDebugPrintErrorLevel</C_Name>
<Token>0x00000006</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>0x80000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdReportStatusCodePropertyMask</C_Name>
<Token>0x00000007</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0x07</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdMaximumLinkedListLength</C_Name>
<Token>0x00000003</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT32</DatumType>
<MaxDatumSize>4</MaxDatumSize>
<Value>1000000</Value>
</PcdData>
<PcdData ItemType="FIXED_AT_BUILD">
<C_Name>PcdDebugClearMemoryValue</C_Name>
<Token>0x00000008</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>UINT8</DatumType>
<MaxDatumSize>1</MaxDatumSize>
<Value>0xAF</Value>
</PcdData>
</PcdBuildDefinition>
<ModuleSaBuildOptions>
<FvBinding>NULL</FvBinding>
<FfsFormatKey>PE32_PEIM</FfsFormatKey>
</ModuleSaBuildOptions>
</ModuleSA>
<ModuleSA SupArchList="IA32" PackageGuid="B6EC423C-21D2-490D-85C6-DD5864EAA674" ModuleGuid="6987936E-ED34-44db-AE97-1FA5E4ED2116">
<Libraries>
<Instance ModuleGuid="ff5c7a2c-ab7a-4366-8616-11c6e53247b6" PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>

View File

@ -742,11 +742,13 @@ GetExPcdTokenNumber (
EFI_GUID *MatchGuid;
UINTN MatchGuidIdx;
if (!PEI_DATABASE_EMPTY) {
ExMap = mPcdDatabase->PeiDb.Init.ExMapTable;
GuidTable = mPcdDatabase->PeiDb.Init.GuidTable;
MatchGuid = ScanGuid (GuidTable, sizeof(mPcdDatabase->PeiDb.Init.GuidTable), Guid);
ASSERT (MatchGuid != NULL);
if (MatchGuid != NULL) {
MatchGuidIdx = MatchGuid - GuidTable;
@ -757,11 +759,17 @@ GetExPcdTokenNumber (
}
}
}
}
ExMap = mPcdDatabase->DxeDb.Init.ExMapTable;
GuidTable = mPcdDatabase->DxeDb.Init.GuidTable;
MatchGuid = ScanGuid (GuidTable, sizeof(mPcdDatabase->DxeDb.Init.GuidTable), Guid);
//
// We need to ASSERT here. If GUID can't be found in GuidTable, this is a
// error in the BUILD system.
//
ASSERT (MatchGuid != NULL);
MatchGuidIdx = MatchGuid - GuidTable;
@ -769,7 +777,7 @@ GetExPcdTokenNumber (
for (i = 0; i < DXE_EXMAPPING_TABLE_SIZE; i++) {
if ((ExTokenNumber == ExMap[i].ExTokenNumber) &&
(MatchGuidIdx == ExMap[i].ExGuidIndex)) {
return ExMap[i].LocalTokenNumber + PEI_LOCAL_TOKEN_NUMBER;
return ExMap[i].LocalTokenNumber;
}
}

View File

@ -545,6 +545,10 @@ GetExPcdTokenNumber (
GuidTable = PeiPcdDb->Init.GuidTable;
MatchGuid = ScanGuid (GuidTable, sizeof(PeiPcdDb->Init.GuidTable), Guid);
//
// We need to ASSERT here. If GUID can't be found in GuidTable, this is a
// error in the BUILD system.
//
ASSERT (MatchGuid != NULL);
MatchGuidIdx = MatchGuid - GuidTable;

View File

@ -435,17 +435,16 @@ LibPcdSet64 (
/**
Sets a buffer for the token specified by TokenNumber to
the value specified by Buffer and SizeOfValue. Buffer to
be set is returned. The content of the buffer could be
overwritten if a Callback on SET is registered with this
TokenNumber.
Sets a buffer for the token specified by TokenNumber to the value
specified by Buffer and SizeOfValue. Buffer is returned.
If SizeOfValue is greater than the maximum size support by TokenNumber,
then set SizeOfValue to the maximum size supported by TokenNumber and
return NULL to indicate that the set operation was not actually performed.
If SizeOfValue is greater than the maximum
size support by TokenNumber, then set SizeOfValue to the
maximum size supported by TokenNumber and return NULL to
indicate that the set operation was not actually performed.
If SizeOfValue is set to MAX_ADDRESS, then SizeOfValue must be set to the
maximum size supported by TokenName and NULL must be returned.
If SizeOfValue is NULL, then ASSERT().
If SizeOfValue > 0 and Buffer is NULL, then ASSERT().
@param[in] TokenNumber The PCD token number to set a current value for.
@ -577,6 +576,8 @@ LibPcdSetEx64 (
supported by TokenNumber and return NULL to indicate that the set operation
was not actually performed.
If Guid is NULL, then ASSERT().
If SizeOfValue is NULL, then ASSERT().
If SizeOfValue > 0 and Buffer is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
@ -731,7 +732,7 @@ LibPcdGetNextToken (
**/
CONST GUID*
GUID *
EFIAPI
LibPcdGetNextTokenSpace (
IN CONST GUID *Guid

View File

@ -31,6 +31,8 @@ LibPcdSetSku (
IN UINTN SkuId
)
{
ASSERT (SkuId < 0x100);
return SkuId;
}
@ -633,6 +635,8 @@ LibPcdSetExPtr (
{
ASSERT (Guid != NULL);
ASSERT (SizeOfBuffer != NULL);
if (*SizeOfBuffer > 0) {
ASSERT (Buffer != NULL);
}
@ -768,7 +772,7 @@ LibPcdGetNextToken (
@retval CONST GUID * The next valid token namespace.
**/
CONST GUID*
GUID *
EFIAPI
LibPcdGetNextTokenSpace (
IN CONST GUID *Guid

View File

@ -57,6 +57,8 @@ LibPcdSetSku (
IN UINTN SkuId
)
{
ASSERT (SkuId < 0x100);
mPcd->SetSku (SkuId);
return SkuId;
@ -728,10 +730,15 @@ LibPcdSetExPtr (
EFI_STATUS Status;
UINTN Size;
ASSERT (Guid != NULL);
ASSERT (SizeOfBuffer != NULL);
if (*SizeOfBuffer > 0) {
ASSERT (Buffer != NULL);
}
Size = LibPcdGetExSize (Guid, TokenNumber);
if (*SizeOfBuffer > Size) {
*SizeOfBuffer = Size;
@ -901,7 +908,7 @@ LibPcdGetNextToken (
@retval CONST GUID * The next valid token namespace.
**/
CONST GUID*
GUID *
EFIAPI
LibPcdGetNextTokenSpace (
IN CONST GUID *Guid
@ -913,6 +920,6 @@ LibPcdGetNextTokenSpace (
ASSERT_EFI_ERROR (Status);
return Guid;
return (GUID *) Guid;
}

View File

@ -68,6 +68,8 @@ LibPcdSetSku (
)
{
ASSERT (SkuId < 0x100);
GetPcdPpiPtr()->SetSku (SkuId);;
return SkuId;
@ -586,6 +588,8 @@ LibPcdSetPtr (
PCD_PPI *PcdPpi;
UINTN Size;
ASSERT (SizeOfBuffer != NULL);
if (*SizeOfBuffer > 0) {
ASSERT (Buffer != NULL);
}
@ -999,7 +1003,7 @@ LibPcdGetNextToken (
@retval CONST GUID * The next valid token namespace.
**/
CONST GUID*
GUID *
EFIAPI
LibPcdGetNextTokenSpace (
IN CONST GUID *Guid
@ -1015,6 +1019,6 @@ LibPcdGetNextTokenSpace (
ASSERT_EFI_ERROR (Status);
return Guid;
return (GUID *)Guid;
}

View File

@ -21,7 +21,7 @@ typedef UINT8 SKU_ID;
typedef struct {
UINT32 ExTokenNumber;
UINT32 LocalTokenNumber; // PCD Number of this particular platform build
UINT16 LocalTokenNumber; // PCD Number of this particular platform build
UINT16 ExGuidIndex; // Index of GuidTable
} DYNAMICEX_MAPPING;

View File

@ -1008,6 +1008,30 @@ class PcdDatabase {
}
}
private int getHiiPtrTypeAlignmentSize(Token token) {
switch (token.datumType) {
case UINT8:
return 1;
case UINT16:
return 2;
case UINT32:
return 4;
case UINT64:
return 8;
case POINTER:
if (token.isHiiEnable()) {
if (token.isHiiDefaultValueUnicodeStringType()) {
return 2;
}
}
return 1;
case BOOLEAN:
return 1;
default:
return 1;
}
}
private int getAlignmentSize (Token token) {
if (token.getDefaultSku().type == DynamicTokenValue.VALUE_TYPE.HII_TYPE) {
return 2;
@ -1599,11 +1623,8 @@ class PcdDatabase {
privateGlobalName = t.getPrimaryKeyString();
}
if (t.isUnicodeStringType()) {
privateGlobalCCode = String.format("%-20s%s[%d];\r\n", "STRING_HEAD", t.getPrimaryKeyString(), t.getSkuIdCount());
} else {
String type = getCType(t);
if (t.datumType == Token.DATUM_TYPE.POINTER) {
if ((t.datumType == Token.DATUM_TYPE.POINTER) && (!t.isHiiEnable())) {
int bufferSize;
if (t.isASCIIStringType()) {
//
@ -1618,9 +1639,9 @@ class PcdDatabase {
privateGlobalCCode = String.format("%-20s%s[%d];\r\n", type, privateGlobalName, t.getSkuIdCount());
}
}
}
private String getDataTypeDeclarationForVariableDefault_new (Token token, String cName, int skuId) {
private String getDataTypeDeclarationForVariableDefault_new (Token token, String cName, int skuId)
throws EntityException {
String typeStr;
@ -1635,9 +1656,27 @@ class PcdDatabase {
} else if (token.datumType == Token.DATUM_TYPE.BOOLEAN) {
typeStr = "BOOLEAN";
} else if (token.datumType == Token.DATUM_TYPE.POINTER) {
return String.format("%-20s%s[%d];\r\n", cName, token.datumSize);
int size;
if (token.isHiiDefaultValueUnicodeStringType()) {
typeStr = "UINT16";
//
// Include the NULL charactor
//
size = token.datumSize / 2 + 1;
} else {
typeStr = "";
typeStr = "UINT8";
if (token.isHiiDefaultValueASCIIStringType()) {
//
// Include the NULL charactor
//
size = token.datumSize + 1;
} else {
size = token.datumSize;
}
}
return String.format("%-20s%s[%d];\r\n", typeStr, cName, size);
} else {
throw new EntityException("Unknown DATUM_TYPE type in when generating code for VARIABLE_ENABLED PCD entry");
}
return String.format("%-20s%s;\r\n", typeStr, cName);
@ -1678,7 +1717,7 @@ class PcdDatabase {
s += tab + "{" + newLine;
for (i = 0; i < t.skuData.size(); i++) {
if (t.isUnicodeStringType() && !t.isHiiEnable()) {
if (t.isUnicodeStringType()) {
s += tab + tab + String.format("{ %d }", stringTable.add(t.skuData.get(i).value.value, t));
} else if (t.isHiiEnable()) {
/* VPD_HEAD definition
@ -1686,6 +1725,7 @@ class PcdDatabase {
UINT16 GuidTableIndex; // Offset in Guid Table in units of GUID.
UINT16 StringIndex; // Offset in String Table in units of UINT16.
UINT16 Offset; // Offset in Variable
UINT16 DefaultValueOffset; // Offset of the Default Value
} VARIABLE_HEAD ;
*/
String variableDefaultName = String.format("%s_VariableDefault_%d", t.getPrimaryKeyString(), i);
@ -1700,7 +1740,7 @@ class PcdDatabase {
// the instantiation for the default value.
//
CStructTypeDeclaration decl = new CStructTypeDeclaration (variableDefaultName,
getDataTypeAlignmentSize(t),
getHiiPtrTypeAlignmentSize(t),
getDataTypeDeclarationForVariableDefault_new(t, variableDefaultName, i),
true
);

View File

@ -587,8 +587,6 @@ public class Token {
DynamicTokenValue dynamicData = getDefaultSku();
if (hasDefaultValue()) {
switch (dynamicData.type) {
case HII_TYPE:
return dynamicData.hiiDefaultValue;
case DEFAULT_TYPE:
return dynamicData.value;
}
@ -626,7 +624,6 @@ public class Token {
}
public boolean isValidNullValue(String judgedValue) {
int intValue;
String subStr;
BigInteger bigIntValue;
@ -688,6 +685,26 @@ public class Token {
return false;
}
public boolean isHiiDefaultValueUnicodeStringType() {
DynamicTokenValue dynamicData = getDefaultSku();
if (dynamicData == null)
return false;
return dynamicData.hiiDefaultValue.startsWith("L\"")
&& dynamicData.hiiDefaultValue.endsWith("\"");
}
public boolean isHiiDefaultValueASCIIStringType() {
DynamicTokenValue dynamicData = getDefaultSku();
if (dynamicData == null)
return false;
return dynamicData.hiiDefaultValue.startsWith("\"")
&& dynamicData.hiiDefaultValue.endsWith("\"");
}
/**
Judege whether current value is UNICODE string type.
@return boolean