From 6c4dc2267a9c87d40ff6bfc042e13b3e838df26e Mon Sep 17 00:00:00 2001 From: klu2 Date: Wed, 21 Jun 2006 16:07:38 +0000 Subject: [PATCH 1/1] 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 --- .../build/pcd/action/CollectPCDAction.java | 23 +- Tools/XMLSchema/FrameworkDataAttributes.xsd | 12 +- Tools/XMLSchema/FrameworkDataElements.xsd | 271 +---- Tools/XMLSchema/FrameworkDataTypes.xsd | 14 +- .../FrameworkPlatformDataElements.xsd | 937 +++++++++--------- Tools/XMLSchema/SurfaceArea.xsd | 9 +- 6 files changed, 530 insertions(+), 736 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 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 is " + skuInstance.value.value + ". They are must be same!"+ " or you could not define value for a dynamic PCD in every !"; @@ -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; } diff --git a/Tools/XMLSchema/FrameworkDataAttributes.xsd b/Tools/XMLSchema/FrameworkDataAttributes.xsd index b08c8b7b86..288d12f309 100644 --- a/Tools/XMLSchema/FrameworkDataAttributes.xsd +++ b/Tools/XMLSchema/FrameworkDataAttributes.xsd @@ -385,10 +385,20 @@ + + + These attributes are for the Pcds listed in PcdData, PcdEntry and/or PcdBuildData entries. + + + - + + + + + diff --git a/Tools/XMLSchema/FrameworkDataElements.xsd b/Tools/XMLSchema/FrameworkDataElements.xsd index 8e00b70ea6..5d9966d740 100644 --- a/Tools/XMLSchema/FrameworkDataElements.xsd +++ b/Tools/XMLSchema/FrameworkDataElements.xsd @@ -1177,230 +1177,6 @@ - - - NEW: Will become a child of ModuleSA in the FPD - - - - - - - Child of PcdBuildDeclarations - This is date element is used in the platform build description file and contains valid data for a Platform Build - There is ONE required Attribute, ItemType - - - - - - - This as a unique identifier defined for either this name space. - The Target Attribute may be used to define a Target name space, such as PCI. - - - - - - - - - - - - - This specifies the size of the Pcd Datum. It is either 8, 16, 32 or 64 bits for values, 1 bit for BOOLEAN and variable length for elements defined as VOID* - - - - - This Bit means that the Variable data is associated with HII - - - - - This bit enables the Vital Product Data area within flash for maintaining PCD information - - - - - This is only applicable to ItemType DYNAMIC_EX - - - - - - - - This element is a list of two entries per line, the first should be an integer, while the second entry should be a string value - - - - - - - - This section is for a list of SkuData Elements, ID and Value - - - - - - - - - - - - This value comes from a production line database, and has nothing to do with the number of SkuData IDs that have been defined. - - - - - This is the specific Sku ID for this build. - - - - - Max Number of Bytes of the data. - - - - - - - - - - - This is the Variable's GUID if and only if HII is enabled. - - - - - This is the C Name for the Variable, and is valid if and only HII is enabled. - - - - - - If HII is enabled, This is the offset into the variable data entry, If Vpd is enabled, then it's the Offset into the VPD area of the image defined by platform manufacturer, if neither HII nor Vpd are enabled, it's the offset into the PCD Data Area. HII and VPD can never be enabled at the same time (as of the date of this document.) - - - - - FIELD IS NOT USED! REMOVE in FINAL! - - - - - - - - - This is an enumerated data type that will be used for DYNAMIC_EX, PEIM or DXE only - - - - - - - - - - - - - - - - Child of Framework Platform Description (FPD) - We permit the FPD to use an external XML file for PCD information or else the information must be contained within the XML data element, PcdBuildData. - - - - - - Child of PcdBuildDeclarations - This is date element is used in the platform build description file and contains valid data for a Platform Build - There is ONE required Attribute, ItemType - - - - - - - - This as a unique identifier defined for either this name space. - The Target Attribute may be used to define a Target name space, such as PCI. - - - - - - - - - - - - - - - - - - - - This element is a list of two entries per line, the first should be an integer, while the second entry should be a string value - - - - - - - - This section is for a list of SkuData Elements, ID and Value - - - - - - - - - - - - This value comes from a production line database, and has nothing to do with the number of SkuData IDs that have been defined. - - - - - - - - - - - - - - - - This is an enumerated data type that will be used for DYNAMIC_EX, PEIM or DXE only - - - - - - - - - - - - Child of Framework Platform Description (FPD) @@ -1408,10 +1184,10 @@ - + - + @@ -1429,7 +1205,7 @@ - + @@ -1440,16 +1216,17 @@ Child of FPD ModuleSA element for FIXED_AT_BUILD, PATCHABLE_IN_MODULE, and FEATURE_FLAG PCDS Only! - - + + - + - + + - + @@ -1459,7 +1236,7 @@ - + @@ -1467,10 +1244,10 @@ If HiiEnable group is specified, then HiiEnable is default true - + - - + + @@ -1478,7 +1255,7 @@ If VpdEnable group is specified, then VpdEnable is default true - + @@ -1486,20 +1263,20 @@ Child of Module Surface Area Description (MSA) - - + + This is the valid content of the PCD table of a Module. The contents may not be wired at build time, and these only refer to Platform Build values, not modules. This element is valid for PcdInfo.xml and FPD files. - - - + + + - + @@ -1516,13 +1293,13 @@ - + - - + + @@ -1572,7 +1349,7 @@ - + diff --git a/Tools/XMLSchema/FrameworkDataTypes.xsd b/Tools/XMLSchema/FrameworkDataTypes.xsd index b99fd2b495..7cf160294a 100644 --- a/Tools/XMLSchema/FrameworkDataTypes.xsd +++ b/Tools/XMLSchema/FrameworkDataTypes.xsd @@ -114,9 +114,9 @@ - - - + + + @@ -262,6 +262,14 @@ + + + + + + + + diff --git a/Tools/XMLSchema/FrameworkPlatformDataElements.xsd b/Tools/XMLSchema/FrameworkPlatformDataElements.xsd index 3fb6b07af7..234535901f 100644 --- a/Tools/XMLSchema/FrameworkPlatformDataElements.xsd +++ b/Tools/XMLSchema/FrameworkPlatformDataElements.xsd @@ -1,471 +1,466 @@ - - - - - This schema defines EFI and Framework Platform Data Elements that are specific to platform creation. - - - - - - - - - - - - - - - - - - This element is used specify different name value pairs. - - - - - - - - - - - - This element is used specify different name value pairs. - - - - - - - - - - - - Permit multiple Capsule Sections - - - - - - - - - - - - - We allow specifying the Flash layout in this directory, or we allow specifying a flashmap filename - - - - - - - - - - - - - - - Define contents of the regions in flash. The files and data are placed in the output image in the order they are encountered in this definition. Multiple FlashDeviceImage sections may be defined. Which one the tool should use is specified by Name on the command line. - - - - - - - - - - - - - - - - - - - - - - - This is the Flash Devcie definition List - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Define OVERRIDE contents of the regions in flash. Only what is different here from what may defined in other areas (or files) is needed - - - - - - - - - - - This is the Flash Devcie Override Definition list. Only what is different from the previously defined stuff needs to be included. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This element is used specify different name value pairs. - - - - - - - - - - - - This section allows the user to define specific information regarding the FvImage - - - - - - - - - - - - - - - - - - - - - - - - This element is used to specify information in the Platform Description File. - This is a mixed element, allowing the user to specify the name of the MSA file, as well as to optionally specify additional override information. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Only specification is allow here. We need to let this be an addtion OR, if the WORD portion exists, this entry takes precedence. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DO NOT USE! - Removing this from Schema - - - - - - - - - - - DO NOT USE! - Use PlatformList instead - - - - - - - - - - This is used in the Framework Database file - - - - - - - - - - - This is used in a Framework Platform Description (FPD) file - - - - - - - - - - - - - - - - - - - - DO NOT USE - Use FrameworkModules Instead. - - - - - - - - - - - - - - - - We allow specifying the FlashMap filename - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Define the regions and their uses for the device - - - - - - - - - - - - Define the regions and their uses for the device - - - - - - - - - - - + + + + + This schema defines EFI and Framework Platform Data Elements that are specific to platform creation. + + + + + + + + + + + + + + + + + + This element is used specify different name value pairs. + + + + + + + + + + + + This element is used specify different name value pairs. + + + + + + + + + + + + Permit multiple Capsule Sections + + + + + + + + + + + + + We allow specifying the Flash layout in this directory, or we allow specifying a flashmap filename + + + + + + + + + + + + + + + Define contents of the regions in flash. The files and data are placed in the output image in the order they are encountered in this definition. Multiple FlashDeviceImage sections may be defined. Which one the tool should use is specified by Name on the command line. + + + + + + + + + + + + + + + + + + + + + + + This is the Flash Devcie definition List + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Define OVERRIDE contents of the regions in flash. Only what is different here from what may defined in other areas (or files) is needed + + + + + + + + + + + This is the Flash Devcie Override Definition list. Only what is different from the previously defined stuff needs to be included. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is used specify different name value pairs. + + + + + + + + + + + + This section allows the user to define specific information regarding the FvImage + + + + + + + + + + + + + + + + + + + + + + + + This element is used to specify information in the Platform Description File. + This is a mixed element, allowing the user to specify the name of the MSA file, as well as to optionally specify additional override information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only specification is allow here. We need to let this be an addtion OR, if the WORD portion exists, this entry takes precedence. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DO NOT USE! - Removing this from Schema + + + + + + + + + + + DO NOT USE! - Use PlatformList instead + + + + + + + + + + This is used in the Framework Database file + + + + + + + + + + + This is used in a Framework Platform Description (FPD) file + + + + + + + + + + + + + + + + + + + + DO NOT USE - Use FrameworkModules Instead. + + + + + + + + + + + + + + + + We allow specifying the FlashMap filename + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Define the regions and their uses for the device + + + + + + + + + + + + Define the regions and their uses for the device + + + + + + + + + + + diff --git a/Tools/XMLSchema/SurfaceArea.xsd b/Tools/XMLSchema/SurfaceArea.xsd index 4c3f16f822..c5de6b3082 100644 --- a/Tools/XMLSchema/SurfaceArea.xsd +++ b/Tools/XMLSchema/SurfaceArea.xsd @@ -37,18 +37,11 @@ - - - - - - - - + -- 2.39.2