Changed the Type attribute of FvImage to be ENUM type: FvImageTypes (Attributes ...
[mirror_edk2.git] / Tools / XMLSchema / FrameworkPlatformDataElements.xsd
index 5cbaaca699fae05145093ee6f3966409652f0842..535ac407f31cb6aaa51d9eb7c452c337d51de621 100644 (file)
             <xs:documentation xml:lang="en">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.</xs:documentation>\r
         </xs:annotation>\r
         <xs:complexType>\r
-            <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
-                <xs:element minOccurs="1" maxOccurs="1" name="Name" type="NameConvention"/>\r
-                <xs:element minOccurs="0" maxOccurs="unbounded" name="File" type="FvImageFileType"/>\r
-            </xs:sequence>\r
+            <xs:all>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="RawData">\r
+                    <xs:complexType>\r
+                        <xs:sequence minOccurs="0" maxOccurs="1">\r
+                            <xs:element name="Data" type="xs:string"/>\r
+                        </xs:sequence>\r
+                        <xs:attributeGroup ref="RawDataAttributes"/>\r
+                    </xs:complexType>\r
+                </xs:element>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="File">\r
+                    <xs:complexType>\r
+                        <xs:attributeGroup ref="FlashDeviceImageFileAttributes"/>\r
+                    </xs:complexType>\r
+                </xs:element>\r
+            </xs:all>\r
+            <xs:attributeGroup ref="FlashDeviceImageAttributes"/>\r
         </xs:complexType>\r
     </xs:element>\r
     <xs:element name="FlashDeviceInfo">\r
         </xs:annotation>\r
         <xs:complexType>\r
             <xs:sequence>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="Name" type="UCNameType"/>\r
-                <xs:element default="512KB" minOccurs="1" maxOccurs="1" name="FlashSize" type="FlashSize"/>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="BaseAddress" type="HexAddressType"/>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="OutputDirectory" type="DirectoryNamingConvention"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" name="MicrocodeFile" type="FileNameConvention"/>\r
-                <xs:element minOccurs="1" maxOccurs="255" name="Block" type="BlockNameType"/>\r
-                <xs:element minOccurs="1" maxOccurs="unbounded" name="Region" type="RegionDataType"/>\r
+                <xs:element name="Blocks">\r
+                    <xs:complexType>\r
+                        <xs:sequence>\r
+                            <xs:element minOccurs="1" maxOccurs="255" name="Block">\r
+                                <xs:complexType>\r
+                                    <xs:simpleContent>\r
+                                        <xs:extension base="BlockNameType">\r
+                                            <xs:attributeGroup ref="BlockAttributes"/>\r
+                                        </xs:extension>\r
+                                    </xs:simpleContent>\r
+                                </xs:complexType>\r
+                            </xs:element>\r
+                        </xs:sequence>\r
+                    </xs:complexType>\r
+                </xs:element>\r
+                <xs:element name="Regions">\r
+                    <xs:complexType>\r
+                        <xs:sequence>\r
+                            <xs:element minOccurs="1" maxOccurs="unbounded" name="Region">\r
+                                <xs:complexType>\r
+                                    <xs:all>\r
+                                        <xs:element name="SubRegions">\r
+                                            <xs:complexType>\r
+                                                <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
+                                                    <xs:element name="SubRegion">\r
+                                                        <xs:complexType>\r
+                                                            <xs:simpleContent>\r
+                                                                <xs:extension base="xs:string">\r
+                                                                    <xs:attributeGroup ref="SubRegionAttributes"/>\r
+                                                                </xs:extension>\r
+                                                            </xs:simpleContent>\r
+                                                        </xs:complexType>\r
+                                                    </xs:element>\r
+                                                </xs:sequence>\r
+                                            </xs:complexType>\r
+                                        </xs:element>\r
+                                    </xs:all>\r
+                                    <xs:attributeGroup ref="RegionAttributes"/>\r
+                                </xs:complexType>\r
+                            </xs:element>\r
+                        </xs:sequence>\r
+                    </xs:complexType>\r
+                </xs:element>\r
             </xs:sequence>\r
+            <xs:attributeGroup ref="BlockAttributes"/>\r
         </xs:complexType>\r
     </xs:element>\r
     <xs:element name="FlashDeviceOverrideImage">\r
                 <xs:element minOccurs="1" maxOccurs="unbounded" ref="FvImageNames"/>\r
                 <xs:element minOccurs="0" maxOccurs="1" ref="FvImageOptions"/>\r
             </xs:sequence>\r
-            <xs:attribute name="Type" type="xs:string" use="optional"/>\r
+            <xs:attribute name="Type" type="FvImageTypes" use="optional"/>\r
         </xs:complexType>\r
     </xs:element>\r
     <xs:element name="FvImageName">\r
             <xs:attribute name="Name" type="FvRegionTypes" use="required"/>\r
         </xs:complexType>\r
     </xs:element>\r
-    <xs:element name="FvImageNames" type="xs:string"/>\r
+    <xs:element name="FvImageNames" type="xs:NCName"/>\r
     <xs:element name="FvImageOptions">\r
         <xs:annotation>\r
             <xs:documentation xml:lang="en">This element is used specify different name value pairs.</xs:documentation>\r
         </xs:annotation>\r
         <xs:complexType>\r
             <xs:sequence minOccurs="1">\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="SourceFiles"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="Includes"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="SourceFiles"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="Includes"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
                 <xs:element minOccurs="0" maxOccurs="1" ref="Libraries"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="Protocols"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="Events"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="Hobs"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="PPIs"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="Variables"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="BootModes"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="SystemTables"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="DataHubs"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="Formsets"/>\r
-                <xs:element minOccurs="0" maxOccurs="1" ref="Guids"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="Protocols"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="Events"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="Hobs"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="PPIs"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="Variables"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="BootModes"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="SystemTables"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="DataHubs"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="Formsets"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="Guids"/>  <!-- DO NOT USE! REMOVE in FINAL -->\r
                 <xs:element minOccurs="0" maxOccurs="1" ref="Externs"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="PcdBuildDeclarations"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" ref="BuildOptions"/>\r
             </xs:sequence>\r
             <xs:attributeGroup ref="MsaAttributes"/>\r
         </xs:complexType>\r
         </xs:complexType>\r
     </xs:element>\r
     <xs:element name="Overrides">\r
+        <xs:annotation>\r
+            <xs:documentation xml:lang="en">DO NOT USE! - Removing this from Schema</xs:documentation>\r
+        </xs:annotation>\r
         <xs:complexType>\r
             <xs:sequence>\r
                 <xs:element minOccurs="0" maxOccurs="1" ref="FlashDeviceOverrideInfo"/>\r
         </xs:complexType>\r
     </xs:element>\r
     <xs:element name="PlatformDescriptions">\r
+        <xs:annotation>\r
+            <xs:documentation xml:lang="en">DO NOT USE! - Use PlatformList instead</xs:documentation>\r
+        </xs:annotation>\r
         <xs:complexType>\r
             <xs:sequence maxOccurs="unbounded">\r
                 <xs:element ref="Platform"/>\r
             </xs:sequence>\r
         </xs:complexType>\r
     </xs:element>\r
+    <xs:element name="PlatformList">\r
+        <xs:annotation>\r
+            <xs:documentation xml:lang="en">This is used in the Framework Database file</xs:documentation>\r
+        </xs:annotation>\r
+        <xs:complexType>\r
+            <xs:sequence maxOccurs="unbounded">\r
+                <xs:element ref="Platform"/>\r
+            </xs:sequence>\r
+        </xs:complexType>\r
+    </xs:element>\r
+    <xs:element name="FrameworkModules">\r
+        <xs:annotation>\r
+            <xs:documentation xml:lang="en">This is used in a Framework Platform Description (FPD) file</xs:documentation>\r
+        </xs:annotation>\r
+        <xs:complexType>\r
+            <xs:sequence>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="SEC" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="PEI_CORE" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="PEIM" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="DXE_CORE" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="DXE_DRIVERS" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="OTHER_COMPONENTS" type="Components"/>\r
+            </xs:sequence>\r
+        </xs:complexType>\r
+    </xs:element>\r
     <xs:element name="TianoImage">\r
         <xs:annotation>\r
-            <xs:documentation xml:lang="en">This defines the required sections of a valid EFI/Tiano binary image</xs:documentation>\r
+            <xs:documentation xml:lang="en">DO NOT USE - Use FrameworkModules Instead.</xs:documentation>\r
         </xs:annotation>\r
         <xs:complexType>\r
             <xs:sequence>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="SEC" type="Components"/>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="PEI_CORE" type="Components"/>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="PEIM" type="Components"/>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="DXE_CORE" type="Components"/>\r
-                <xs:element minOccurs="1" maxOccurs="1" name="DXE_DRIVERS" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="SEC" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="PEI_CORE" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="PEIM" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="DXE_CORE" type="Components"/>\r
+                <xs:element minOccurs="0" maxOccurs="1" name="DXE_DRIVERS" type="Components"/>\r
                 <xs:element minOccurs="0" maxOccurs="1" name="OTHER_COMPONENTS" type="Components"/>\r
             </xs:sequence>\r
         </xs:complexType>\r
             <xs:enumeration value="4MB"/>\r
         </xs:restriction>\r
     </xs:simpleType>\r
+    <xs:simpleType name="FvImageTypes">\r
+        <xs:restriction base="xs:NCName">\r
+            <xs:enumeration value="Attributes"/>\r
+            <xs:enumeration value="Options"/>\r
+            <xs:enumeration value="Components"/>\r
+        </xs:restriction>\r
+    </xs:simpleType>\r
     <xs:simpleType name="FvSubRegionTypes">\r
         <xs:restriction base="UCNameType">\r
             <xs:enumeration value="NV_VARIABLE_STORE"/>\r
             <xs:element minOccurs="1" maxOccurs="1" name="NameGuid" type="EfiNameGuidType"/>\r
         </xs:sequence>\r
     </xs:complexType>\r
+    <xs:attributeGroup name="BlockAttributes">\r
+        <xs:attribute name="Name" type="BlockNameType" use="required"/>\r
+        <xs:attribute name="Size" type="HexAddressType" use="required"/>\r
+        <xs:attribute name="Flags" type="HexAddressType" use="optional"/>\r
+    </xs:attributeGroup>\r
+    <xs:attributeGroup name="FlashDeviceImageAttributes">\r
+        <xs:attribute name="Name" type="xs:string" use="required"/>\r
+    </xs:attributeGroup>\r
+    <xs:attributeGroup name="FlashDeviceImageFileAttributes">\r
+        <xs:attribute name="Name" type="xs:string" use="required"/>\r
+        <xs:attribute name="Region" type="xs:string" use="required"/>\r
+        <xs:attribute name="SubRegion" type="xs:string" use="optional"/>\r
+        <xs:attribute name="Optional" type="xs:boolean" use="optional"/>\r
+    </xs:attributeGroup>\r
+    <xs:attributeGroup name="FlashDeviceInfoAttributes">\r
+        <xs:attribute name="Name" type="xs:string" use="required"/>\r
+        <xs:attribute name="Size" type="HexAddressType" use="required"/>\r
+        <xs:attribute name="BaseAddress" type="HexAddressType" use="required"/>\r
+        <xs:attribute name="ErasePolarity" type="ZeroOrOne" use="required"/>\r
+    </xs:attributeGroup>\r
+    <xs:attributeGroup name="RawDataAttributes">\r
+        <xs:attribute name="Name" type="xs:string" use="required"/>\r
+        <xs:attribute name="Region" type="xs:string" use="required"/>\r
+        <xs:attribute name="SubRegion" type="xs:string" use="required"/>\r
+    </xs:attributeGroup>\r
+    <xs:attributeGroup name="RegionAttributes">\r
+        <xs:attribute name="Name" type="xs:string" use="required"/>\r
+        <xs:attribute name="Size" type="HexAddressType" use="required"/>\r
+        <xs:attribute name="Flags" type="HexAddressType" use="optional"/>\r
+        <xs:attribute name="Alignment" type="HexAddressType" use="optional"/>\r
+        <xs:attribute name="Attributes" type="xs:string" use="required"/>\r
+        <xs:attribute name="AreaType" type="EfiFvAreaType" use="required"/>\r
+    </xs:attributeGroup>\r
+    <xs:attributeGroup name="SubRegionAttributes">\r
+        <xs:attribute name="CreateHob" type="xs:boolean" use="required"/>\r
+        <xs:attribute name="Name" type="xs:string" use="required"/>\r
+        <xs:attribute name="Size" type="HexAddressType" use="required"/>\r
+        <xs:attribute name="Attributes" type="xs:string" use="required"/>\r
+        <xs:attribute name="AreaType" type="EfiFvAreaType" use="required"/>\r
+        <xs:attribute name="NameGuid" type="xs:string" use="required"/>\r
+        <xs:attribute name="AreaTypeGuid" type="xs:string" use="optional"/>\r
+        <xs:attribute name="FileSystemGuid" type="xs:string" use="optional"/>\r
+    </xs:attributeGroup>\r
 </xs:schema>\r