summaryrefslogtreecommitdiff
path: root/Tools/XMLSchema/FrameworkPlatformDataElements.xsd
blob: 85ed426f95ed6d4a3db782f82f965daa0dab33ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://www.TianoCore.org/2006/Edk2.0" targetNamespace="http://www.TianoCore.org/2006/Edk2.0">
  <!--
    Filename: FrameworkPlatformDataElements.xsd
    
    Copyright (c) 2006, Intel Corp.
    All rights reserved. This program and the accompanying materials
    are licensed and made available under the terms and conditions of the BSD License
    which may be found at http://opensource.org/licenses/bsd-license.php
    
    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    
  -->
  <xs:annotation>
    <xs:documentation xml:lang="en"> This schema defines EFI and Framework Platform Data Elements that are specific to platform creation.</xs:documentation>
  </xs:annotation>
  <xs:include schemaLocation="NamingConvention.xsd"/>
  <xs:include schemaLocation="FrameworkDataAttributes.xsd"/>
  <xs:include schemaLocation="FrameworkDataTypes.xsd"/>
  <xs:include schemaLocation="FrameworkDataElements.xsd"/>
  <xs:include schemaLocation="FrameworkPlatformDataTypes.xsd"/>
  <xs:element name="DataArray">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="HexByteArrayType">
          <xs:attribute name="Name" type="xs:normalizedString" use="required"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="DataId">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:NCName">
          <xs:attribute name="Seq" type="xs:nonNegativeInteger" use="required"/>
          <xs:attribute name="SubRegion" type="UCNameType" use="required"/>
          <xs:attribute name="DataSource" type="xs:normalizedString" use="required"/>
          <xs:attribute name="SourceType" type="xs:NCName" use="required"/>
          <xs:attribute name="DataSize" type="HexAddressType" use="optional"/>
          <xs:attribute name="Alignment" type="xs:positiveInteger" use="optional"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="DataRegions">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="unbounded" name="FvDataRegion">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" maxOccurs="unbounded" ref="DataId"/>
              <xs:element minOccurs="0" maxOccurs="unbounded" ref="DataArray"/>
            </xs:sequence>
            <xs:attribute name="Name" type="UCNameType" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Flash">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" ref="FlashDefinitionFile"/>
        <xs:element minOccurs="0" maxOccurs="1" ref="FvImages"/>
      </xs:sequence>
      <xs:attribute name="MicrocodeFile" type="PathAndFilename" use="optional"/>
    </xs:complexType>
  </xs:element>
  <!-- Valid Flash Definition Files that can be used for a platform The UiName and Perferred tags are optional, for use with  Wizards.-->
  <xs:element name="FlashDefinitionFile">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="PathAndFilename">
          <!-- Id will be required eventually. -->
          <xs:attribute name="Id" type="KeywordType" use="optional"/>
          <xs:attribute name="UiName" type="UiNameType" use="optional"/>
          <xs:attribute name="Preferred" type="xs:boolean" use="optional" default="false"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <!-- For Future Use! -->
  <!-- This describes the physical layout of the hardware device, used by tools to verify different regions fit within a given number of blocks. -->
  <!-- An EFI Region MUST start on a block boundary.  A region may span multiple blocks. -->
  <xs:element name="FlashDevice">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="PartNumber" type="xs:NCName"/>
        <xs:choice>
          <xs:sequence minOccurs="0">
            <!-- Use this sequence for a part with fixed block sizes -->
            <xs:element minOccurs="1" maxOccurs="1" name="NumBlocks" type="xs:positiveInteger"/>
            <xs:element minOccurs="1" maxOccurs="1" name="BlockSize" type="HexAddressType"/>
          </xs:sequence>
          <xs:sequence minOccurs="0">
            <!-- Use this sequence for a part with variable block sizes -->
            <xs:element maxOccurs="unbounded" name="VariableBlockSize">
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="HexAddressType">
                    <xs:attribute name="BlockNum" type="xs:nonNegativeInteger" use="required"/>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:choice>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FlashDeviceDefinitions">
    <xs:complexType>
      <xs:annotation>
        <xs:documentation xml:lang="en">We allow specifying the FlashMap filename</xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="unbounded" ref="FlashDefinitionFile"/>
        <xs:element minOccurs="1" maxOccurs="1" ref="FvImages"/>
        <!-- DataRegions is for Future Use! -->
        <xs:element minOccurs="0" maxOccurs="1" ref="DataRegions"/>
        <xs:element minOccurs="1" maxOccurs="unbounded" ref="FvImageBindingSequence"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FrameworkModules">
    <xs:annotation>
      <xs:documentation xml:lang="en">This is used in a Framework Platform Description (FPD) file</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="unbounded" ref="ModuleSA"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FvAttribute">
    <xs:complexType>
      <xs:attribute name="Name" type="xs:NCName" use="required"/>
      <xs:attribute name="Value" type="xs:normalizedString" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="FwImage">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="1" ref="FvRegionName"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="FvOption"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="FvAttribute"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FvImageBindingSequence">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="ValidRegionNameListType">
          <xs:attribute name="PartId" type="KeywordType" use="required"/>
          <xs:attribute name="OutputFile" type="PathAndFilename" use="required"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="FvImages">
    <xs:annotation>
      <xs:documentation xml:lang="en">This section allows the user to define specific information regarding the FvImage</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice>
        <xs:sequence minOccurs="0">
          <!-- This is the current style -->
          <xs:element minOccurs="0" maxOccurs="unbounded" name="NameValue">
            <xs:complexType>
              <xs:attribute name="Name" type="xs:string" use="required"/>
              <xs:attribute name="Value" type="xs:string" use="required"/>
            </xs:complexType>
          </xs:element>
          <xs:choice>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="FvImage">
              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" maxOccurs="unbounded" name="FvImageNames" type="xs:NCName"/>
                  <xs:element minOccurs="0" maxOccurs="1" name="FvImageOptions">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" maxOccurs="unbounded" name="NameValue">
                          <xs:complexType>
                            <xs:attribute name="Name" type="xs:string" use="required"/>
                            <xs:attribute name="Value" type="xs:string" use="required"/>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
                <xs:attribute name="Type" type="FvImageTypes" use="optional"/>
              </xs:complexType>
            </xs:element>
          </xs:choice>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="FvImageName">
            <xs:complexType>
              <xs:sequence>
                <xs:element minOccurs="1" maxOccurs="1" name="FvImageOptions">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element minOccurs="0" maxOccurs="unbounded" name="NameValue">
                        <xs:complexType>
                          <xs:attribute name="Name" type="xs:string" use="required"/>
                          <xs:attribute name="Value" type="xs:string" use="required"/>
                        </xs:complexType>
                      </xs:element>
                    </xs:sequence>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
              <xs:attribute name="Name" type="FvRegionTypes" use="required"/>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="FvRegionName">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="KeywordType">
          <xs:attributeGroup ref="FvRegionNameAttributes"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="ModuleSA">
    <xs:annotation>
      <xs:documentation xml:lang="en">This element is used to specify information in the FPD ModuleSA section.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" ref="Libraries"/>
        <!-- Only specification is allow here. We need to let this be an addtion OR, if the WORD portion MATCHES, this entry takes precedence.</xs:documentation -->
        <xs:element minOccurs="0" maxOccurs="unbounded" name="Specification" type="Sentence"/>
        <xs:element minOccurs="0" maxOccurs="1" ref="PcdBuildDefinition"/>
        <xs:element minOccurs="0" maxOccurs="1" ref="ModuleSaBuildOptions"/>
        <!-- The following BuildOptions Sections is for Legacy Ffs -->
        <xs:element minOccurs="0" maxOccurs="1" name="BuildOptions">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="1" ref="UserDefinedAntTasks"/>
              <xs:element minOccurs="0" maxOccurs="1" name="ImageEntryPoint" type="C_NameType"/>
              <xs:element minOccurs="0" maxOccurs="1" name="OutputDirectory">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:anyURI">
                      <xs:attribute default="UNIFIED" name="IntermediateDirectories" use="optional">
                        <xs:simpleType>
                          <xs:restriction base="UCNameType">
                            <xs:enumeration value="MODULE"/>
                            <xs:enumeration value="UNIFIED"/>
                          </xs:restriction>
                        </xs:simpleType>
                      </xs:attribute>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" maxOccurs="1" name="Ffs">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="1" name="Attribute">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="1" maxOccurs="1" name="Name" type="C_NameType"/>
                          <xs:element minOccurs="1" maxOccurs="1" name="Value" type="C_NameType"/>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element minOccurs="0" maxOccurs="1" name="Sections">
                      <xs:complexType>
                        <xs:sequence minOccurs="1">
                          <xs:element name="Section" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element ref=" Filenames " minOccurs="0"/>
                                <xs:element name="Args" type=" ArgsType " minOccurs="0"/>
                                <xs:element name="OutFile" type=" FileNameConvention " minOccurs="0"/>
                                <xs:element name="OutputFileExtension" type=" xs:string " minOccurs="0"/>
                                <xs:element name="ToolName" type=" ToolType " minOccurs="0"/>
                              </xs:sequence>
                              <xs:attributeGroup ref=" SectionsAttributes "/>
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="Sections" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence minOccurs="1" maxOccurs="unbounded">
                                <xs:element name="Section">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element ref=" Filenames " minOccurs="0"/>
                                      <xs:element name="Args" type=" ArgsType " minOccurs="0"/>
                                      <xs:element name="OutFile" type=" FileNameConvention " minOccurs="0"/>
                                      <xs:element name="OutputFileExtension" type=" xs:string " minOccurs="0"/>
                                      <xs:element name="ToolName" type=" ToolType " minOccurs="0"/>
                                    </xs:sequence>
                                    <xs:attributeGroup ref="SectionsAttributes"/>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attributeGroup ref=" SectionsAttributes "/>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attributeGroup ref=" SectionsAttributes "/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Sections">
                <xs:complexType>
                  <xs:sequence minOccurs="1">
                    <xs:element name="Section" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element ref=" Filenames " minOccurs="0"/>
                          <xs:element name="Args" type=" ArgsType " minOccurs="0"/>
                          <xs:element name="OutFile" type=" FileNameConvention " minOccurs="0"/>
                          <xs:element name="OutputFileExtension" type=" xs:string " minOccurs="0"/>
                          <xs:element name="ToolName" type=" ToolType " minOccurs="0"/>
                        </xs:sequence>
                        <xs:attributeGroup ref=" SectionsAttributes "/>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Sections" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence minOccurs="1" maxOccurs="unbounded">
                          <xs:element name="Section">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element ref=" Filenames " minOccurs="0"/>
                                <xs:element name="Args" type=" ArgsType " minOccurs="0"/>
                                <xs:element name="OutFile" type=" FileNameConvention " minOccurs="0"/>
                                <xs:element name="OutputFileExtension" type=" xs:string " minOccurs="0"/>
                                <xs:element name="ToolName" type=" ToolType " minOccurs="0"/>
                              </xs:sequence>
                              <xs:attributeGroup ref=" SectionsAttributes "/>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attributeGroup ref=" SectionsAttributes "/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attributeGroup ref=" SectionsAttributes "/>
                </xs:complexType>
              </xs:element>
              <xs:element name="Options">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name=" Option " minOccurs="1" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base=" xs:normalizedString ">
                            <xs:attribute name="BuildTargets" type=" BuildTargetList " use="optional"/>
                            <xs:attribute name="ToolChainFamily" type=" ToolsNameConvention " use="optional"/>
                            <xs:attribute name="TagName" type=" ToolsNameConvention " use="optional"/>
                            <xs:attribute name="ToolCommand" type=" ToolsNameConvention " use="optional"/>
                            <xs:attribute name="SupArchList" type=" ArchListType " use="optional"/>
                            <xs:attribute name="Platform" type=" UiNameType " use="optional"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <!-- Do not use ToolChain - it is a legacy value -->
            <xs:attribute name="ToolChain" type="ToolChains" use="optional"/>
            <xs:attribute name="BuildTargets" type=" BuildTargetList " use="optional"/>
            <xs:attribute name="ToolChainFamily" type=" ToolsNameConvention " use="optional"/>
            <xs:attribute name="TagName" type=" ToolsNameConvention " use="optional"/>
            <xs:attribute name="ToolCommand" type=" ToolsNameConvention " use="optional"/>
            <xs:attribute name="SupArchList" type=" ArchListType " use="optional"/>
          </xs:complexType>
        </xs:element>
        <!-- The following Externs Section is for Legacy Ffs  -->
        <xs:element minOccurs="0" maxOccurs="1" name="Externs">
          <xs:complexType>
            <xs:sequence minOccurs="1">
              <xs:element name="PcdIsDriver" type=" PcdDriverTypes " minOccurs="0" maxOccurs="1"/>
              <xs:element name="Specification" type=" Sentence " minOccurs="0" maxOccurs="unbounded"/>
              <xs:element name="Extern" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:choice minOccurs="1">
                    <xs:sequence minOccurs="0" maxOccurs="1">
                      <xs:element name=" ModuleEntryPoint " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                      <xs:element name=" ModuleUnloadImage " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:sequence minOccurs="0" maxOccurs="1">
                      <xs:element name=" Constructor " type=" C_NameType " minOccurs="0" maxOccurs="1"/>
                      <xs:element name=" Destructor " type=" C_NameType " minOccurs="0" maxOccurs="1"/>
                    </xs:sequence>
                    <xs:sequence minOccurs="0" maxOccurs="1">
                      <xs:element name=" DriverBinding " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                      <xs:element name=" ComponentName " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                      <xs:element name=" DriverConfig " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                      <xs:element name=" DriverDiag " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:sequence minOccurs="0" maxOccurs="1">
                      <xs:element name=" SetVirtualAddressMapCallBack " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                      <xs:element name=" ExitBootServicesCallBack " type=" C_NameType " minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                  </xs:choice>
                  <xs:attributeGroup ref=" ExternAttributes "/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attributeGroup ref="MsaAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="FvOption">
    <xs:complexType>
      <xs:attribute name="Name" type="xs:NCName" use="required"/>
      <xs:attribute name="Value" type="xs:normalizedString" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="PlatformList">
    <!-- Valid for DB usage only! -->
    <xs:annotation>
      <xs:documentation xml:lang="en">This is used in the FrameworkDatabase file</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="unbounded" name="Filename" type="DbPathAndFilename"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>