Home
EDK II DSC File Specification
Contents
1. UINT8 UINT16 UINT32 UINT64 lt StrValue gt VOID lt MaxDatumSize gt lt EOL gt lt StringType gt lt DataArray gt lt AsciiString gt lt UnicodeString gt lt TOKEN gt In lt HexValue gt lt HexValue gt Ox lt HexDigit gt lt Integer gt lt Expression gt lt UEFI String Token Name gt lt LanguageCode gt May 2010 Version 1 22 DSC EDK II DSC Format Specification Parameters BoolExpression C style expression using C relational equality and logical numeric and bitwise operators that evaluate to either TRUE 1 or FALSE 0 Values other than zero or one are invalid Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined before it can be used Expression C style expression using C relational equality and logical numeric and bitwise operators and or arithmetic and bitwise operators that evaluate to a value that matches the Datum Type of the PCD Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined before it can be used UEFI String Token Name Language Code This is a non unicode version of an HII string token name obtained from UNI
2. lt Digit gt lt EOL gt RFC LANGUAGES lt Rfc4646LangList gt lt EOL gt ISO LANGUAGES lt Iso6392LangList gt lt EOL gt lt AddressStatements gt DEFINE lt MacroName gt lt PATH gt lt VALUE gt lt EOL gt lt SetStatements gt lt EOL gt lt IncludeStatements gt 0x00010015 lt Word gt lt Word gt lt Arch gt lt Arch gt FIX LOAD TOP MEMORY ADDRESS lt Address gt NOx lt HexDigit gt 8 16 lt Integer gt lt HexNumber gt lt Target gt lt Target gt lt PATH gt lt Word gt lt Extension gt a zA Z a zA Z0 9 WORKSPACE lt AbsPath gt lt Path gt WORKSPACE EDK_SOURCE lt SysEnv gt EFI_SOURCE a zA 2 gt V lt Word gt May 2010 Version 1 22 DSC lt File gt lt Rfc4646LangList gt lt Iso6392LangList gt lt Rfc4646Code gt lt Iso639 2Code gt lt MACRO gt lt SetStatements gt lt VALUE gt lt PcdName gt lt TokenSpaceGuidCName gt lt PcdCName gt lt Boolean gt lt Number gt lt Decimal gt lt Hex gt lt PcdName gt lt TokenCName gt lt TokenSpaceGuidCName gt lt QuotedString gt lt SingleQuotes gt lt DoubleQuotes gt lt IncludeStatements gt Parameters SkuUiName EDK II DSC Format Specification lt PATH gt lt Word
3. Ox lt HexDigit gt lt Integer gt lt PcdName gt lt Field2 gt lt HiiString gt lt Field3 gt Ox a fa F0 9 4 9 L lt QuotedString gt lt TOKEN gt lt VariableGuidCName gt lt Field4 gt lt CName gt lt VariableOffset gt lt DefaultValue gt lt EOL gt Ox lt HexDigit gt lt Integer gt lt Word gt lt Word gt lt Boolean gt lt Number gt lt String gt lt DataArray gt lt MACRO gt lt UEFI String Token Name gt lt LanguageCode gt C style expression using C relational equality and logical numeric and bitwise operators that evaluate to either TRUE 1 or FALSE 0 Values other than zero or one are invalid Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For Version 1 22 May 2010 61 EDK II DSC Format Specification DSC both macro names and PCDs the element must be previously defined before it can be used Expression C style expression using C relational equality and logical numeric and bitwise operators and or arithmetic and bitwise operators that evaluate to a value that matches the Datum Type of the PCD Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined bef
4. If a Library Class Instance INF is specified in the EDK II Components section INF file s lt LibraryClasses gt sub section then it will be used If not specified in the make Components Section then the Library Class Instance that is defined in the LibraryClasses ARCH MODULE TYPE Section should be used If not specified in the LibraryClasses ARCH MODULE TYPE Section then the Library Class Instance that is defined in the LibraryClasses Common MODULE TYPE Section should be used If not specified in the LibraryClasses Common MODULE TYPE Section then the Library Class Instance that is defined in the LibraryClasses ARCH Section should be used If not specified in the LibraryClasses ARCH Section then the Library Class Instance that is defined in the LibraryClasses Section or LibraryClasses Common Section should be used It is an error if it has not been specified in one of the above sections Version 1 22 May 2010 51 EDK DSC Format Specification DSC lt LibraryInstance gt Prototype lt libraryclasses gt LibraryClasses lt Attrs gt lt EOL gt lt DefineStatements gt lt IncludeStatement gt lt LcEntry gt lt Attrs gt lt SubAttr gt LibraryClasses lt SubAttr gt lt SubAttr gt N lt arch gt In lt ModuleType gt lt ModuleType gt BASE SEC PEI_ CORE PEIM DX
5. character not within a string Note that a macro named MDEPKG_NDEBUG is reserved for size reduction purposes The user should not use this keyword to define new macro Ped Values PCD elements follow the exact format defined for lt PcdEntry gt elements in the PCD Sections Version 1 22 May 2010 71 EDK DSC Format Specification DSC Example Using EDK components in an EDK II DSC build Components DEFINE EDK EDK_SOURCE Edk DEFINE MDE WORKSPACE MdePkg Library DEFINE STATUS CODE MDE PeiDxeDebugLibReportStatusCode EDK Foundation Core Pei PeiMain inf EDK Sample Platform Generic MonoStatusCode Pei Nt32 MonoStatusCode inf EDK Sample Platform Nt32 Pei BootMode BootMode inf EDK Sample Platform Nt32 Pei FlashMap FlashMap inf NORKSPACE MdeModulePkg Core Dxe DxeMain inf WORKSPACE MdeModulePkg Universal Debugger Debugport Dxe DebugPort inf WORKSPACE MdeModulePkg Cpu DebugSupport Dxe DebugSupport inf WORKSPACE MdeModulePkg Universal DataHub DataHubStdErr Dxe DataHubStdErr inf WORKSPACE MdeModulePkg Universal Disk DiskIo Dxe DiskIo inf lt LibraryClasses gt DebugLib STATUS CODE PeiDxeDebugLibReportStatusCode inf BaseMemoryLib MDE DxeMemoryLib DxeMemoryLib inf MemoryAllocationLib MDE DxeMemoryAllocationLib DxeMemoryAllocationLib inf lt PcdsFeatureFlag gt PcdDriverDiagnosticsDisable gEfiMdePkgTokenSpaceGuid FALSE WORKSPACE MdeMo
6. lt HexArray gt lt vpdEntry gt lt VpdOptionalData gt lt VpdInitialValue gt lt VpdOffset gt lt hiiEntry gt lt Field2 gt lt HiiString gt lt Field3 gt lt VariableGuidCName gt lt Field4 gt lt VariableOffset gt lt DefaultValue gt lt TOKEN gt Parameters BoolExpression EDK II DSC Format Specification lt MACRO gt N lt WORD gt lt BoolType gt lt BoolExpression gt BOOLEAN Ox a fA FO 9 0 9 lt Expression gt lt StringType gt lt DatumTypeSize gt lt AsciiString gt lt UnicodeString gt lt TOKEN gt VOID lt MaxDatumSize gt Ox lt HexDigit gt lt Integer gt lt Expression gt lt HexArray gt lt DatumTypeSize gt In Ox lt HexDigit gt Ox lt HexDigit gt lt PcdName gt lt VpdOffset gt lt VpdOptionalData gt lt EOL gt lt MaxDatumSize gt lt VpdInitialValue gt lt DefaultValue gt Ox lt HexDigit gt lt Integer gt lt PcdName gt lt Field2 gt lt HiiString gt lt Field3 gt Ox a fa F0 9 4 9 L lt QuotedString gt lt TOKEN gt lt VariableGuidCName gt lt Field4 gt lt CName gt lt VariableOffset gt lt DefaultValue gt lt EOL gt Ox lt HexDigit gt lt Integer gt lt Word gt lt Word gt lt Boolean gt lt Nu
7. lt BoolType gt lt WhiteSpace gt lt NonWhiteSpace gt lt SpecialCharacters gt lt Punctuation gt lt EOL gt EDK II DSC Format Specification a fA FO 9 Ox lt HexDigit gt lt Hex8 gt lt Hex4 gt lt Hex4 gt 9 lt Hex4 gt lt Hex12 gt Ox lt HexDigit gt MORE lt HexDigit gt 4 0x lt HexDigit gt 12 Ox lt HexDigit gt 0x lt HexDigit gt Ox lt HexDigit gt Ox lt HexDigit gt Ox lt HexDigit gt ek 94 0x7 lt HexDigit gt as wa 087 lt HexDigit gt t Za Da lt HexDigit gt 12 gt Ox lt HexDigit gt 12 Ze 9 Ha lt HexDigit gt 12 Dr E 1087 lt HexDigit gt 12 Ke 0 9 9 lt Number gt lt Integer gt lt Integer gt TRUE FALSE TRUE true FALSE false Ga ku Ox NOt lt TRUE gt lt FALSE gt lt ZeroOne gt lt Tab gt lt Space gt lt Word gt lt SpecialCharacters gt lt Punctuation gt One of the following amp gt lt gt M ar M Ly MA id Mo 77 W a M UA One of e eg Y End Of Line in character Comments may appear anywhere within a DSC file provided they follow the rules that a comment may not be enclosed within Section headers and that in line comments must appear at the end of a statement 3 2 2 MACRO Statem
8. lt MACRO gt lt PATH gt lt Value gt lt EOL gt a z _a zo 9 1 lt AbsolutePath gt lt RelativePath gt WORKSPACE EDK_SOURCE lt SysEnv gt 5 EFI_SOURCE a zA 2 gt V agqs lt Word gt yr lt Word gt lt Word gt lt Number gt lt QuotedString gt lt PcdName gt lt BoolExpression gt lt Expression gt lt Integer gt lt Hex gt 0 9 1 Ox a fA F0 9 17 lt TokenSpaceGuidCName gt lt TokenCName gt lt CName gt lt CName gt L lt SingleQuotes gt lt DoubleQuotes gt wr lt String gt Ver lt String gt lt AndOp gt lt OrOp gt XOR lt NotOp gt AND ee e 1 NOT ES 1 St Note As noted in the EBNF above the logical operators NOT AND and OR may be used in addition to the 6 logical operators Additionally a special exclusive or operator XOR has been introduced as a logical versus bitwise operator Parameters BoolExpression C style expression using C relational equality and logical numeric and bitwise operators that evaluate to either TRUE 1 or FALSE 0 Values other than zero or one are invalid Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For Version 1 22 May 2010 33 EDK II DSC Format Specification DSC both macr
9. If this file is specified it will be used to adjust the timestamp of created files if it does not exist at the start of a build the file will be created using the current date and time If this variable is not specified the time and date of the start of the build are used by the EDK Il tools that modify the time date portion of a PE32 PE32 Coff header This is either a NORKSPACE relative path and file or an Absolute Path and filename Either NORKSPACE or EDK_SOURCE followed by the a path This statement can be used to make the DSC file more readable as in DEFINE MDE WORKSPACE MdePkg Then later MDE Library BaseLib BaseLib inf RFC LANGUAGES Optional RFC4646 Language code list A semi colon separated list of RFC4646 Language codes EDK II Modules used during the generation of only a set rather than all UNICODE languages during the StrGather autogen phase The list must be encapsulated in double quotes ISO LANGUAGES Optional 150 639 2 Language code list A non separated list of three character ISO 639 2 Language codes EDK Components used during the generation of only a set rather than all UNICODE languages during the StrGather autogen phase The list must be encapsulated in double quotes Note EDK II Modules can have unicode string files that contain RFC4646 language codes EDK modules cannot have unicode string files that contain ISO 629 2 la
10. This document is intended for persons doing EFI development and support for different platforms Version 1 22 It is most likely only of interest in the event that there is a problem with a build or if a developer needs to perform special customizations of a build for a platform This document is most likely only of interest in the event that there is a problem with a build or if a developer needs to perform special customizations of a build for a platform The EDK II build processes defined in the EDK II Build Specification use separate steps to create EFI images The EDK II DSC file is used in conjunction with EDK II Flash Description files FDF EDK II DEC EDK II module INF and EDK component INF files to generate binary PE32 PE32 Coff files The EDK II Makefiles generated by the EDK II parsing tool contain only enough instructions to build the PE32 PE32 Coff image files These makefiles do not contain information on the EFI format for FFS or FV file creation The Makefiles will support third party compilation tools Microsoft Intel and GCC tool chains and at least one EDK II tool GenFw The GenFw tool is used to manipulate the files emitted from the compilation tools The EDK II build provides UEFI 2 3 and PI 1 2 Unified EFI Inc specification compliant May 2010 1 Introduction DSC images Use of the tools in the EDK Compatibility package can be used for creating earlier versions of EFI 1 10 and or VEFI 2 0 compliant co
11. common PEIM HobLib MdePkg Library PeiHobLib PeiHobLib inf PcdLib MdePkg Library PeiPcdLib PeiPcdLib inf IoLib MdePkg Library PeiloLibCpulo PeiloLibCpulo inf PeimEntryPoint MdePkg Library PeimEntryPoint PeimEntryPoint inf PeiServicesLib MdePkg Library PeiServicesLib PeiServicesLib inf MemoryAllocationLib MdePkg Library PeiMemoryAllocationLib PeiMemoryAllocationLib inf ReportStatusCodeLib IntelFrameworkModulePkg Library PeiReportStatusCodeLib PeiReportStatusCodeLib inf PeCoffLoaderLib Nt32Pkg Library Nt32PeCoffLoaderLib Nt32PeCoffLoaderLib inf PeiServicesTablePointerLib MdePkg Library PeiServicesTablePointerLib PeiServicesTablePointerLib inf OemHookStatusCodeLib Nt32Pkg Library PeiNt320emHookStatusCodeLib PeiNt320emHookStatusCodeLib inf PeCoffGetEntryPointLib Nt32Pkg Library Nt32PeiPeCoffGetEntryPointLib Nt32PeiPeCoffGetEntryPointLib inf DebugLib IntelFrameworkModulePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugLibReportStatusCode inf LibraryClasses common PEI CORE HobLib MdePkg Library PeiHobLib PeiHobLib inf PeiServicesTablePointerLib MdePkg Library PeiServicesTablePointerLib PeiServicesTablePointerLib inf IoLib MdePkg Library PeiloLibCpulo PeiloLibCpulo inf 82 May 2010 Version 1 22 DSC PeiServicesLib MdePkg Library PeiServicesLib PeiServicesLib inf MemoryAllocationLib MdePkg Library PeiMemoryAllocationLib PeiMemoryAllocationLib inf PeiCoreEntryPoint MdePkg Library PeiCoreEntryPoint PeiCoreEntryPoint
12. lt LibraryClass gt LibraryClassName 5 WORKSPACE Path and LibraryInstanceName inf Followed by zero no pcds are used by the module or more of the following individual component override statements Pcd settings are applicable to both Library Instances that are linked to the component and the component itself 1 a PCD entry is not specified however the INF files for either the library classes that are linked to the component or the component s INF file require Pcd settings a globally defined value for the Pcd Pcd PcdType section will be used If neither of these is specifed build tools processing this file should fail with an error message indicating the missing PCD entry NOTE MaximumDataSize is required for VOID datum type PCDs and should NOT be used for either the boolean or numeric datum types Additionally for the PcdsDynamic and PcdsDynamicEX sub elements the modifiers of DEFAULT VPD HII and SKUID are permitted lt PcdsFixedAtBuild gt TokenSpaceGuidCName PcdTokenName Data MaximumDataSize lt PcdsFeatureFlag gt TokenSpaceGuidCName PcdTokenName TRUE FALSE lt PcdsPatchableInModule gt TokenSpaceGuidCName PcdTokenName Data MaximumDataSize lt PcdsDynamic gt TokenSpaceGuidCName PcdTokenName Data lt PcdsDynamicEx gt PcdTokenName BuildOption Format is identical to the format used for the tools def txt file Options specified in this
13. the command line value takes precedence SUPPORTED ARCHITECTUR Required List Pipe separated list of architectures that ES the platform supports BUILD TARGETS Required List Pipe separated list of build targets that are defined in the tools_def txt file OUTPUT DIRECTORY Optional Directory Either a WORKSPACE relative or absolute directory location The default value is WORKSPACE Build PlatformName FLASH_DEFINITION Optional Filename The Filename FDF that contains the Flash Part Definition information The filename may be WORKSPACE relative or relative to the location of the DSC file BUILD_NUMBER Optional Up to four Set this value in the generated Makefile digit number FIX_LOAD_TOP_MEMORY_A Optional Address The top memory address the starting DDRESS location in memory for all drivers application loading When it is not set or set to 0 the load fixed address feature will be disabled When it is set to OxFFFFFFFFFFFFFFFF enable the feature as fixed offset to TOLM When it is set to the positive address enable the feature as fixed address BUILD TYPE Optional Set this value in the generated Makefile May 2010 15 Version 1 22 DSC Overview DSC Typical Tag Names Required Optional Value Notes TIME STAMP FILE DEFINE Optional Optional Filename MACRO PATH The timestamp file contains a timestamp that will be used to set the creation timestamp on all created files
14. Introduction 1 1 Overview This document describes the EDK II Platform Description file DSC format The EDK Build Tools are included as part of the EDK II compatibility package In order to use EDK II Modules or the EDK II Build Tools an EDK II DSC and FDF file must be used EDK II tools use INI style text based files to describe components platforms and firmware volumes While similar to EDK DSC files the EDK II DSC file format is different and new utilities have been provided to process these files This design has the following goals Compatible The EDK II DSC format does not support EDK DSC format nor can EDK tools be used to parse the EDK II DSC format files The EDK II DSC Format must maintain backward compatibility for supporting existing EDK INF file formats This means that the changes made to this specification do not require changes for standard INF files Simplified platform build and configuration One goal of this format is to simplify the build setup and configuration for a given platform It was also designed to simplify the process of adding EDK II firmware components to a firmware volume on a given platform Table 1 describes the compatibility between platform module and component builds Table 1 EDK Build Infrastructure Support Matrix EDK EDK II EDK EDK II EDK EDK II DSC DSC FDF FDF INF INF EDK Build Tools YES NO YES NO YES NO EDK 11 Build Tools NO YES NO YES YES YES Note
15. May 2010 DSC Version 1 22 DSC DSC FILENAME Name of the DSC file as specified on the command line Can be used for dependencies in the makefiles INF FILENAME Name of the INF file for a given EDK component or EDK Il Module Can be used for dependencies in the makefiles MAKEFILE NAME Name of the output makefile for the platform Default is makefile The default value can be overridden to support keeping multiple variations of a makefile in the same DEST_DIR directory Version 1 22 May 2010 77 78 May 2010 DSC Version 1 22 DSC Appendix B Sample EDK II DSC File The following EDK II DSC file is an example of the Nt32 dsc showing a typical user maintained version which simplifies the structure over the previous example Version 1 22 May 2010 79 DSC Note The line continuation character is used here for clarity but is not permitted in actual DSC files Continued lines are indented to match the indentation of the beginning of the line 4 6 EFI Framework Emulation Platform The Emulation Platform can be used to debug individual modules prior to creating a real platform This also provides an example for how an DSC is created Copyright c 2006 2007 Intel Corporation All rights reserved This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribut
16. Name only valid values from this list can be specified in the defines section Only one include statement is supported it should use a txt extension and the include filename may include the variable woRKSPACE otherwise it must be located in the current working directory If this section is not specified the parsing tools will assume a SkulD of 0 with a UiName of DEFAULT It is recommended that the file should be stored in the WORKSPACE Conf directory Only one include statement may be used within the SkuID section The include file can only contain an ASCII not Unicode list of integer UiSkuName statements This is an optional section for EDK II DSC files May 2010 Version 1 22 DSC Prototype lt Skuld gt lt Statement gt lt IncludeStatement gt lt Filename gt lt PATH gt lt Path gt lt UiName gt Example Skulds EDK II DSC Format Specification Skulds lt EOL gt lt Statement gt lt IncludeStatement gt lt Integer gt lt UiName gt lt EOL gt include lt Filename gt lt EOL gt lt PATH gt lt Word gt txt WORKSPACE lt Path gt lt Word gt 9 lt Word gt 0 DEFAULT The entry O DEFAULT is reserved and always required 1 SkuTwo 3 7 Libraries Section Summary Defines the Libraries section tag which lists the libraries that are linked against EDK I components Entries may appear in a
17. Nt32Pkg Library DxeWinNtLib DxeWinNtLib inf OemHookStatusCodeLib Nt32Pkg Library DxeNt320emHookStatusCodeLib DxeNt320emHookStatusCodeLib inf DebugLib IntelFrameworkModulePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugLibReportStatusCode inf LibraryClasses common UEFI DRIVER UefiRuntimeServicesTableLib MdePkg Library UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib inf HobLib MdePkg Library DxeHobLib DxeHobLib inf PcdLib MdePkg Library DxePcdLib DxePcdLib inf MemoryAllocationLib MdePkg Library DxeMemoryAllocationLib DxeMemoryAllocationLib inf UefiLib MdePkg Library UefiLib UefiLib inf UefiDriverEntryPoint MdePkg Library UefiDriverEntryPoint UefiDriverEntryPoint inf ReportStatusCodeLib IntelFrameworkModulePkg Library DxeReportStatusCodeLibFramework DxeReportStatusCodeLib inf DxeServicesTableLib MdePkg Library DxeServicesTableLib DxeServicesTableLib inf HiiLibFramework IntelFrameworkPkg Library HiiLibFramework HiiLib inf UefiBootServicesTableLib MdePkg Library UefiBootServicesTableLib UefiBootServicesTableLib inf DevicePathLib MdePkg Library UefiDevicePathLib UefiDevicePathLib inf ScsiLib MdePkg Library UefiScsiLib UefiScsiLib inf WinNtLib Nt32Pkg Library DxeWinNtLib DxeWinNtLib inf OemHookStatusCodeLib Version 1 22 May 2010 83 DSC Nt32Pkg Library DxeNt320emHookStatusCodeLib DxeNt320emHookStatusCodeLib inf DebugLib IntelFrameworkModulePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugL
18. TRUE gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdStatusCodeUseSerial FALSE gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdStatusCodeUseMemory FALSE gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdStatusCodeUseOEM TRUE gEfiMdeModulePkgTokenSpaceGuid PcdDxeIplSwitchToLongMode FALSE gEfiMdeModulePkgTokenSpaceGuid PcdDxeIp1SupportEfiDecompress TRUE gEfiMdeModulePkgTokenSpaceGuid PcdDxeIp1SupportTianoDecompress TRUE gEfiMdeModulePkgTokenSpaceGuid PcdDxeIp1SupportCustomDecompress TRUE gEfiMdeModulePkgTokenSpaceGuid PcdDxeIplBuildShareCodeHobs TRUE gEfiMdeModulePkgTokenSpaceGuid PcdDxePcdDatabaseTraverseEnabled TRUE gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdStatusCodeUseHardSerial FALSE gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdStatusCodeUseEfiSerial FALSE PcdStatusCodeUseRuntimeMemory FALSE PcdStatusCodeUseDataHub FALSE PcdStatusCodeUseOEM TRUE PcdStatusCodeReplayInSerial FALSE PcdStatusCodeReplayInDataHub FALSE PcdStatusCodeReplayInRuntimeMemory FALSE PcdStatusCodeReplayInOEM FALSE gEfiMdeModulePkgTokenSpaceGuid PcdSupportUpdateCapsuleRest FALSE gEfiMdePkgTokenSpaceGuid PcdComponentNameDisable FALSE gEfiMdePk
19. The format for an entry in this section is PcdTokenSpaceGuidCName PcdTokenName Value DatumType MaximumDatumSize Examples 24 May 2010 Version 1 22 DSC DSC Overview PcdsDynamicEx common Default PcdFlashNvStorageVariableBase gEfiGenericPlatformTokenSpaceGuid 0x0 PcdFlashNvStorageVariableSize gEfiGenericPlatformTokenSpaceGuid 0x0 2 2 13 3 6 HII For using the HII for PCD data the section name is as follows PedsDynamicExHii arch SKUID IDENTIFIER Specifying a SKUID for an HII PCD selection is optional for example PcdsDynamicExHii common Skul While the format for content of this section is as follows note that the backslash character is used here to indicate the continuation of the line PcdTokenSpaceGuidCName PcdTokenName VariableName VariableGuid VariableOffset HiiDefaultValue MaximumDatumSize Examples PcdsDynamicExHii IA32 Sku_Two gEfiGmchTokenSpaceGuid PcdGmchPegPreAllocatedDvmt 0x0053 0x0065 0x0074 0x0075 0x0070 gSysconfigGuid 0x000000A9 1 2 2 13 3 7 VPD For using the VPD for PCD data the section name is PcdsDynamicExVpd arch SKUID_IDENTIFIER Specifying a SKUID for a VPD PCD selection is optional for example PcdsDynamicExVpd common SkuTwo The format for content of this section is as follows PcdTokenSpaceGuidCName PcdTokenName VpdOf fset MaximumDatumSi ze Examples PcdsDynamicExVpd common DEFAULT gEfiPhonyTokenSpaceGuidCName PcdVpdCopyri
20. WORKSPACE for EDK 11 modules If the environment variable is not specified the INF file path is assumed to be relative to the WORKSPACE The following is an example of specifying a Direct Path WORKSPACE MdeModulePkg Universal Disk DiskIo Dxe The following is an example of specifying an Indirect Path DEFINE DISK WORKSPACE MdeModulePkg Universial Disk DISK DiskIo Dxe The permitted DEFINE statement must be a variable name assigned to a path EDK II DSC files allow specifying only one optional argument on an INF file entry line The argument EXEC filename is used for User Defined processing of an INF file The EDK II parsing tools will call the program listed by filename which must either be in the OS PATH environment or fully qualified path and filename with the INF filename expanded as the one and only argument to filename EDK II modules can have scoped sub elements lt LibraryClasses gt lt Pcd gt and or lt BuildOptions gt that allow individual modules to supersede previous definitions The values specified in the sub elements are given the highest precedence by the parsing tool The format for items listed in the sub elements is the identical format for content under the section Within the context of an EDK II module sub element the lt LibraryClasses gt entries must appear before lt Pcd gt entries the lt LibraryClasses gt entries terminate with the start of either the lt Pcd gt Or lt BuildOption
21. brands may be claimed as the property of others Copyright 2006 2010 Intel Corporation All rights reserved ii May 2010 Version 1 22 DSC Revision History Revision Revision History Date 1 0 Initial release December 2007 1 1 Updated based on errata August 2008 1 2 Updated based on enhancement requests June 2009 1 21 Updated based o n errata and enhancement requests Added language filters REC_LANGUAGES and ISO_LANGUAGES Added Note that a reserved macro name MDEPKG_NDEBUG Definitions in DSC file are now global to both DSC and FDF files PCD Values may be constructed using C style expressions provided the result ofthe expression matches the datum type of the PCD FeatureFlagExpression is now defined as a C style expression using C relational equality and logical numeric and bitwise operators and or arithmetic and bitwise operators that evaluate to a value that matches the Datum Type ofthe PCD Precedence and associativity follow C standards Spec changed to match exsting formats SUPPORTED_ARCHITECTURES and BUILD TARGETS use the pipe separator not the comma character March 2010 1 22 Errata and grammatical changes May 2010 Version 1 22 May 2010 May 2010 DSC Version 1 22 DSC Contents 1 q AAA 1 be 1 1 2 Related Information 2 1 3 Terms aaa ca ta a e i i a a aaa 5 d i ln a da 6 a nt ag a ta 2 1 4 Convent
22. comma and a number m indicates that the number of occurrences can be from n to m occurrences of the item inclusive Version 1 22 May 2010 Introduction DSC 8 May 2010 Version 1 22 DSC DSC Overview 2 DSC Overview This section of the document provides an overview to processing EDK II platform description DSC file Additional chapters describe different sections of the EDK 11 DSC file in detail EDK II parsing tools contain the templates for processing files to create the component binary images from source files Binary Modules are not included in EDK 11 DSC files EDK 11 DSC files are a list of e EDK Component or EDK II Module INF Files e EDK libraries only used by EDK Components e EDK II Library Class Instance Mappings only used by EDK II Modules e EDK II PCD Entries Note Path and Filename elements within the DSC are case sensitive in order to support building on UNIX style operating systems 2 1 Processing Overview Each platform DSC file is broken out into sections in a manner similar to the component description INF files However while the intent of a component s INF file is to define the source files libraries or library classes and definitions relevant to building the component the function of the platform DSC file is to specify the library instances components and output formats used to generate binary files that will be processed by other tools to generate an image that is either put
23. file s content must match the content of the section that the include statement resides or it may contain completely new sections If the included file starts with a section header then the section being processed in the Platform DSC file is considered to have been terminated The include file cannot contain additional include statements Statements in the include file are permitted to override previous definitions as well as to define new entries Use of this statement is optional Prototype lt IncludeStatement gt tinclude lt Filename gt lt EOL gt lt Filename gt lt PATH gt lt Word gt lt Word gt lt PATH gt lt SysEnvVariable gt lt Path gt lt Path gt lt Hord gt lt SysEnvVariable gt EDK SOURCE WORKSPACE lt MACRO gt lt MACRO gt lt WORD gt Example EDK II DSC include WORKSPACE MyPlatformPkg feature pcds mak Note The extension used in the example mak is just a three character extension and would not processed by make or nmake commands It might just as well have been foo 3 3 Header Section 38 This is an optional section The Copyright and License notices for the DSC file are in the comments that start the file The format for the comment section is file Abstract Description Copyright License May 2010 Version 1 22 DSC EDK II DSC
24. files Tools must provide a method of looking up the value of string using the token name converted to unicode by the tools from the UCS2 file Either the RFC4646 or the 150 639 2 language code must be provided If the code is not defined in the UCS2 file then the tools must provide a best match with a default of en if no best match is found Example PedsPatchableInModule gEfiMdePkgTokenSpaceGuid PcdDebugPrintErrorLevel 0x80000000 3 9 4 PcdsDynamic Section This is an optional section for EDK 11 DSC Files Summary Defines the PcdsDynamic section tag that may be required for platform DSC files that will use EDK II module INF files The values listed below must match the datum type specified in the DEC file that declares this PCD Note that if a PCD s datum type is vorp the MaximumDatumSize field is required Note that specifying different lt DataStore gt values Default HII Or in one section header is not permitted It is permissible to specify different Architectures using an identical lt DataStore gt value The following line is permissible PedsDynamicDefault X64 Default PcdsDynamic IPF Default The following line is incorrect and should cause a build break during parsing of the file PcdsDynamic X64 Default PcdsDynamicVpd IPF Default An entry must be on a single line The include statement is permitted in PcdsDynamic sections although not recommended The PcdsDynamic entry is a form
25. gt lt Extension gt W lt R c4646Code gt lt Rfc4646Code gt 1 lt 150639 20066 gt lt Iso639 2Code gt RFC4646 Format Language code ISO 639 2 Format Language code lt Word gt SET lt PcdName gt lt VALUE gt lt EOL gt lt Boolean gt lt Number gt lt QuotedString gt lt MACRO gt lt Expression gt lt TokenSpaceGuidCName gt lt PcdCName gt lt Cname gt lt Cname gt TRUE FALSE True False true false lt Decimal gt lt Hex gt EFT TFT oa Ox a fA F0 9 1 lt TokenSpaceGuidCName gt lt TokenCName gt lt CName gt lt CName gt lt SingleQuotes gt lt DoubleQuotes gt lt String gt Nar lt String gt tinclude lt File gt If specified the image created from the DSC FDF file pair will only be valid for the SkuUiNames listed If not specified and a SKUIDS section is defined the image is valid for all Skulds listed in a SKUIDS section Set Statement PcdName When a set statement assigns a Macro name to a PCD name the PCD name does NOT need to be set previously The PCD name must appear in only one of the PCD Version 1 22 May 2010 43 EDK II DSC Format Specification DSC sections in order for the Macro to take on the value of the PCD The PCD must be defined prior to using the Macro in a directive statement or othe
26. into a flash device made available for recovery booting or updating existing firmware on a platform Note For users familiar with EDK the EDK II DSC file is not used to specify how compiled binary images get placed into UEFI PI compliant binaries The EDK II Flash Description File FDF file specifies how to package the binaries files into VEFI PI compliant images In general the parsing utilities read each line from the sections of the platform description DSC file process the component module or library s INF file on the line to generate a makefile and then continue with the next line Figure 1 illustrates the process flow with the dark format indicating the process for building PE PE32 Coff files Version 1 22 May 2010 9 DSC Overview Y INF Files DEC Files DSC File FDF File EIER DSC Makefile or GNUmakefle A BuildParser Library Makefiles CH gt S Autog en c Autogen h Figure 1 EDK Parsing Data Flow May 2010 Version 1 22 DSC DSC Overview Figure 2 illustrates the relationship of the major environment variables WORKSPACE EDK SOURCE EFI SOURCE and EDK TOOLS PATH The EDK_ SOURCE and EFI_SOURCE environment variables are only required if using EDK components The environment variables can point to different locations on a developer s workstation WORKSPACE EDK II Tree action Location in WORKSPACE is Optional WORKSPACE is Optional EDK_TOOLS
27. mixed modules with both binary and source modules Multiple modules can be combined into a package and multiple packages can be combined into a single package Protocol An API named by a GUID PCD Platform Configuration Database PEI Pre EFI Initialization Phase PPI A PEIM to PEIM Interface that is named by a GUID Runtime Services Interfaces that provide access to underlying platform specific hardware that might be useful during OS runtime such as time and date services These services become active during the boot process but also persist after the OS loader terminates boot services SAL System Abstraction Layer A firmware interface specification used on Intel Itanium Processor based systems SEC Security Phase is the code in the Framework that contains the processor reset vector and launches PEI This phase is separate from PEI because some security schemes require ownership of the reset vector SKU Stock Keeping Unit UEFI Application An application that follows the UEFI specification The only difference between a VEFI application and a VEFI driver is that an application is unloaded from memory when it exits regardless of return status while a driver that returns a successful return status is not unloaded when its entry point exits 4 May 2010 Version 1 22 DSC Introduction UEFI Driver A driver that follows the UEFI specification UEFI Specification Version 2 3 Current version of the EFI specification rele
28. the number of bytes for a variable length value when the PCD Datum Type is vorp the PCD entry must include the MaximumDatumSize parameter The MaximumDatumSize parameter is optional for all other PCD data types These are optional sections unless the EDK 11 modules specified in the components section use PCDs The Pcd sections must specify only one line for the PCD item type within a specified architecture The item types PcdsFeatureFlag PcdsFixedAtBuild PcdsPatchableInModule PcdsDynamic and PedsDynamicEx are not allowed to be specified within a single section Incorrect example PcdsFixedAtBuild IA32 PcdsPatchableInModule IA32 PcdsDynamic IA32 Unique PCDs are identified using the format to identify the named PCD Version 1 22 May 2010 21 DSC Overview DSC TokenSpaceGuidCName PcdCName The content for a PCD in this section is the PCD s Name PCD Token Space Guid 6 name the PCD C name separated by a period character and Default value Field entries on a line are separated by the pipe character This specification now permits setting different PCD types for a single PCD in different modules The types here are PcdsFixedAtBuild PcdsPatchableInModule PcdsDynamic and PcdsDyanmicEx For example the platform integrator may want to use one module with a given PCD as FixedAtBuild and have a different module with the same PCD use it as PatchableInModule A PCD that is used as Fixed for one module while a differen
29. this section to control how binary files are put into flash images which is outside the scope of the EDK II DSC files Format for the section header is UserExtensions Userld Identifier Prototype lt UserExtensions gt UserExtensions lt UserId gt lt IdentifierString gt lt EOL gt lt statements gt lt UserId gt N lt Word gt lt IdentifierString gt 9 lt Word gt lt QuotedString gt lt statements gt Content is build tool chain specific Example UserExtensions MyOrgDotCom 1 0 Version 1 22 May 2010 73 EDK II DSC Format Specification DSC 74 May 2010 Version 1 22 DSC Appendix A Variables One of the core concepts of this utility is the notion of symbols Use of symbols follows the makefile convention of enclosing within for example EDK_souRrcE As the parsing utility processes files it will often perform parsing of variable assignments These variables can then be referenced in other sections of the DSC file Variable assignments will be saved internally in either a local or global symbol table The local symbol table is purged following processing of individual Platform DSC files Global symbol values persist throughout execution of the utility Local symbol values take precedent over global symbols The following table describes the symbols generated internally by the utility They can be overridden either on the command line in the DSC file or in individual IN
30. will perform two builds of the platform one DEBUG followed by a build for RELEASE The two entries that are scoped in this manner are SUPPORTED_ARCHITECTURES and BUILD TARGETS The these items may be referenced as TARGET and ARCH in other meta data files Sections Defines Architecture and Defines are processed by the EDK II parser tools in the order they appear in the document May 2010 Version 1 22 DSC EDK II DSC Format Specification Note Assignments of variables in other sections take precedence over previous assignments New EDK II DSC files must include the statement DSC SPECIFCIATION 5 in this section Individual items must appear on a single line they may not span multiple lines Of special note is the FLasn_ DEFINITION file name Unlike other file names in the document if the value does not include a full path the file name is relative to the location of the DSC file and NOT relative to the workspace If the FLASH DEFINITION entry is not specified the build tools assume that the target output is one or more UEFI APPLICATION modules The DIRECTORY value must be either a full path to the output directory or a WORKSPACE relative path The SET statements in the Defines section can be used to pre define macro statements to values that can be used in Conditional Directive statements The build tools will use these values unless overridden by values on the build tool s command line When tools p
31. 1 2 2 13 2 PcdsFixedAtBuild and PcdsPatchablelnModule sections 2 2 13 2 1 PcdsFixedAtBuild The required content for the FixedAtBuild PCD is the PCD s C name the PCD Token Space Guid C name and the Value any one of Boolean numeric or pointer types These entries are separated by the pipe character If the Datum Type for the PCD is VOID then a fourth field that specifies the maximum datum size is required This is the maximum size allocated by the Platform Integrator Module developers won t know how much size will be allocated and just use it The platform integrator must figure out what the maximum length will be based on the usage from the modules included PcdsFixedAtBuild PcdsFixedAtBuild common PcdsFixedAtBuild IA32 PedsFixedAtBuild X64 PcdsFixedAtBuild IPF PcdsFixedAtBuild EBC Format of an entry in this section is PcdTokenSpaceGuidCName PcdCName Value DatumType MaximumDatumSize Examples gEfiMdePkgTokenSpaceGuid PcdFSBClock 0 gEfiMdeModulePkgTokenSpaceGuidPcdVpdBaseAddress 0 gEfiEdkNt32PkgTokenSpaceGuid PcdWinNtPhysicalDisk L E RW 245760 512 VOID 2 2 2 13 2 2 PcdsPatchablelnModule The required content for the PatchableInModule PCD is the PCD s C name the PCD Token Space Guid C name and Value These entries are separated by the pipe character If the Datum Type for the PCD is VOID then a fourth field that specifies the maximum datum size is also required Pcds
32. 2 gEfiNt32PkgTokenSpaceGuid PcdWinNtCpuSpeed L 1234 VOID 8 gEfiNt32PkgTokenSpaceGuid PcdWinNtMemorySize L 64 64 VOID 10 gEfiNt32PkgTokenSpaceGuid PcdWinNtPhysicalDisk L a RW 2880 512 e RW 262144 512 VOID 58 gEfiNt32PkgTokenSpaceGuid PcdWinNtUga L UGA Window 1 UGA Window 2 VOID 50 gEfiMdeModulePkgTokenSpaceGuid PcdFlashNvStorageFtwSpareBase 0 gEfiMdeModulePkgTokenSpaceGuid PcdFlashNvStorageFtwWorkingBase 0 gEfiMdeModulePkgTokenSpaceGuid PcdFlashNvStorageVariableBase 0 FEFE AE HE HE HEHE d aa FE HE FE FEE FE AE HE FE E HE FE AE FE d ala FE E aaa aa HE FE AE FE FE EHE FE AE EE EEE FEE HE HHHH HEHE Components Section list of all EDK II Modules needed by this Platform HEH AEE FEE E FE HEE E FE FE FE FE E FE FE FE FE HEHE FE E FE FE AB HEHE Components IA32 SEC Phase modules HA Nt32Pkg Sec SecMain inf PEI Phase modules MdeModulePkg Core Pei PeiMain inf MdeModulePkg Universal PCD Pei Pcd inf lt LibraryClass gt PcdLib MdePkg Library BasePcdLibNull BasePcdLibNull inf IntelFrameworkModulePkg Universal StatusCode Pei PeiStatusCode inf Nt32Pkg BootModePei BootModePei inf Nt32Pkg WinNtFlashMapPei WinNtFlashMapPei inf MdeModulePkg Universal MemoryTest BaseMemoryTestPei BaseMemoryTestPei inf MdeModulePkg Universal Variable Pei VariablePei inf Nt32Pkg WinNtAutoScanPei WinNtAutoScanPei inf Nt32Pkg WinNtFirmwareVolumePei WinNtFirmwareVolumePei inf Version 1 2
33. 2 May 2010 87 DSC Nt32Pkg WinNtThunkPPIToProtocolPei WinNtThunkPPIToProtocolPei inf MdeModulePkg Core DxeIplPeim DxeIpl inf HH DXE Phase modules MdeModulePkg Core Dxe DxeMain inf MdeModulePkg Universal PCD Dxe Pcd inf lt LibraryClass gt PcdLib MdeModulePkg Library PcdDriverPcdLibNull PcdLib inf Nt32Pkg MetronomeDxe MetronomeDxe inf Nt32Pkg RealTimeClockRuntimeDxe RealTimeClockRuntimeDxe inf Nt32Pkg ResetRuntimeDxe ResetRuntimeDxe inf MdeModulePkg Core RuntimeDxe RuntimeDxe inf Nt32Pkg FvbServicesRuntimeDxe FvbServicesRuntimeDxe inf MdeModulePkg Universal SecurityStubDxe SecurityStubDxe inf IntelFrameworkModulePkg Universal DataHubDxe DataHubDxe inf MdeModulePkg Universal EbcDxe EbcDxe inf MdeModulePkg Universal MemoryTest NullMemoryTestDxe NullMemoryTestDxe inf IntelFrameworkModulePkg Universal HiiDataBaseDxe HiiDatabase inf Nt32Pkg WinNtThunkDxe WinNtThunkDxe inf MdeModulePkg Universal FirmwareVolume Crc32SectionExtractDxe Crc32SectionExtractDxe inf Nt32Pkg CpuRuntimeDxe CpuRuntimeDxe inf Nt32Pkg PlatformBdsDxe PlatformBdsDxe inf MdeModulePkg Universal FirmwareVolume FaultTolerantWriteDxe FtwLite inf IntelFrameworkModulePkg Universal DataHubStdErrDxe DataHubStdErrDxe inf Nt32Pkg MiscSubClassPlatformDxe MiscSubClassPlatformDxe inf Nt32Pkg TimerDxe TimerDxe inf IntelFrameworkModulePkg Universal StatusCode Dxe DxeStatusCode inf MdeModulePkg Universal Variable RuntimeDxe VariableRuntimeDxe inf MdeModulePkg U
34. API or interface set for a library The consumer of the library is coded to the library class definition Library classes are defined via a library class h file that is published by a package Library Instance An implementation of one or more library classes Version 1 22 May 2010 3 Introduction DSC Module A module is either an executable image or a library instance For a list of module types supported by this package see module type Module Type All libraries and components belong to one of the following module types BASE SEC PEI CORE PEIM CORE DXE DRIVER DXE_RUNTIME DRIVER DXE_SMM_DRIVER DXE_SAL DRIVER UEFI DRIVER or UEFI APPLICATION These definitions provide a framework that is consistent with a similar set of requirements A module that is of module type BASE depends only on headers and libraries provided in the MDE while a module that is of module type DRIVER depends on common DXE components For a definition of the various module types see Appendix C Package A package is a container It can hold a collection of files for any given set of modules Packages may be described as one of the following types of modules source modules containing all source files and descriptions of a module binary modules SN EFI Sections or a Framework File System and a description file specific to linking and binary editing of features and attributes specified in a Platform Configuration Database PCD
35. Build then all library instances that use that PCD must also use the PCD as PcdsFixedAtBuld Build Tools may detect missing PCD entries PCD specified in an INF file but not in the DSC file and perform one the following e Break the build printing and error message e Search the DEC files in the workspace and use a default value from the DEC file PCD Values may be absolute a number string etc a MACRO name or an expression The expression is a C style expression using C relational equality and logical numeric and bitwise operators or numeric and bitwise operators that evaluate to a value that matches the PCD s Datum Type specified in the DEC package declaration file Precedence and associativity follow C standards Using PCDs in expressions is also permitted 2 2 13 1 PcdsFeatureFlag section The required content for the FeatureFlag PCD is the PCD s C name an optional PCD Token Space Guid C name and a Boolean value of either TRUE FALSE 1 or 0 These 22 May 2010 Version 1 22 DSC DSC Overview entries are separated by the pipe character The following are typical entries with a supported module type qualifier omitted in these examples PcdsFeatureFlag PcdsFeatureFlag common PcdsFeatureFlag IA32 PcdsFeatureFlag X64 PcdsFeatureFlag IPF PcdsFeatureFlag EBC Format of an entry in this section is PcdTokenSpaceGuidCName PcdCName Value Example gEfiMdeModulePkgTokenSpaceGuid PcdDxePcdDatabaseTraverseEnabled
36. E HEHE FE HE HE HE HE FE FE HE HE ki FE FE HE HE HE FE FE FE HE E FE FE a ERROR FE FE FE FE HE HE FE FE HE HE HE FE FE FE HE HE HE FE FE FE HE HE HE HH HE Library Class section list of all Library Classes needed by this Platform FEE FE FE E FE HE E FE HE AE FE E FE FE FE FE E E FE FE FE FE E FE FE HE FE FE AE FE FE FE FE E FE FE FE FE FE E FE FE FE FE FE E FE FE FE FE HE FE FE FE FE FE E FE FE FE FE HEHE HE LibraryClasses common TimerLib MdePkg Library BaseTimerLibNullTemplate BaseTimerLibNullTemplate inf PrintLib MdePkg Library BasePrintLib BasePrintLib inf SerialPortLib MdePkg Library SerialPortLibNull SerialPortLibNull inf BaseMemoryLib MdePkg Library BaseMemoryLib BaseMemoryLib inf BaseLib MdePkg Library BaseLib BaseLib inf PerformanceLib MdePkg Library BasePerformanceLibNull BasePerformanceLibNull inf PeCoffLib MdePkg Library BasePeCoffLib BasePeCoffLib inf PcilncompatibleDeviceSupportLib IntelFrameworkModulePkg Library PciIncompatibleDeviceSupportLib PciIncompatibleDeviceSupportLib inf CacheMaintenanceLib MdePkg Library BaseCacheMaintenanceLib BaseCacheMaintenanceLib inf IfrSupportLibFramework IntelFrameworkPkg Library IfrSupportLibFramework IfrSupportLib inf GraphicsLib IntelFrameworkModulePkg Library GraphicsLib GraphicsLib inf FvbServiceLib MdeModulePkg Library EdkFvbServiceLib EdkFvbServiceLib inf IoLib MdePkg Library BaseIloLibIntrinsic BaseloLibIntrinsic inf CustomDecompressLib IntelFrameworkModulePkg Library Base
37. EDK II DSC File Specification May 2010 Revision 1 22 DSC Acknowledgements THIS SPECIFICATION IS PROVIDED AS IS WITH WARRANTIES WHATSOEVER INCLUDING ANY WARRANTY OF MERCHANTABILITY NONINFRINGEMENT FITNESS FOR ANY PARTICULAR PURPOSE OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL SPECIFICATION OR SAMPLE Intel products are not intended for use in medical life saving or life sustaining applications Intel may make changes to specifications and product descriptions at any time without notice Designers must not rely on the absence or characteristics of any features or instructions marked reserved or undefined Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them A license is hereby granted to copy and reproduce this specification for internal use only No other license express or implied by estoppel or otherwise to any other intellectual property rights is granted herein Intel disclaims all liability including liability for infringement of any proprietary rights relating to use of information in this specification No license express or implied by estoppel or otherwise to any intellectual property rights is granted herein This specification is an intermediate draft for comment only and is subject to change without notice Readers should not design products based on this document Other names and
38. E_CORE DXE_ DRIVER DXE_SMM DRIVER SMM CORE DXE_SAL DRIVER DXE_RUNTIME DRIVER 1 UEFI DRIVER LI UEFI APPLICATION lt arch gt IA32 X64 IPF EBC common lt OA gt lt OA gt A Z A Z0 9 lt DefineStatements gt DEFINE lt WORD gt lt PATH gt lt EOL gt lt IncludeStatement gt include lt Filename gt lt EOL gt lt Filename gt lt PATH gt lt Word gt txt lt LcEntry gt lt LibraryClassKeyWord gt lt LibraryInstance gt lt EOL gt lt LibraryClassKeyWord gt lt Word gt lt PATH gt lt InfFileName gt lt EOL gt lt InfFileName gt lt Word gt inf lt PATH gt S WORKSPACE lt Word gt Example libraryclasses common BaseLib MdePkg Library BaseLib inf BaseMemoryLib MdePkg Library BaseMemoryLib BaseMemoryLib inf DebugLib MdePkg Library BaseDebugLibNull BaseDebugLibNull inf PcdLib MdePkg Library BasePcdLib BasePcdLibNull inf libraryclasses common PEI_CORE libraryclasses common PEIM DEFINE MDIR MdePkg Library DebugLib MDIR PeiReportStatusCode PeiReportStatusCodeLib inf libraryclasses common UEFI DRIVER libraryclasses common UEFI APPLICATION DebugLib MdePkg Library UefiDebugLibStdErr UefiDebugLibStdErr inf 3 9 PCD Sections PCD Values listed in the DSC file may be absolute values macro names or expressions which may include o
39. Entry 8 gEfiMdeModulePkgTokenSpaceGuid PcdVpdBaseAddress 0 gEfiMdeModulePkgTokenSpaceGuid PcdMaxSizeNonPopulateCapsule 0x0 gEfiMdeModulePkgTokenSpaceGuid PcdMaxSizePopulateCapsule 0x0 gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdPciIncompatibleDeviceSupportMask O gEfiMdePkgTokenSpaceGuid EFI COMPUTING UNIT MEMORY EFI CU MEMORY EC UNCORRECTABLE3 gEfiMdePkgTokenSpaceGuid D EFI PERIPHERAL REMOTE CONSOLE EFI P EC CONTROLLER ERROR gEfiMdePkgTokenSpaceGuid D EFI PERIPHERAL REMOTE CONSOLE EFI P PC RESET gEfiMdePkgTokenSpaceGuid EFI PERIPHERAL REMOTE CONSOLE EFI P EC INPUT ERROR gEfiMdePkgTokenSpaceGuid D EFI PERIPHERAL REMOTE CONSOLE EFI P EC OUTPUT ERROR 0x0005100 0x01040006 0x01040001 0x01040007 0x01040008 gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid Version 1 22 PcdStatusCodeValueUncorrectableMemoryError PcdStatusCodeValueRemoteConsoleError PcdStatusCodeValueRemoteConsoleReset PcdStatusCodeValueRemoteConsoleInputError PcdStatusCodeValueRemoteConsole0utputError PcdUefiVariableDefaultTimeout 0x0008 PcdUefiVariableDefaultLangCodes eng fra 7 PcdVefiVariableDefaultLang eng VOID 4 PcdUefiVariableDefaultPlatformLangCodes en fr VOID 6 PcdUefiVariableDefaultPlatformLang en VOID 2 PcdStatusCodeValueEfiWatchDogTimerExpired 0x00011003 May 2010 85 DSC gEfiMde
40. F files The symbols in the table below are typically global For a pure EDK II build two environment variables are required to be set prior to executing any build worksPacE must put to the root of the EDK II directory tree while EDK_TOOLS PATH must point to the Location of the BaseTools directory tree For a build using EDK components in the EDK II DSC file the EDK_source directory must point to the root of the EDK either a directory containing an EDK tree or the location of the EdkCompatibilityPackage directory tree Version 1 22 May 2010 75 Table 5 Standard Variables Variable Name Description WORKSPACE Defines the root directory of the local EDK source tree for example CAEDK2 If not defined as an environmental variable when an EDK Il tool is invoked the utility will give an error message and exit EDK_TOOLS PATH Defines the root directory of the local EDK Il BaseTools directory Default WORKSPACE BaseTools EDK_SOURCE EFI_SOURCE Defines the directory of an original EDK directory tree for example CAEFI2 01EdkCompatibilityPkg If not defined as an environmental variable when an EDK II tool is invoked the utility will give an error message and exit Defines the root directory of a local original EDK source tree for example C EFI2 0 MyEdkDriver EFI TOOLS PATH EFI_TOOLS BIN Defines the root directory containing the original EDK Tools directory tree for example C Tools De
41. FT GCC INTEL ACPICA lt UserDef gt A Z A Z0 9 lt Target gt _ lt TagName gt _ lt TargetArch gt _ lt ToolCode gt lt ToolSpec gt _FLAGS lt ToolSpec gt _DPATH lt ToolSpec gt _PATH lt ToolSpec gt _ lt Attribute gt IA32 64 IPF EBC ery lt OA gt May 2010 Version 1 22 DSC Version 1 22 EDK II DSC Format Specification lt Target gt Target lt Attribute gt AttributeName lt TagName gt TagName lt ToolCode gt 8 lt Flags gt FlagString Parameters Target Must match a target identifier in the EDK II tools_def txt file the first field where fields are separated by the underscore character The character is a valid wild card TagName Must match a tag name field in the EDK II tools_def txt file second field The character is a valid wild card TargetArch Must match the architecture field in the EDK II tools_def txt file third field The x character is a valid wild card ToolCode Must match a tool code field in the EDK II tools_def txt file fourth field Use of a wild card character is not permitted AttributeName Must match a tool attribute field in the EDK II tools_def txt file fifth field Use of a wild card character is not permitted The attributes _Flag _PATH and DPATH are defined elsewhere and cannot be used with the lt Othe
42. Format Specification Developers will create this section manually or with the help of usage enhancement tools It is recommended that the developer maintain a text file that contains the Copyright and License information which can then be copied into a new DSC file Prototype lt Header gt lt FileName gt lt Extension gt lt Abstract gt lt Description gt lt Copyright gt lt License gt Version 1 22 944 Qfile lt EOL gt lt Abstract gt lt Description gt lt Copyright gt lt License gt lt EOL gt lt Word gt lt Extension gt a zA Z a zA Z0 9 lt Sentence gt lt EOL gt lt EOL gt lt Sentence gt lt EOL gt lt EOL gt 4 Copyright c lt Date gt lt Company gt lt EOL gt E lt EOL gt lt LicenseSentence gt lt EOL gt lt EOL gt May 2010 39 EDK II DSC Format Specification DSC Example HH Efile EFI Framework Emulation Platform The Emulation Platform can be used to debug individual modules prior to creating a real platform Copyright c 2006 2007 Intel Corporation All rights reserved This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution The full text of the license may be found at http opensource org licenses bsd license
43. K II FDF Specification Intel 2010 EDK II Build Specification Intel 2010 VFR Programming Language Intel 2010 1 3 Terms The following terms are used throughout this document to describe varying aspects of input localization BDS Framework Boot Device Selection phase BNF BNF is an acronym for Backus Naur Form John Backus and Peter Naur introduced for the first time a formal notation to describe the syntax of a given language Component An executable image Components defined in this specification support one of the defined module types 2 May 2010 Version 1 22 DSC Introduction DXE Framework Driver Execution Environment phase DXE SAL A special class of DXE module that produces SAL Runtime Services DXE SAL modules differ from DXE Runtime modules in that the DXE Runtime modules support Virtual mode OS calls at OS runtime and DXE SAL modules support intermixing Virtual or Physical mode OS calls DXE SMM A special class of DXE module that is loaded into the System Management Mode memory DXE Runtime Special class of DXE module that provides Runtime Services EBNF Extended Backus Naur Form meta syntax notation with the following additional constructs square brackets surround optional items suffix for a sequence of zero or more of an item suffix for one or more of an item suffix for zero or one of an item curly braces enclosing a list of alternatives an
44. KSPACE A directory name that starts with a word is assumed by the build tools to be located in the workspace directory It should be noted that conditional statements may be used anywhere within the DSC file with the ability to group any item within a section as well as entire sections 3 2 1 Common Definitions Summary The following are common definitions used by multiple section types Prototype lt Word gt lt FileSep gt lt FieldSeparator gt lt Extension gt lt CName gt lt CFlags gt lt String gt lt BareString gt lt QuotedString gt lt AsciiString gt lt Comment gt lt UnicodeString gt Alphanumeric characters either text or UNICODE with optional dash and or underscore _ characters Whitespace characters are not permitted y o One or more alphanumeric characters A valid C variable Name lt String gt lt UnicodeString gt lt AsciiString gt lt Word gt lt Whitepace gt lt NonWhitesapce gt lt BareString gt lt BareString gt lt BareString gt lt QuotedString gt 94 lt AsciiString gt NL lt QuotedString gt May 2010 Version 1 22 DSC Note lt HexDigit gt lt HexNumber gt lt RegistryFormatGUID gt lt Hex8 gt lt Hex4 gt lt Hex12 gt lt CFormatGUID gt lt Integer gt lt DecimalNumber gt lt Number gt lt TrueFalse gt lt TRUE gt lt FALSE gt lt ZeroOne gt
45. May 2010 81 DSC PeCoffLoaderLib MdeModulePkg Library DxePeCoffLoaderFromHobLib DxePeCoffLoaderFromHobLib inf VefiRuntimeServicesTableLib MdePkg Library UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib inf DebugLib IntelFrameworkModulePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugLibReportStatusCode inf LibraryClasses common DXE SMM DRIVER DxeServicesTableLib MdePkg Library DxeServicesTableLib DxeServicesTableLib inf ScsiLib MdePkg Library UefiScsiLib UefiScsiLib inf HiiLibFramework IntelFrameworkPkg Library HiiLibFramework HiiLib inf UefiBootServicesTableLib MdePkg Library UefiBootServicesTableLib UefiBootServicesTableLib inf HobLib MdePkg Library DxeHobLib DxeHobLib inf DevicePathLib MdePkg Library UefiDevicePathLib UefiDevicePathLib inf PcdLib MdePkg Library DxePcdLib DxePcdLib inf MemoryAllocationLib MdePkg Library DxeMemoryAllocationLib DxeMemoryAllocationLib inf UefiLib MdePkg Library UefiLib UefiLib inf ReportStatusCodeLib IntelFrameworkModulePkg Library DxeReportStatusCodeLibFramework DxeReportStatusCodeLib inf UefiRuntimeServicesTableLib X MdePkg Library UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib inf WinNtLib Nt32Pkg Library DxeWinNtLib DxeWinNtLib inf OemHookStatusCodeLib Nt32Pkg Library DxeNt320emHookStatusCodeLib DxeNt320emHookStatusCodeLib inf PcdLib MdePkg Library DxePcdLib DxePcdLib inf DebugLib MdePkg Library BaseDebugLibNull BaseDebugLibNull inf LibraryClasses
46. Nt32 IA32 BUILD TARGETS DEBUG RELEASE RFC_LANGUAGES ISO_LANGUAGES SKUID_ IDENTIFIER en us zh hans fr fr engchnfra SkuTwo DEFAULT 3 5 BuildOptions Section Summary Defines the BuildOptions section tag which is optional in all EDK II DSC Files Use of the include statement in the BuildOptions section is permitted though not recommended This section is used to append flags to then end of the tool code flags defined in the tools_def txt file The Family tag can be used for elements that are shared between different architectures and different tool chain tag names An example using the Family tag follows MSFT _ _ CC FLAGS D MDEPKG_NDEBUG e An optional special Family tag can be used at the start of the command line using a colon must be specified the use of the asterisk 44 character after the Family tag If not specified specific tool chain tags x wild card character is not permitted May 2010 Version 1 22 DSC EDK II DSC Format Specification Note The following is an example which does not use the Family tag and specific to a specific tool chain tag name RELEASE MYTOOLS IA32 CC FLAGS nologo c WX GS W4 Gs8192 Gy e Two types of assignment operators are permitted the single equal sign is used to append the string to the existing definition while the double equal sign is used to override any previous definition replacing the content with j
47. PATH Base Took Conf Templates EDK II Packages EDK II Platform Libraries Libraries Win32 For EDK Il Platforms using EDK Components EDK_SOURCE Gther EFI SOURCE EDK II EdkCompatibilityPkg EDK Components Libraries Figure 2 Developer Workstation Layout EDK Il Build 2 2 Build Description File Format EDK II build description files DSC FDF DEC and INF files along with other files like build_rules txt target txt and tools_def txt contain information used by the parsing utility to Version 1 22 May 2010 11 DSC Overview DSC create makefiles that process source files to generate binary PE32 PE32 Coff files The binary files can be distributed as EDK II binary packages or used to create a platform that is defined in an FDF file rather than the EDK 11 DSC file 2 2 1 Section Entries This description file consists of sections delineated by section tags enclosed within square brackets Section tag entries are case insensitive The different sections and their usage are described below The text of a given section can be used for multiple section names by separating the section names with a comma For example LibraryClass X64 libraryclass ipf The content below each section heading is processed by the parsing utilities in the order that they occur in the file The precedence for processing these architecture section tags is from right to left with sections defining an architecture ha
48. PatchableInModule PcdsPatchableInModule IA32 PedsPatchableInModule X64 PcdsPatchableInModule IPF PcdsPatchableInModule EBC Format of an entry in this section is PcdCName PcdTokenSpaceGuidCName Value DatumType MaximumDatumSize Example gEfiMdePkgTokenSpaceGuid PcdDebugPrintErrorLevel 0x80000000 UINT32 4 2 2 13 3 PcdsDynamic and PcdsDynamicEx sections 2 2 13 3 1 Dynamic For Dynamic PCD settings the section labels must include one of Default Vpd or Hii with optional architecture and an optional SKUID_IDENTIFIER name The Dynamic entry fields are separated by the pipe character If the Datum Type for the PCD is voID Version 1 22 May 2010 23 DSC Overview DSC then a field that specifies the maximum datum size is also required For using the standard PCD Get Set PPI or Protocol 2 2 13 3 2 Default PedsDynamic arch DEFAULT PcdsDynamicDefault arch SkuIdentifier PcdsDynamicHii arch Skuldentifier PcdsDynamicVpd arch Skuldentifier The format for an entry in this section is PcdTokenSpaceGuidCName PcdTokenName Value DatumType MaximumDatumSize Examples PedsDynamicDefault gEfiGenericPlatformTokenSpaceGuid PcdFlashNvStorageVariableBase 0 gEfiGenericPlatformTokenSpaceGuid PcdFlashNvStorageVariableSize 0x0 2 2 13 3 3 HII For using the HII for PCD data the section name is as follows PedsDynamicHii arch DEFAULT Specifying a SKUID IDENTIFIE
49. Pkg Universal DriverSampleDxe DriverSampleDxe inf MdeModulePkg Application HelloWorld HelloWorld inf BuildOptions MSFT DEBUG_ _1A32 DLINK FLAGS EXPORT InitializeDriver ModuleEntryPoint ALIGN 4096 SUBSYSTEM CONSOLE MSFT RELEASE IA32 DLINK FLAGS ALIGN 4096 DEBUG_ICC IA32 DLINK FLAGS ALIGN 4096 SUBSYSTEM CONSOLE DEBUG_VS2003 1232 DLINK FLAGS ALIGN 4096 SUBSYSTEM CONSOLE DEBUG MYTOOLS 1232 DLINK FLAGS ALIGN 4096 SUBSYSTEM CONSOLE DEBUG_WINDDK3790x1830_1A32 DLINK FLAGS ALIGN 4096 SUBSYSTEM CONSOLE DEBUG_VS2005PRO_IA32 DLINK FLAGS ALIGN 4096 SUBSYSTEM CONSOLE DEBUG MIXED 132 DLINK FLAGS ALIGN 4096 SUBSYSTEM CONSOLE RELEASE ICC IA32 DLINK FLAGS RELEASE VS2003 IA32 DLINK FLAGS RELEASE MYTOOLS IA32 DLINK FLAGS RELEASE WINDDK3790x1830_IA32 DLINK FLAGS RELEASE VS2005PRO_1A32 DLINK FLAGS RELEASE MIXED 1232 DLINK FLAGS Version 1 22 May 2010 EXPORT EXPORT EXPORT EXPORT EXPORT EXPORT ALIGN ALIGN ALIGN ALIGN ALIGN ALIGN InitializeDriver ModuleEntryPoint InitializeDriver ModuleEntryPoint InitializeDriver ModuleEntryPoint InitializeDriver ModuleEntryPoint InitializeDriver ModuleEntryPoint InitializeDriver ModuleEntryPoint 4096 4096 4096 4096 4096 4096 89 90 May 2010 DSC Version 1 22 DSC Appendix C Module Types Table 6 EDK Il Module Types MODULE_TYPE Supported Description Architecture Types BASE Any Modules or Librari
50. PkgTokenSpaceGuid PcdStatusCodeValueMemoryTestStarted 0x00051006 gEfiMdePkgTokenSpaceGuid PcdStatusCodeValueSetVirtualAddressMap 4 gEfiMdePkgTokenSpaceGuid PcdStatusCodeValueUncorrectableMemoryError 0x00051003 gEfiMdePkgTokenSpaceGuid PcdUefiLibMaxPrintBufferSize 320 gEfiNt32PkgTokenSpaceGuid gEfiNt32PkgTokenSpaceGuid gEfiNt32PkgTokenSpaceGuid gEfiNt32PkgTokenSpaceGuid gEfiNt32PkgTokenSpaceGuid gEfiNt32PkgTokenSpaceGuid PcdWinNtFirmwareFdSize 0x2a0000 PcdWinNtFirmwareBlockSize 0x10000 PcdWinNtFlashNvStorageEventLogBase 0x28c000 PcdWinNtFlashNvStorageEventlogSize 0 PcdWinNtFlashFvRecoveryBase 0x0 PcdWinNtFlashFvRecoverySize 0x280000 gEfiNt32PkgTokenSpaceGuid gEfiNt32PkgTokenSpaceGuid gEfiNt32PkgTokenSpaceGuid PcdWinNtFlashNvStorageVariableBase 0x280000 PcdWinNtFlashNvStorageFtwSpareBase 0x290000 PcdWinNtFlashNvStorageFtwWorkingBase 0x28e000 gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid PcdFlashNvStorageFtwSpareSize 0x10000 PcdFlashNvStorageFtwWorkingSize 0x2000 PcdFlashNvStorageVariableSize 0x00c000 PcdsFeatureFlag IA32 gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid PcdPeiPcdDatabaseTraverseEnabled TRUE PcdPeiPcdDatabaseCallbackOnSetEnabled TRUE PcdPeiPcdDatabaseExEnabled TRUE gEfiMdeModulePkgTokenSpaceGuid PcdPeiPcdDatabaseGetSizeEnabled TRUE gEfiMdeModulePkgTokenSpaceGuid PcdPeiPcdDatabaseSetEnabled
51. R name for an Hii Pcd selection is optional for example PcdsDynamicHii common Skul While the format for content of this section is as follows note that the backslash character is used here to indicate the continuation of the line PcdTokenSpaceGuidCName PcdTokenName VariableName VariableGuid VariableOffset HiiDefaultValue MaximumDatumSize Examples pcdsDynamicHii common Sku_Two gEfiGmchTokenSpaceGuid PcdGmchPegPreAllocatedDvmt 0x0053 0x0065 0x0074 0x0075 0x0070 gSysconfigGuid 0x000000A9 0x3 2 2 13 3 4 VPD For using the VPD for PCD data the section name is PcdsDynamicVpd arch DEFAULT Specifying a SKUID_IDENTIFIER for a VPD PCD selection is optional for example PcdsDynamicVpd common Vpd SkuSeven While the format for content of this section is as follows PcdTokenSpaceGuidCName PcdTokenName VpdOf fset MaximumDatumSi ze Examples PcdsDynamicVpd IA32 DEFAULT PcdsDynamicVpd x64 DEFAULT gEfiPhonyTokenSpaceGuidCName PcdVpdCopyrightLine 0x000000A0 2 2 13 3 5 DynamicEx Entries for DynamicEx are identical to the Dynamic entries The DynamicEx entry fields are separated by the pipe character If the Datum Type for the PCD is vo p then MaximumDatumSize field that specifies the maximum datum size is required PcdsDynamicEx arch Default pcdsDynamicExDefault arch SkuIdentifier pedsDynamicExHii arch SkuIdentifier pedsDynamicExVpd arch SkuIdentifier
52. UefiTianoCustomDecompressLib BaseUefiTianoCustomDecompressLib inf UefiDecompressLib Intel FrameworkModulePkg Library BaseUefiTianoCustomDecompressLib BaseUefiTianoCustomDecompressLib inf HiiLibFramework IntelFrameworkPkg Library HiiLibFramework HiiLib inf LibraryClasses common BASE DebugLib MdePkg Library BaseDebugLibNull BaseDebugLibNull inf ReportStatusCodeLib IntelFrameworkModulePkg Library BaseReportStatusCodeLib BaseReportStatusCodeLib inf LibraryClasses common USER_ DEFINED DebugLib MdePkg Library BaseDebugLibNull BaseDebugLibNull inf ReportStatusCodeLib IntelFrameworkModulePkg Library BaseReportStatusCodeLib BaseReportStatusCodeLib inf LibraryClasses common SEC DebugLib MdePkg Library BaseDebugLibNull BaseDebugLibNull inf ReportStatusCodeLib IntelFrameworkModulePkg Library BaseReportStatusCodeLib BaseReportStatusCodeLib inf LibraryClasses common DXE CORE DevicePathLib MdePkg Library UefiDevicePathLib UefiDevicePathLib inf UefiBootServicesTableLib MdePkg Library UefiBootServicesTableLib UefiBootServicesTableLib inf HobLib MdePkg Library DxeCoreHobLib DxeCoreHobLib inf DxeCoreEntryPoint MdePkg Library DxeCoreEntryPoint DxeCoreEntryPoint inf MemoryAllocationLib MdePkg Library DxeMemoryAllocationLib DxeMemoryAllocationLib inf UefiLib MdePkg Library UefiLib UefiLib inf ReportStatusCodeLib IntelFrameworkModulePkg Library DxeReportStatusCodeLibFramework DxeReportStatusCodeLib inf Version 1 22
53. ader can optionally specify the EDK II module type following the supported architecture field This is permitted as some library instances can be used by any or all module types This is a an optional section for EDK II DSC files only if there are no EDK II modules used by the DSC file 2 2 12 1 Generic format for the specifying a section libraryclasses libraryclasses IA32 libraryclasses X64 libraryclasses IPF libraryclasses EBC 2 2 12 1 1 Format for entries in this section Note Note 20 LibraryClassName WORKSPACE Path To LibInstanceName inf LibraryClassNamel Path To LibInstanceNamel inf The reserved library class keyword NULL is not permitted in any of the libraryclasses sections The NULL Library class keyword is only permitted within the Components section s INF file lt LibraryClass gt subsection LibraryClassName is a keyword in the first field of the above example format can not be NULL The LibraryClassName name must be unique to an instance specified in the second field All INF files that require a LibraryClassName will use this instance when linked to the other libraries or modules The first globally defined library instance defined in a DSC file that satisfies a modules requirement for a Library Class unless specifically overridden by the module in the Components section will be used The Library Instances will be selected using the following rules to satisfy a library cla
54. ags defined in this section are appended to flags defined in the tools_def txt file for individual tools EXCEPTION If the INF MODULE_TYPE defined in the defines section is USER_DEFINED then the flags listed in this section are the only flags used for the TOOLCODE command specified in Conf tools_def txt The attribute must be specific to the tool code and must be a valid attribute handled by the build system For the reference build a valid rule must be included in the build_rule txt Developers should use extreme caution when specifying items in this section The EDK build is designed to support multiple compilers and tool chains expecting that code is written in ANSI C If custom tool flags are required by a module developers must make sure that all consumers of the module are aware of the specific tools and tag names required The following examples show the usage of the Buildoptions section Note that the lines show use of the line continuation character May 2010 Version 1 22 DSC DSC Overview BuildOptions common MSFT DEBUG_ _1A32 DLINK FLAGS out BIN DIR SecMain exe base 0x10000000 pdb BIN DIR SecMain pdb LIBPATH VCINSTALLDIR Lib LIBPATH VCINSTALLDIR PlatformSdk Lib NOLOGO SUBSYSTEM CONSOLE NODEFAULTLIB IGNORE 4086 MAP OPT REF DEBUG MACHINE I386 LTCG Kernel32 1ib MSVCRTD lib Gdi32 1ib User32 lib Winmm lib MSFT DEBUG_ _1A32 CC FLAGS nolo
55. alue gt lt comment gt lt EOL gt lt TokenSpaceGuidCName gt lt TokenCName gt lt CName gt lt CName gt lt BoolType gt lt MACRO gt lt BoolExpression gt N lt WORD gt A Z A Z0 9 Any combination of C style expressions using numeric values macros or other PCD names that evaluate to either TRUE or FALSE C style expression using C relational equality and logical numeric and bitwise operators that evaluate to either TRUE 1 or FALSE 0 Values other than zero or one are invalid Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined before it can be used Example PcdsFeatureFlag gEfiMdePkgTokenSpaceGuid PcdComponentNameDisable FALSE gEfiMdeModulePkgTokenSpaceGuid PcdDxePcdDatabaseTraverseEnabled TRUE May 2010 Version 1 22 DSC EDK II DSC Format Specification 3 9 2 PcdsFixedAtBuild Section Summary This is an optional section for EDK II DSC Files Each entry must be on a single line This section defines the PcdsFixedAtBuild section tag that may be required for EDK II DSC files that will use EDK II module INF files The values listed below must match the datum type specified in the DEC file that declares this PCD Note that if a PCD s datum type is vorp the MaximumDatumSize field is required The include statement i
56. amicExEntry gt lt BuildOptions gt lt EOL gt lt DefineStatements gt lt ToolFlags gt lt ToolPath gt lt ToolCmd gt lt Other gt lt Family gt lt FlagSpec gt lt Equal gt lt Flags gt lt EOL gt lt Target gt _ lt TagName gt _ lt Tarch gt _ lt ToolCode gt lt ToolSpec gt _FLAGS lt Family gt lt PathSpec gt lt Equal gt lt PATH gt lt EOL gt lt ToolSpec gt _DPATH May 2010 69 EDK DSC Format Specification lt ToolCmd gt lt CmdSpec gt lt PathCmd gt lt Extension gt lt Other gt lt OtherSpec gt lt Equal gt lt Tarch gt lt OA gt lt Family gt lt UserDef gt lt Attribute gt lt Target gt lt TagName gt lt ToolCode gt lt Flags gt Parameters Target DSC lt Family gt lt CmdSpec gt lt PathCmd gt lt EOL gt lt ToolSpec gt _PATH lt PATH gt lt Word gt lt Extension gt a zA Z a zA Z0 9 lt Family gt lt OtherSpec gt lt ToolSpec gt _ lt Attribute gt lt Equal gt lt String gt ec IA32 X64 IPF EBC lt OA gt A Z A 20 9 MSFT GCC INTEL ACPICA lt UserDef gt A Z A Z0 9 Attribute Target TagName ToolCode FlagString Must match a target identifier in the EDK II tools_def txt file the first field where fields ar
57. ased by the Unified EFI Forum UEFI Platform Initialization Specification 1 2 Current version of the PI specification released by the Unified EFI Forum This specification builds on the Intel Platform Innovation Framework for EFI specifications and transfers ownership of most of these specifications from Intel to a non profit industry trade organization Unified EFI Forum A non profit collaborative trade organization formed to promote and manage the UEFI standard For more information see www uefi org VFR Visual Forms Representation 1 4 Conventions Used in this Document This document uses typographic and illustrative conventions described below 1 4 1 Data Structure Descriptions Intel processors based on 32 bit Intel architecture IA 32 are little endian machines This distinction means that the low order byte of a multi byte data item in memory is at the lowest address while the high order byte is at the highest address Processors of the Intel Itanium processor family may be configured for both little endian and big endian operation All implementations designed to conform to this specification will use little endian operation In some memory layout descriptions certain fields are marked reserved Software must initialize such fields to zero and ignore them when read On an update operation software must preserve any reserved field The data structures described in this document generally have the following
58. atted string consisting of three to six fields that are separated by the pipe character Version 1 22 May 2010 59 EDK II DSC Format Specification 60 Prototype lt ped gt lt PcdTypes gt lt Args gt lt Primative gt lt Arch gt lt OA gt lt DataStore gt lt Skuld gt lt default gt lt hii gt lt vpd gt lt Skuldentifier gt lt DefineStatements gt lt IncludeStatement gt lt Filename gt lt PATH gt lt Path gt lt PcdEntry gt lt minEntryl gt lt PcdName gt lt PcdCName gt lt TokenSpaceGuidCName gt lt Value gt DSC lt PcdTypes gt lt Args gt lt EOL gt lt DefineStatements gt lt IncludeStatement gt lt PcdEntry gt PcdsDynamic PcdsDynamicDefault PedsDynamicHii PcdsDynamicVpd lt Primative gt lt PcdTypes gt lt Primative gt lt Arch gt lt Skuld gt IA32 X64 IPF EBC common lt OA gt A Z 20 9 lt default gt lt hii gt lt vpd gt gt lt Skuldentifier gt Default Hii vpd lt Keyword gt lt Keyword gt DEFINE lt MACRO gt lt Value gt lt EOL gt tinclude lt Filename gt lt EOL gt lt PATH gt lt Word gt txt WORKSPACE lt Path gt lt Word gt IF lt DataStore gt lt hii gt lt hiiEntry gt IF lt DataSto
59. bFramework IntelFrameworkPkg Library HiiLibFramework HiiLib inf VefiApplicationEntryPoint MdePkg Library UefiApplicationEntryPoint UefiApplicationEntryPoint inf UefiBootServicesTableLib MdePkg Library UefiBootServicesTableLib UefiBootServicesTableLib inf HobLib MdePkg Library DxeHobLib DxeHobLib inf DevicePathLib MdePkg Library UefiDevicePathLib UefiDevicePathLib inf PcdLib MdePkg Library DxePcdLib DxePcdLib inf MemoryAllocationLib MdePkg Library DxeMemoryAllocationLib DxeMemoryAllocationLib inf UefiLib MdePkg Library UefiLib UefiLib inf ReportStatusCodeLib IntelFrameworkModulePkg Library DxeReportStatusCodeLibFramework DxeReportStatusCodeLib inf UefiRuntimeServicesTableLib MdePkg Library UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib inf WinNtLib Nt32Pkg Library DxeWinNtLib DxeWinNtLib inf OemHookStatusCodeLib Nt32Pkg Library DxeNt320emHookStatusCodeLib DxeNt320emHookStatusCodeLib inf DebugLib IntelFrameworkModulePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugLibReportStatusCode inf LE 84 May 2010 Version 1 22 DSC Pcd Section list of all EDK II PCD Entries defined by this Platform LE PedsFeatureFlag common gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdeModulePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid PcdsFixedA
60. d super subscripts indicating between n and m occurrences EFI Generic term that refers to one of the versions of the EFI specification EFI 1 02 EFI 1 10 UEFI 2 0 UEFI 2 1 UEFI 2 2 or UEFI 2 3 EFI 1 10 Specification Intel Corporation published the Extensible Firmware Interface Specification Intel has donated the EFI specification to the Unified EFI Forum and the UEFI now owns future updates of the EFI specification Foundation The set of code and interfaces that glue implementations of EFI together Framework Intel Platform Innovation Framework for EFI consists of the Foundation plus other modular components that characterize the portability surface for modular components designed to work on any implementation of the Tiano architecture GUID Globally Unique Identifier A 128 bit value used to name entities uniquely A unique GUID can be generated by an individual without the help of a centralized authority This allows the generation of names that will never conflict even among multiple unrelated parties GUID values can be registry format 8 4 4 4 12 or C data structure format HII Human Interface Infrastructure This generally refers to the database that contains string font and IFR information along with other pieces that use one of the database components IFR Internal Forms Representation This is the binary encoding that is used for the representation of user interface pages Library Class A library class defines the
61. d tools available on TianoCore org do not use this section The reference tools ignore all content within a UserExtensions section The following is an example of a UserExtensions section userextensions Edk2AcpiTable POST_PROCESSING 28 May 2010 Version 1 22 DSC EDK II DSC Format Specification 3 EDK II DSC Format Specification 3 1 Introduction This section of the document describes the DSC sections using an Extended Backus Naur Form It should be noted that the DSC file must define all libraries components and or modules that will be processed by third party compiler tool chains such as the GNU C compiler gcc Binary Only modules do not need to be listed in this file as they can be specified in the FDF file There may also be modules listed in this section that are not required in the FDF file When a module listed here is excluded from FDF file then a UEFI compliant binary will be generated but the binary will not be put into any firmware volume Note Path and Filename elements within the DSC are case sensitive in order to support building on UNIX style operating systems 3 2 Platform DSC Definition Summary Platform EDK II DSC description lt EDK_II_DSC gt lt Header gt lt IncludeStatement gt lt Defines gt lt SkuIds gt lt Libraries gt lt LibraryClasses gt lt Pcds gt lt Components gt lt BuildOptions gt lt UserExtensions gt Note Assignments set as command line ar
62. dulePkg Universal Ebc Dxe Ebc inf WORKSPACE MdeModulePkg Universal GenericMemoryTest Dxe NullMemoryTest inf WORKSPACE MdeModulePkg Universal StatusCode Pei PeiStatusCode inf lt BuildOptions gt MSFT RELEASE MYTOOLS IA32 DLINK FLAGS Kernel32 lib MSVCRTD lib Gdi32 1ib User32 lib Winmm lib DEBUG_MYTOOLS IA32 DLINK FLAGS Kernel32 lib MSVCRTD lib Gdi32 lib User32 lib Winmm lib DEBUG_WINDDK3790x1830_1A32 DLINK FLAGS Kernel32 lib MSVCRTD lib Gdi32 lib User32 lib Winmm lib RELEASE WINDDK3790x1830_IA32 DLINK FLAGS Kernel32 lib MSVCRTD lib Gdi32 lib User32 lib Winmm lib DEBUG_VS2003 1232 DLINK FLAGS Kernel32 1ib MSVCRTD lib Gdi32 lib User32 lib Winmm lib RELEASE VS2003 IA32 DLINK FLAGS Kernel32 1ib MSVCRTD 1ib Gdi32 lib User32 lib Winmm lib WORKSPACE EdkNt32Pkg Logo Logo inf 3 11 UserExtensions Section 72 Summary Defines the optional EDK II DSC file UserExtensions section tag This is an optional section There can be multiple UserExtension sections depending on the UserID and Identifier attributes of the FPD file An example section is listed below UserExtensions are for processing by tools outside of the standard tools provided by EDK II May 2010 Version 1 22 DSC EDK II DSC Format Specification The EDK II build tools will ignore this section The data in the DSC file must be entered by the platform developer as no data will be copied from the FPD files Current FPD files use
63. e separated by the underscore character The character is a valid wild card TagName Must match a tag name field in the EDK II tools_def txt file second field The character is a valid wild card TargetArch Must match the architecture field in the EDK II tools_def txt file third field The character is a valid wild card ToolCode Must match a tool code field in the EDK II tools_def txt file fourth field Use of a wild card character is not permitted AttributeName Must match a tool attribute field in the EDK II tools_def txt file fifth field Use of a wild card character is not permitted The attributes _Flag _PATH and DPATH are defined elsewhere and cannot be used with the lt OtherSpec gt definition May 2010 Version 1 22 DSC EDK II DSC Format Specification FlagString Must be a valid string for the tool specified The string will be appended to the end of the tool s flags from the tools_def txt Both Microsoft and GCC evaluate options from left to right on the command line This allows disabling some flags that may have been specified in the tools_def txt by providing an alternate flag i e if the tools_def txt CC FLAGS defines O2 and an O1 options is specified for this module the module will compile with O1 size not with 02 speed Use of the quote characters around options is required when specifying string values with spaces path names with spaces or values containing the hash
64. e used UEFI String Token Name Language Code This is a non unicode version of an HII string token name obtained from UNI files Tools must provide a method of looking up the value of string using the token name converted to unicode by the tools from the UCS2 file Either the RFC4646 or the 150 639 2 language code must be provided If the code is not defined in the UCS2 file then the tools must provide a best match with a default of en if no best match is found Example PcdsFixedAtBuild IA32 gEfiMdePkgTokenSpaceGuid PcdFSBClock 200000000 UINT64 gEfiMdePkgTokenSpaceGuid PcdMaximumUnicodeStringLength 0 gEfiEdkNt32PkgTokenSpaceGuid PcdWinNtMemorySizeForSecMain L 64 64 10 VOID 16 3 9 3 PcdsPatchablelnModule Section Summary Defines the PcdsPatchableInModule section tag that may be required for EDK II DSC files that will use EDK 11 module INF files The values listed below must match the datum type specified in the DEC file that declares this PCD Note that if a PCD s datum type is vorp the MaximumDatumSize field is required This is an optional section for EDK II DSC Files An entry must be on a single line The include statement is permitted in PcdsPatchableInModule sections although not recommended The PcdsFixedAtBuild and or PcdsPatchableInModule entry is a formatted string with two to four fields separated by the pipe character Version 1 22 May 2010 57 EDK II DSC Format Speci
65. ents Version 1 22 Macro statements are characterize by a DEFINE token or may be defined on a May 2010 31 EDK II DSC Format Specification DSC 32 command line of a parsing tool Command line definitions take precedence over macro statements specified within the DSC file Definition statements appearing in a section of the file and are scoped to the section they are defined in If the Macro statement is within the Defines section then the Macro is common to the entire file with local definitions taking precedence if the same MACRO name is used in subsequent sections then the MACRO value is local to only that section Macros defined in the Defines section may also be used when processing other files specified by the DSC file or by files required by the build system Note that a macro named MDEPKG_NDEBUG is reserved for size reduction purposes The user should not use this keyword to define new macro Macro statements may not be referenced before they are defined May 2010 Version 1 22 Prototype lt MacroDefinition gt lt MACRO gt lt PATH gt lt AbsolutePath gt lt SysEnv gt lt RelativePath gt lt Value gt lt Number gt lt Integer gt lt Hex gt lt PcdName gt lt TokenCName gt lt TokenSpaceGuidCName gt lt QuotedString gt lt SingleQuotes gt lt DoubleQuotes gt lt LogicalOp gt lt AndOp gt lt OrOp gt lt NotOp gt EDK II DSC Format Specification DEFINE
66. es a Bold typeface can be used as a running head within a paragraph Italic In text an Italic typeface can be used as emphasis to introduce a new term or to indicate a manual or specification name BOLD Monospace Computer code example code segments and all prototype code segments use a BOLD Monospace typeface with a dark red color These code listings normally appear in one or more separate paragraphs though words or segments can also be embedded in a normal text paragraph Words in a Bold Monospace typeface that is underlined and in blue indicate an active hyperlink to the code definition for that function or type definition Click on the word to follow the hyperlink Bold Monospace VAR This symbol VAR defined by the utility or input files Italic Mono space In code or in text words in Italic Monospace indicate placeholder names for variable information that must be supplied i e arguments Note Due to management and file size considerations only the first occurrence of the reference on each page is an active link Subsequent references on the same page will not be actively linked to the definition and will use the standard non underlined BOLD Monospace typeface Find the first instance of the name in the underlined BOLD Monospace typeface on the page and click on the word to jump to the function or type definition The following typographic conventions are used in this document to illus
67. es can be ported to any execution environment This module type is intended to be used by silicon module developers to produce source code that is not tied to any specific execution environment SEC Any Modules of this type are designed to start execution at the reset vector of a CPU They are responsible for preparing the platform for the PEI phase PEI CORE Any This module type is used by PEI Core implementations that are compliant with the PI 1 2 Specification PEIM Any This module type is used by PEIMs that are compliant with PI 1 2 DXE_CORE Any This module type is used by DXE Core implementations that are compliant with the PI 1 2 Specification DXE_DRIVER Any This module type is used by DXE Drivers that are compliant with the PI 1 2 Specification DXE_RUNTIME_DRIVER Any This module type is used by DXE Drivers that are compliant to the PI 1 2 Specification These modules execute in both boot services and runtime services environments DXE_SAL_DRIVER IPF This module type is used by DXE Drivers that can be called in physical mode before SetVirtualAddressMap is called and either physical mode or virtual mode after SetVirtualAddressMap has been called This module type is only available for IPF processor types DXE_SMM_DRIVER 1A32 X64 This module type is used by DXE Drivers that are loaded into SMRAM SMM_CORE Any This is the SMM core UEFI_DRIVER Any This module type is used by VEFI Driver
68. fication 58 Prototype lt ped gt lt Args gt lt Arch gt lt Arches gt lt OA gt lt IncludeStatement gt lt DefineStatements gt lt Filename gt lt PATH gt lt Path gt lt PcdEntry gt lt PcdName gt lt TokenName gt lt TokenSpaceGuidCName gt lt PcdValue gt lt MACRO gt lt Boolean gt lt Number gt lt NumType gt lt StringData gt lt StrValue gt lt StringType gt lt DataArray gt lt MaxDatumSize gt lt TOKEN gt DSC PcdsPatchableInModule lt Args gt lt EOL gt lt DefineStatements gt lt IncludeStatement gt lt PcdEntry gt lt Arch gt PcdsPatchableInModule lt Arch gt 9 lt Arches gt IA32 X64 IPF EBC common lt OA gt A Z A Z0 9 tinclude lt Filename gt lt EOL gt DEFINE lt MACRO gt lt Value gt lt EOL gt lt PATH gt lt Word gt txt WORKSPACE lt Path gt lt Word gt lt PcdName gt lt PcdValue gt lt comment gt lt EOL gt lt TokenSpaceGuidCName gt lt TokenCName gt lt CName gt lt CName gt lt Boolean gt lt Number gt lt StringData gt lt MACRO gt lt Expression gt ng 5 lt WORD gt n lt BoolType gt lt BoolExpression gt BOOLEAN Ox lt HexDigit gt lt Integer gt lt Expression gt lt NumType gt
69. file Note Section 3 10 defines the sub element content of an INF file specified in a component section This 26 code paragraph section shows the format of a scoping structure WORKSPACE Path and Filename inf Sub elements See EDK II INF file statement structure There are three valid optional sub elements for EDK II modules These sub element are enclosed within angle brackets lt LibraryClass gt lt Pcd gt and lt BuildOptions gt An INF file line may also have one argument EXEC Filename that specifies an executable file that takes the INF filename as a parameter The Filename must be executable and must take the INF filename No other arguments are permitted to the Filename The parsing tools will call the executable specified by the Filename as follows Filename WORKSPACE Path and Filename inf If the EXEC argument is included on the component or module INF line EDK II Tools will ignore processing of the module Additionally EDK II build tools will not perform any dependency checking for files listed in the INF file nor on the output object file EXEC example follows WORKSPACE Path and Filename inf EXEC exe2bin exe The structure for specifying an EDK II INF filename is as follows May 2010 Version 1 22 DSC DSC Overview EDK SOURCE Path and ComponentName inf options Library Class listing Required for EDK II components One or more Library mapping lines are permitted
70. fines the directory containing the original EDK Tools executable files Default EFI_TOOLS PATH Bin PROCESSOR Defines the EDK target processor for which the code is to be built This symbol will typically be used only in EDK INF files and is ignored for pure EDK II builds TARGET _ ARCH This defines which of the supported architectures will be built this value is set in the file WORKSPACE Conf target txt or it may be specified on a command line BUILD DIR SOURCE_DIR Defines the build tip directory for the current platform For example this may be OUTPUT_DIR Platform Nt32 For a component defines the directory of the component source files DEST_DIR For a component defines the directory typically under BUILD DIR where the component object files are to be built LIB_DIR Specifies the directory where EFI libraries are deposited after building Default BUILD DIR TARGET TAGNAME ARCH LIB BIN DIR Specifies the directory where final component binaries efi are deposited during build Default BUILD DIR TARGET _ TAGNAME ARCH FV_DIR Specifies a WORKSPACE relative or absolute directory where the final image files should be placed at the conclusion of a successful build If the directory does not exist the tools should create this directory If not defined tools should create an FV directory underneath the BIN_DIR
71. format Summary A brief description of the data structure Prototype An EBNF type declaration for the data structure Example Sample data structure using the prototype 1 4 2 Pseudo Code Conventions Pseudo code is presented to describe algorithms in a more concise form None of the algorithms in this document are intended to be compiled directly The code is presented at a level corresponding to the surrounding text Version 1 22 May 2010 5 Introduction DSC In describing variables a list is an unordered collection of homogeneous objects A queue is an ordered list of homogeneous objects Unless otherwise noted the ordering is assumed to be FIFO Pseudo code is presented in a C like format using C conventions where appropriate The coding style particularly the indentation style is used for readability and does not necessarily comply with an implementation of the UEFI Specification 1 4 3 Typographic Conventions This document uses the typographic and illustrative conventions described below Typographic Convention Plain text Typographic convention description The normal text typeface is used for the vast majority of the descriptive text in a specification Plain text blue Any plain text that is underlined and in blue indicates an active link to the cross reference Click on the word to follow the hyperlink Bold In text a Bold typeface identifies a processor register name In other instanc
72. gTokenSpaceGuid PcdDriverDiagnosticsDisable FALSE gEfiMdeModulePkgTokenSpaceGuid PcdNtEmulatorEnable FALSE gEfiMdeModulePkgTokenSpaceGuid PcdDevicePathSupportDevicePathToText TRUE gEfiMdeModulePkgTokenSpaceGuid PcdDevicePathSupportDevicePathFromText TRUE gEfiMdePkgTokenSpaceGuid PcdComponentName2Disable TRUE gEfiMdePkgTokenSpaceGuid PcdDriverDiagnostics2Disable TRUE gEfiMdeModulePkgTokenSpaceGuid PcdSupportUpdateCapsuleRest FALSE gEfiIntelFrameworkModulePkgTokenSpaceGuid gEfiIntelFrameworkModulePkgTokenSpaceGuid 86 May 2010 PcdPcilIsaEnable FALSE PcdPciVgaEnable FALSE Version 1 22 DSC gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdPciBusHotplugDeviceSupport TRUE LE Pcd Dynamic Section list of all EDK II PCD Entries defined by this Platform HEE FEE E FE HE FE HE E FE FE FE FE HE FE FE FE FE FE E FE FE HE FE 8 FE FE FE E FE FE FE FE FE FE 4 PcdsDynamicDefault common DEFAULT gEfiNt32PkgTokenSpaceGuid PcdWinNtSerialPort L COM1 COM2 VOID 18 PcdwinNtFileSystem gEfiNt32PkgTokenSpaceGuid ANA AN AA EdkShellBinPkg bin ia32 Apps 106 gEfiNt32PkgTokenSpaceGuid PcdWinNtGop L UGA Window 1 UGA Window 2 1 0 gEfiNt32PkgTokenSpaceGuid PcdWinNtConsole L Bus Driver Console Window VOID 50 gEfiNt32PkgTokenSpaceGuid PcdWinNtVirtualDisk L FW 40960 512 VOID 24 gEfiNt32PkgTokenSpaceGuid PcdWinNtCpuModel L NT32 Processor Emulation VOID
73. ghtLine 0x000000A0 2 2 14 Components Section Processing One or more Components sections contain lists of EDK components and EDK II Modules The format for specifying the INF file for EDK II modules incorporates new scoping capabilities This section uses one or more of the following section definitions Components components IA32 components X64 components IPF components EBC EDK components are specified using a fully qualified path to the EDK INF file EDK SOURCE Path and Filename inf Because EDK 11 modules have different requirements than EDK 1 components specifying the INF filename in the extended DSC file may require more than just the INF filename and options A scoping structure that binds library class with an optional override instance PCD settings also overriding the values specified in the pcd PcdType section and build options to an EDK II module may be required This scoping structure containing sub elements is enclosed within curly braces 7 The opening curly brace must appear at the end of the inf filename line before any comments These are needed only if specifying a non default library class one specified in the LibraryClasses section or if changing a PCD value from defaults specified in the Version 1 22 May 2010 25 DSC Overview DSC ped PcdType section or ir overriding tool flags set either in the Defines section of the DSC file or if an entry in the tools_def txt
74. go W4 WX Gy c D UNICODE D EFI32 Od DSTRING ARRAY NAME SecMainStrings FIS DEST_DIR_DEBUG AutoGen h EHs c GF Gs8192 Zi Gm 2 2 10 Skulds Section Processing The contents of this section are used to define valid SKUID_IDENTIFIER names Since a platform may support different SKUs and different SKUs may implement different methods for handing platform configuration data PCD the user can define in this section tag names to use Each entry below the section header is of the form integer word The following is an example of a SkuIds section Skulds 1 Sku_Two 22 Skul 5 SkuSeven 2 2 11 Libraries Section Processing This section specifies all the EDK INF files that must be processed to build the libraries used to build the individual EDK components This will include all the libraries called out in the individual component INF files A sample section is listed below Each line from the libraries section specifies a library component s INF file relative to EDK_SOURCE or absolute path This section is required for any EDK II DSC file that specifies one or more EDK components If only EDK II Modules are used this section should not be specified If the section is specified and only EDK II Modules are found the build and parsing tools will ignore this section A warning message will be emitted by the parsing tool if and only the parsing tool is executed in a verbose mode The include statements may be used
75. gt lt Expression gt ng lt WORD gt Ki lt BoolType gt lt BoolExpression gt BOOLEAN Ox lt HexDigit gt lt Integer gt lt Expression gt lt NumType gt UINT8 UINT16 UINT32 UINT64 lt StrValue gt VOID lt MaxDatumSize gt lt EOL gt lt StringType gt lt DataArray gt lt AsciiString gt lt UnicodeString gt lt TOKEN gt In lt HexValue gt lt HexValue gt Ox lt HexDigit gt lt Integer gt lt Expression gt May 2010 Version 1 22 DSC EDK II DSC Format Specification Parameters BoolExpression C style expression using C relational equality and logical numeric and bitwise operators that evaluate to either TRUE 1 or FALSE 0 Values other than zero or one are invalid Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined before it can be used Expression C style expression using C relational equality and logical numeric and bitwise operators and or arithmetic and bitwise operators that evaluate to a value that matches the Datum Type of the PCD Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined before it can b
76. guments to the parsing tools take precedence over all assignments defined in the DSC file The general rules for content in EDK II DSC files follows To append comment information to any item the comment must start with the hash character and the first occurrence of the comment character terminates processing of a line The comment terminates with the end of line character Comments may appear anywhere within the file A section terminates with either another section definition or the end of the file Field separators for single lines that contain more than one field is the pipe character This character was selected to reduce the possibility of having the field separator character appear in a string such as a filename or text string Whitespace charcacters are permitted between the field separator and the content The only notable exception is the PcdName which is a combination of the PcdTokenSpaceGuidCName and the PcdCName that are separated by the period Version 1 22 May 2010 29 Note EDK DSC Format Specification DSC character This notation for a PCD name was used to uniquely identify the PCD Whitespace characters are not permitted between the PcdTokenSpaceGuidCName and the dot nor are they permitted between the dot and the PcdCName The backslash character may be used to extend a line Unless otherwise noted all file names and paths are relative the system environment variable woR
77. h system Environment s PATH variable prior to executing a command FAMILY TARGET _ TAGNAME ARC Attribute specific This permits overriding other H TOOLCODE ATTRIBUTE string attributes if required Version 1 22 May 2010 17 DSC Overview 18 DSC Table 4 EDK Il BuildOptions Variable Descriptions Variable Required Wildcard Source FAMILY TARGET TAGNAME ARCH TOOLCODE ATTRIBUTE NO YES YES YES YES YES No Yes Yes Yes NO NO Conf tools_def txt defines FAMILY as one of MSFT INTEL or GCC Typically this field is used to help the build tools determine whether the line is used for Microsoft style Makefiles or the GNU style Makefiles By not specifying the FAMILY the tools assume the flags are applicable to all families Conf tools_def txt file defines two values DEBUG and RELEASE Developers may define additional targets Conf tools_def txt file defines several different tag names these are defined by developers the default tag name MYTOOLS is provided in the template for tools_def txt and set in the Conf target txt file Conf tools_def txt defines four architectures 1A32 X64 IPF and EBC This tag must use all capital letters for the tag Additional Architectures such as PPC or ARM may be added as support becomes available The tool code must be one of the defined tool codes in the Conf tools_def txt file The fl
78. hin a single section such that they do not break the integrity of the section definitions Directives are in fix expressions that are evaluated left to right content within parenthesis is evaluated before the outer statements are evaluated Use of parenthesis is recommended to remove ambiguity The values of the Feature Flag PCDs used in the conditional statements must be set in the PcdsFeatureFlag section s of this DSC file Since this section may appear after a Feature Flag PCD is used in a conditional directive statement the reference build tools must perform two passes on this file first to get the values of the Feature Flags which are used for the conditional directives these feature flags should not be located within a conditional directive and during the second pass to evaluate the conditional statements for inclusion in the build If the value of a Feature Flag PCD cannot be determined during the first pass the build should break 34 May 2010 Version 1 22 Prototype lt Conditional gt lt IfStatement gt lt Statements gt lt ElseIfConditional gt lt ElseConditional gt lt expression gt lt FeatureFlagExpress gt lt PcdFeatureFlag gt lt LogicalExpression gt lt VariableOrTest gt lt Variable gt lt FixedPcdName gt lt PatchPcdName gt lt MACRO gt lt ArithmeticTest gt lt VariableOrArgument gt lt Arugment gt lt LogicalOp gt Version 1 22 EDK II DSC Format Spec
79. ibReportStatusCode inf LibraryClasses common DXE DRIVER UefiRuntimeServicesTableLib MdePkg Library UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib inf HobLib MdePkg Library DxeHobLib DxeHobLib inf PcdLib MdePkg Library DxePcdLib DxePcdLib inf MemoryAllocationLib MdePkg Library DxeMemoryAllocationLib DxeMemoryAllocationLib inf UefiLib MdePkg Library UefiLib UefiLib inf UefiDriverEntryPoint MdePkg Library UefiDriverEntryPoint UefiDriverEntryPoint inf ReportStatusCodeLib IntelFrameworkModulePkg Library DxeReportStatusCodeLibFramework DxeReportStatusCodeLib inf DxeServicesTableLib MdePkg Library DxeServicesTableLib DxeServicesTableLib inf HiiLibFramework IntelFrameworkPkg Library HiiLibFramework HiiLib inf UefiBootServicesTableLib MdePkg Library UefiBootServicesTableLib UefiBootServicesTableLib inf DevicePathLib MdePkg Library UefiDevicePathLib UefiDevicePathLib inf ScsiLib MdePkg Library UefiScsiLib UefiScsiLib inf WinNtLib Nt32Pkg Library DxeWinNtLib DxeWinNtLib inf OemHookStatusCodeLib Nt32Pkg Library DxeNt320emHookStatusCodeLib DxeNt320emHookStatusCodeLib inf EdkGenericBdsLib Nt32Pkg Library EdkGenericBdsLib EdkGenericBdsLib inf DebugLib IntelFrameworkModulePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugLibReportStatusCode inf LibraryClasses common UEFI APPLICATION DxeServicesTableLib MdePkg Library DxeServicesTableLib DxeServicesTableLib inf ScsiLib MdePkg Library UefiScsiLib UefiScsiLib inf HiiLi
80. ification lt IfStatement gt lt EOL gt lt Conditional gt 9 lt Statements gt 1 lt ElseIfConditional gt 10 lt Conditional gt 0 lt ElseConditional gt 10 1 lt Conditional gt 0 tendif lt EOL gt if lt expression gt ifdef lt MACRO gt lifndef lt MACRO gt lt Sections gt lt SubSections gt lt SectionStatements gt telseif lt expression gt lt EOL gt lt Statements gt 1 telse lt EOL gt lt Statements gt 1 lt FeatureFlagExpress gt lt LogicalExpression gt NOT lt PcdFeatureFlag gt lt LogicalOp gt lt PcdFeatureFlag gt lt PedTokenSpaceGuidCName gt lt PcdCName gt lt VariableOrTest gt lt LogicalOp gt lt VariableOrTest gt lt Variable gt lt AritmeticTest gt lt FeatureFlagExpress gt lt FixedPcdName gt lt PatchPcdName gt lt MACRO gt lt PcdTokenSpaceGuidCName gt lt PcdCName gt lt PcdTokenSpaceGuidCName gt lt PcdCName gt a zA Z a zA Z0 9 0 lt Variable gt lt ArithmeticOp gt lt VariableOrArgument gt lt Varaible gt lt Argument gt 0x a fA FO 9 1 0 9 1 AND 1 XOR NOT May 2010 35 EDK II DSC Format Specification DSC lt AritmeticOp gt fay us gt ree lt Parameters Sections One or more full or partial sections may be with
81. ification Example Lag IPF VERSION 1 VTF IPF MyBsf lifdef IA32RESET IPF_VERSION is 1 and IA32RESET defined IA32_RST_BIN IA32_RST BIN lendif COMP NAME PAL A COMP 106 F COMP TYPE OxF COMP VER 7 01 COMP CS 1 lif PROCESSOR NAME M1 COMP BIN MlPalCode PAL_ A M1 BIN COMP SM MlPalCode PAL A M1 SYM lelseif PROCESSOR NAME M2 COMP BIN M2PalCode PAL A M2 BIN COMP SIM M2PalCode PAL A M2 SYM lelse COMP BIN GenPal PAL A GEN Gin COMP SYM GenPal PAL A GEN sym lendif COMP SIZE lelseif IPF VERSION 2 VTF IPF MyBsf lifdef IA32RESET IPF VERSION is 2 and IA32RESET defined IA32 RST BIN 132 RST BIN endif COMP_NAME PAL A COMP 1700 F COMP_TYPE OxF COMP_VER 7 01 COMP cs 1 COMP BIN GenPal PAL GEN bin COMP SYM GenPal PAL A GEN sym COMP 8128 COMP_NAME PAL B COMP 106 F COMP_TYPE 1 COMP VER COMP CS 1 COMP_ BIN GenPal PAL B GER bin COMP SYM GenPal PAL B GEN sym COMP 5128 6 VTF X64 MyVtf IA32 RST BIN IA32 RST BIN lendif Version 1 22 May 2010 37 EDK II DSC Format Specification DSC 3 2 4 include Statements Summary This section defines the include statement in EDK II Platform DSC files This statement is used to include at the statement s line a file which is processed at that point as though the text of the included file was actually in the DSC file The included
82. in conditional statements A section starts with the left bracket and terminates with either another section or the end of the file Subsections One or more full or partial subsections may be within conditional statements A subsection starts with the left arrow gt and terminates with either another subsection another section or the end of the file SectionStatements One or more individual elements may be within the scope of the conditional statements Variable Variable values must be numeric or boolean in nature Tools will cast all variable values to unsigned long long UINTN when performing evaluations on values that are of different datum types PedFeatureFlag The Feature PCD is a boolean PCD that is set to either True 1 or False 0 The PCD datum type for a Feature PCD is always BOOLEAN FixedPcdName A Fixed PCD will have a set value at build time and that can not be modified in the binary image nor modified at runtime For directives the PCD datum type is limited to UINT8 UINT16 UINT32 UINT64 UINTN and BOOLEAN Using a PCD that has a datum type of VOID is prohibited in directives PatchPedName A PCD has a set value at build time and that can be modified in the binary image For directives the PCD datum type is limited to UINT8 UINT16 UINT32 UINT64 UINTN and BOOLEAN Using a PCD that has a datum type of VOID is prohibited in directives 36 May 2010 Version 1 22 DSC EDK II DSC Format Spec
83. inf OldPeiCoreEntryPoint MdePkg Library OldPeiCoreEntryPoint OldPeiCoreEntryPoint inf ReportStatusCodeLib IntelFrameworkModulePkg Library PeiReportStatusCodeLib PeiReportStatusCodeLib inf PeCoffGetEntryPointLib Nt32Pkg Library Nt32PeiPeCoffGetEntryPointLib Nt32PeiPeCoffGetEntryPointLib inf PcdLib MdePkg Library PeiPcdLib PeiPcdLib inf DebugLib IntelFrameworkModulePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugLibReportStatusCode inf LibraryClasses common DXE RUNTIME DRIVER UefiRuntimeServicesTableLib MdePkg Library UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib inf HobLib MdePkg Library DxeHobLib DxeHobLib inf PcdLib MdePkg Library DxePcdLib DxePcdLib inf MemoryAllocationLib MdePkg Library DxeMemoryAllocationLib DxeMemoryAllocationLib inf UefiLib MdePkg Library UefiLib UefiLib inf UefiDriverEntryPoint MdePkg Library UefiDriverEntryPoint UefiDriverEntryPoint inf ReportStatusCodeLib IntelFrameworkModulePkg Library DxeReportStatusCodeLibFramework DxeReportStatusCodeLib inf DxeServicesTableLib MdePkg Library DxeServicesTableLib DxeServicesTableLib inf HiiLibFramework IntelFrameworkPkg Library HiiLibFramework HiiLib inf UefiBootServicesTableLib MdePkg Library UefiBootServicesTableLib UefiBootServicesTableLib inf DevicePathLib MdePkg Library UefiDevicePathLib UefiDevicePathLib inf UefiRuntimeLib MdePkg Library UefiRuntimeLib UefiRuntimeLib inf ScsiLib MdePkg Library UefiScsiLib UefiScsiLib inf WinNtLib
84. ing systems As a result of multiple environment support all directory and file names are case sensitive Additionally the use of special characters in directory and file names is restricted to the dash underscore and period characters Under no circumstances can space characters be used in a directory or file names in EDK II That said the build tools must be able to process the tool definitions file tools_def txt describing the location and flags for compiler and user defined tools 12 May 2010 Version 1 22 DSC DSC Overview which will contain space characters in paths on Windows systems This file is the ONLY file that permits the use of space characters is a directory path Additionally all EDK II directories that are architecturally dependent must use a name with only the first character capitalized 1832 Ipf X64 and Ebc are valid architectural directory names IA32 IPF and EBC are not acceptable directory names and may cause build breaks Architecture keywords IA32 IPF X64 and EBC are used by build tools and in meta data files for describing alternate threads for processing of files These keywords must not be used for describing directory paths Additionally directory names with architectural names la32 Ipf X64 and Ebc do not automatically cause the build tools or meta data files to follow these alternate paths Directories and Architectural Keywords are similar in name only 2 2 5 linclude Statemen
85. ion The full text of the license 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 te 35 35 35 35 35 35 HE 35 35 35 35 35 HE 35 35 35 35 HE HR A FE FE HE FE RA RARA d d d ala FE E aaa i ia FE EHE FE AE E FE AE FE FE ARAN ARAN ANAND Defines Section statements that will be processed to create a Makefile FE EE HE HE FE HEHE HE HE HE FE HE HE HE E FE FE HE HE HE FE FE FE HE HE FE FE FE HE FE FE FE FE FE HE FE FE FE FE a a FE FE FE HE HE FE FE HE HE HE HE FE FE HE HE HE FE FE HE HE HE HE HE Defines PLATFORM_NAME NT32 PLATFORM_GUID EB216561 961F 47EE 9EF9 CA426EF547C2 PLATFORM_VERSION 3 DSC_SPECIFICATION 0x00010015 OUTPUT_DIRECTORY Build NT32 SUPPORTED_ARCHITECTURES IA32 BUILD_TARGETS DEBUG SKUID_IDENTIFIER DEFAULT FLASH_DEFINITION Nt32Pkg Nt32Pkg fdf FEFE AE HE FE EHE FE AE FE FE AE EE FE AE HE FE E HE FE AE FE FE EHE FE FE E FE AE FE FE FE HE FE AE FE FE E HE FE AE E FE AE FE FE EE FE AE 6 SKU Identification section list of all SKU IDs supported by this Platform FEE FE FE AE FEE E FE FE AE FE E FE HE RH FE FE FE FE FE E BH FE FE 8 FE HE FE FE FE FE FE E FE FE FE FE FE FE FE FE FE E E FE E EHH HEHE SkuIds O DEFAULT The entry O DEFAULT is reserved and always required 80 May 2010 Version 1 22 DSC H
86. ions Used in this Document 5 1 4 1 Data Structure Descriptions nenea 5 1 4 2 Pseudo Code Conventions 5 1 4 3 Typographie deren une 6 2 DSG OVERVIEW nn an ata iii iad aia pina da 9 2 1 Processing e EE 9 2 2 Build Description File Format nonnen nea 11 2 2 1 Section Entries nnen eenen nennen aaa aan aaa 12 222 Comments mem E E 12 2 2 Valid Gin TEE 12 2 2 4 Ee lee E Le EE 12 2 2 5 Include Statement PROCESSING ME 13 2 2 6 Macro Statements 13 2 2 7 Conditional Directive Statements Jif annees eneen emana eee 13 2 2 8 Defines Section Processing gt 14 2 2 9 BuildOptions Gechon eee aaa 16 2 2 10 Skulds Section Processing 19 2 2 11 Libraries Section Proceseing 19 2 2 12 LibraryClasses Section Processing ne eee nenea nana a 20 2 2 13 PUD Sections Processing na see 21 2 2 14 Components Section Processing eee eee nana 25 2 2 15 UserExtensions Section 7 28 3 EDK II DSC Format Specification nnannane nnee nnnnnnnnnnenen enne En 29 3 1 hanne aE ke d 2 aa regende 29 3 2 Platform DSC Definition 77 29 3 2 1 Common Definitions nennen eee aaa aaa aaa aaa aan 30 3 2 2 MACRO Statements ananas vens ennen aaa aaa eenn ennen 31 3 2 3 Conditional Directive Statements ane ennen vennen enn ennen ennen ennn 34 3 2 4 linclude Statements ananas onneneenenenn enn ennn ennn ennsnnnennsnnnnn
87. mber gt lt String gt lt DataArray gt lt MACRO gt lt UEFI String Token Name gt lt LanguageCode gt C style expression using C relational equality and logical numeric and bitwise operators that evaluate to either TRUE 1 or FALSE 0 Values other than zero or one are invalid Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For Version 1 22 May 2010 65 EDK II DSC Format Specification DSC both macro names and PCDs the element must be previously defined before it can be used Expression C style expression using C relational equality and logical numeric and bitwise operators and or arithmetic and bitwise operators that evaluate to a value that matches the Datum Type of the PCD Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined before it can be used VpdOffset A non negative numeric value that is the number of bytes from the start of the Vpd Region specified in the FDF file VariableOffset A non negative numeric value that is the number of bytes from the start to the start of this variable UEFI String Token Name Language Code This is a non unicode version of an HII string token name obtained from UNI files Tools must provide a method of looking up the value of s
88. mponents To be clear EDK II tools do not have the limitation of ECP tools which can only do EFI 1 10 and UEFI 2 0 images 1 2 Related Information The following publications and sources of information may be useful to you or are referred to by this specification e Extensible Firmware Interface Specification Intel 2001 http developer intel com technology efi Note See the glossary sections in the EFI 1 10 Specification for additional required or recommended definitions of terms abbreviations documents and specifications Note See the master Framework glossary in the Framework Interoperability and Component Specifications help system for additional required or recommended definitions of terms abbreviations documents and specifications http www intel com technology framework spec htm e Unified Extensible Firmware Interface Specification Version 2 3 Unified EFI Inc 2006 http www uefi org e Platform Initialization Specification Version 1 1 Unified EFI Inc 2006 http www uefi org e Intel Platform Innovation Framework for EFI Specifications Intel 2006 http www intel com technology framework http sourceforge net projects edk2 files EDK II Module Writers Guide Intel 2010 PCD Infrastructure Intel 2009 EDK II User Manual Intel 2010 EDK II C Coding Standard Intel 2010 EDK II DSC Specification Intel 2010 EDK II INF File Specification Intel 2010 ED
89. nguage codes The format of the statement is specific to processing RFC4646 language code lists 2 2 9 BuildOptions Section Content in the Buildoptions section is used to define module specific tool chain flags that should be used as the default flags for a module These flags are appended to any standard flags that are defined by the build process They can be applied for any modules or those modules on the specific ARCH or those modules with the specific module style EDK or EDKIT In order to replace the standard flags that are defined by 16 May 2010 Version 1 22 DSC DSC Overview the build process an alternate assignment operator should be used is used for replacement while is used to append the flag lines In addition to flags other tool attributes may have the item either appended or replaced Valid content is within this section is limited to the following description Table 3 EDK II BuildOptions Section Elements Optional Tags Tag Value Notes S FAMILYES TARGET TAGNAME ARC Flags for specific Used to specify module specific flags H TOOLCODE FLAGS tool codes for this module FAMILY TARGET _ TAGNAME ARC The fully qualified Used to replace a specific command Hr TOOLCODE PATH path an executable such as forcing the ASL to be iasl instead of asl FAMILY TARGET _ TAGNAME ARC A fully qualified A path that will be added to the Hr TOOLCODE DPATH pat
90. niversal WatchDogTimerDxe WatchDogTimer inf MdeModulePkg Universal MonotonicCounterRuntimeDxe MonotonicCounterRuntimeDxe inf MdeModulePkg Universal CapsuleRuntimeDxe CapsuleRuntimeDxe inf MdeModulePkg Universal Console ConPlatformDxe ConPlatformDxe inf MdeModulePkg Universal Console ConSplitterDxe ConSplitterDxe inf MdeModulePkg Universal Console GraphicsConsoleDxe GraphicsConsoleDxe inf MdeModulePkg Universal Console TerminalDxe TerminalDxe inf MdeModulePkg Universal DevicePathDxe DevicePathDxe inf MdeModulePkg Universal Disk DiskIoDxe DiskIoDxe inf MdeModulePkg Universal Disk PartitionDxe PartitionDxe inf IntelFrameworkModulePkg Universal SetupBrowserDxe SetupBrowser inf MdeModulePkg Universal Disk UnicodeCollation EnglishDxe EnglishDxe inf MdeModulePkg Bus Pci AtapiPassThruDxe AtapiPassThru inf IntelFrameworkModulePkg Bus Pci PciBusDxe PciBusDxe inf MdeModulePkg Bus Scsi ScsiBusDxe ScsiBusDxe inf This driver follows UEFI specification definition MdeModulePkg Bus Scsi ScsiDiskDxe ScsiDiskDxe inf N This driver follows UEFI specification definition IntelFrameworkModulePkg Bus Pci IdeBusDxe IdeBusDxe inf Nt32Pkg WinNtBusDriverDxe WinNtBusDriverDxe inf Nt32Pkg WinNtBlockIoDxe WinNtBlockIoDxe inf Nt32Pkg WinNtConsoleDxe WinNtConsoleDxe inf Nt32Pkg WinNtSerialloDxe WinNtSerialloDxe inf Nt32Pkg WinNtGopDxe WinNtGopDxe inf May 2010 Version 1 22 DSC Nt32Pkg WinNtSimpleFileSystemDxe WinNtSimpleFileSystemDxe inf IntelFrameworkModule
91. nnnnnnnnnnennnn 38 3 3 Header Section msc nen nee twinks a ia a a 5 i i it lu 38 3 4 Defines 40 3 5 BuildOptions Section ae 44 3 6 Skulds 48 3 7 Libraries Section ran 49 3 8 LibraryClasses Section eee 50 Version 1 22 May 2010 v DSC Ce RE Le E 52 3 9 1 Pedestrianisms Section 0 7 53 3 9 2 PcdsFixedAtBuild Section neee eee vennen 55 3 9 3 PcdsPatchablelnModule Section ann anne ones onnenensennenensnnsnnnnnnennnn 57 3 9 4 PcdsDynamic Section eee ennen vennen 59 3 9 5 PcdsDynamicEx Section 62 3 10 Components Section 66 3 11 UserExtensions Section 72 Appendix A iaa 5 Appendix B 79 Appendix 6 Module ded ide bo deden 91 vi May 2010 Version 1 22 DSC Tables Table 1 EDK Build Infrastructure Support Matrix eee eee anna 1 Table 2 EDK II Defines Section Elements 777 15 Table 3 EDK II BuildOptions Section Elements Optional Tags 17 Table 4 EDK II BuildOptions Variable Descriptions an onnonnonnennnn enn enennnnnnnnennnnnnn 18 Table 5 Standard Variables aaa aaa 76 Table 6 EDK Module Types race He 91 Version 1 22 May 2010 vii DSC viii May 2010 Version 1 22 DSC Figures Figure 1 EDK Il Parsing Data Flow Figure 2 Developer Workstation Layout EDK II Build Version 1 22 May 2010 DSC May 2010 Version 1 22 Introduction 1
92. nstances gt lt PcdsFeatureFlag gt lt PcdsFixedAtBuild gt lt PedsPatchableInModule gt lt PcdsDynamic gt lt PcdsDynamicEx gt lt BuildOptions gt lt ToolFlags gt lt ToolSpec gt lt FlagSpec gt lt ToolPath gt lt PathSpec gt Version 1 22 EDK II DSC Format Specification lt ClassInstanceMap gt lt NullLibraryInstances gt lt ClassName gt lt InfFilename gt lt EOL gt A Library Class Keyword defined in DEC files The Keyword must also be present in the defines section LIBRARY CLASS entry of the INF file NULL lt InfFilename gt lt EOL gt lt PcdsFeatureFlag gt lt EOL gt lt DefineStatements gt lt SetStatements gt lt PcdsFeatureFlagEntry gt lt PcdsFixedAtBuild gt lt EOL gt lt DefineStatements gt lt SetStatements gt lt PcdFixedAtBuildEntry gt lt PcdsPatchableInModule gt lt EOL gt lt DefineStatements gt lt SetStatements gt lt PedPatchableInModuleEntry gt lt PcdsDynamic gt lt PcdsDynamicDefault gt lt PedsDynamicHii gt lt PedsDynamicVpd gt lt EOL gt lt DefineStatements gt lt SetStatements gt lt PedsDynamicEntry gt lt PedsDynamicEx gt lt PcdsDynamicExDefault gt lt PedsDynamicExHii gt lt PedsDynamicExVpd gt lt EOL gt lt DefineStatements gt lt SetStatements gt lt PedsDyn
93. ny order Entries for EDK are a list of INF files with a path that is always relative to the EDK_SOURCE directory or a MACRO definition One or more include statements may be used within the libraries sections If used the file included must be a list of INF files and their paths relative to the EDK_SOURCE directory This section is an optional section in EDK II DSC files although if any EDK component is specified in the Components section then the EDK II DSC file must contain this section EDK components can not use EDK II Library Instances Version 1 22 May 2010 49 EDK II DSC Format Specification DSC Prototype lt Libraries gt Libraries lt attrs gt lt EOL gt lt DefineStatements gt lt IncludeStatement gt lt Statement gt lt attrs gt N lt arch gt libraries lt arch gt lt arch gt IA32 X64 IPF EBC Common lt IncludeStatement gt include lt Filename gt lt EOL gt lt Filename gt lt PATH gt lt Word gt txt lt Statement gt lt PathAndFilename gt lt EOL gt lt PathAndFilename gt lt PATH gt lt Word gt inf lt PATH gt EDK SOURCE lt Path gt lt Path gt lt Word gt lt DefineStatements gt DEFINE lt MACRO gt lt PATH gt lt EOL gt lt MACRO gt lt Word gt Example Libraries Foundati
94. o names and PCDs the element must be previously defined before it can be used Expression C style expression using C relational equality and logical numeric and bitwise operators and or arithmetic and bitwise operators that evaluate to a value for PCDs the value must match the Datum Type of the PCD Precedence and associativity follow C standards Along with absolute values macro names and PCDs may be used within an expression For both macro names and PCDs the element must be previously defined before it can be used Examples DEFINE UEFI DEFINE GEN SKU DEFINE SKUl WORKSPACE MyPlatformPkg GenPei WORKSPACE MyPlatformPkg Skul Pei 3 2 3 Conditional Directive Statements The conditional statements may appear anywhere within the file Conditional directive sections can be nested All conditional directives use macro or Feature Flag PCD values which must evaluate to either True or False Directives must be the only statement on a line String evaluations are not permitted The expression immediately following the tif statement controls whether the content after the line is processed or not TRUE is any non zero and or non null value other than zero Each IP within the source code must be matched with a closing endif Zero or more elif statements are permitted and may be nested however only one else statement is permitted Directives must encapsulate either entire sections or elements wit
95. on Efi Guid EfiGuidLib inf Foundation Framework Guid EdkFrameworkGuidLib inf Foundation Guid EdkGuidLib inf Foundation Library EfiCommonLib EfiCommonLib inf Foundation Cpu Pentium CpulA32Lib CpulA32Lib inf Foundation Cpu Itanium CpuIA64Lib CpuIA64Lib inf Foundation Library CustomizedDecompress CustomizedDecompress inf Libraries IA32 DEF INE PLATFORM DIR EDK SOURCE Platform PLATFORM DIR IntelEpg Guid IntelEpgGuidLib inf PLATFORM DIR IntelEpg Ppi IntelEpgPpiLib inf S PLATFORM DIR Generic Guid GenericGuidLib inf PLATFORM DIR Generic Lib Port80MappingLib PlatformPort80 inf 3 8 LibraryClasses Section 50 Summary This section defines the LibraryClasses tag required for EDK II module INF files and is new for EDK II extended DSC files This is a mapping of library class names to the EDK II module instances that provide the library class This is an optional EDK II section if no library classes are defined for any of the components or if only EDK modules are used May 2010 Version 1 22 DSC EDK II DSC Format Specification The one or more include statements may be used within the library class section The include files may contain LibraryClass Library Instance statements as well as complete Library Class sections The library class entry is a formatted string with two fields separated by the pipe character When parsing the DSC file the precedence rules should be followed 1 2
96. ore it can be used VpdOffset A non negative numeric value that is the number of bytes from the start of the Vpd Region specified in the FDF file VariableOffset A non negative numeric value that is the number of bytes from the start to the start of this variable UEFI String Token Name Language Code This is a non unicode version of an HII string token name obtained from UNI files Tools must provide a method of looking up the value of string using the token name converted to unicode by the tools from the UCS2 file Either the RFC4646 or the ISO 639 2 language code must be provided If the code is not defined in the UCS2 file then the tools must provide a best match with a default of en if no best match is found Examples PedsDynamicDefault IA32 Default gEfiEdkNt32PkgTokenSpaceGuid PcdWinNtMemorySizeForSecMain L64 64 10 gEfiCpuTokenSpaceGuid PcdCpuProcessorFeatureUserConfiguration 1 gEfiCpuTokenSpaceGuid PcdCpuProcessorFeatureCapability 0 pcdsDynamicVpd common Sku_Two SkuSeven gEfiCpuTokenSpaceGuid PcdProcessorFeatureUserConfiguration Ox0001ffff 2 pedsDynamicHii IA32 pcdsDynamicHii X64 Skul gEfiMyModulePkgTokenSpaceGuid PcdChassisIntrution 0x0053 0x0065 0x0074 0x0075 0x0070 gSysConfigGuid 0x83 0x0 3 9 5 PcdsDynamicEx Section 62 Summary Defines the PcdsDynamicEx section tag that may be required for platform DSC files that will use EDK 11 module INF files The values lis
97. 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 3 4 Defines Section 40 Summary Defines the content of the Defines section used in EDK II DSC files This section is created by the developer and is an input to the EDK II parsing utilities Elements may appear in any order Some of the entries in this section are emitted to the output makefiles This is a required section for EDK II DSC files Entries in this section are global to the both the DSC and FDF files and may be used as MACRO statement using the form MACRO_NAME The value of OUTPUT_DIRECTORY can be referenced in other meta data and makefiles as OUTPUT_DIRECTORY Likewise BUILD NUMBER can be referenced in later on in this file or may be used in files specified in the DSC file as BUILD_NUMBER Some entries are used by build tools in conjunction with other meta data files and command line options for context sensitive processing The BUILD_TARGETS Value describes the possible build targets that can be built with tools_def txt target txt and command line options limiting the context of the current build process For example if BUILD TARGETS is set to DEBUG RELEASE and the two tool configuration files target txt and tools_def txt permit building both of these targets and no target is specified on the command line of the build command the tool
98. quired in all EDK II DSC files The defines section uses one of the following section definitions defines defines IA32 defines X64 defines IPF defines EBC The format for entries in this section is Name Value All elements of the DSC file s Defines section are also valid when parsing the FDF file The use of the DEFINE MACRO Value statements in this section globally define the MACRO name The DEFINE MACRO Value statements in other sections are local to the section and override the global definition for entries in the section that follow the macro definition DEFINE MACRO Value Any defined MACRO will be expanded by tools when they encounter the entry in the section The following table lists the valid content of this section and whether the item is required 14 May 2010 Version 1 22 Table 2 EDK Il Defines Section Elements DSC Overview Typical Tag Names Required Value Notes Optional DSC_SPECIFICATION Required 0x00010005 This entry is required for all EDK II DSC files PLATFORM_GUID Required Registry Format GUID 8 4 4 4 12 PLATFORM_VERSION Required Integer or Decimal Number PLATFORM_NAME Required Single Word Only alphanumeric dash and underscore character are permitted SKUID_IDENTIFIER Required Formatted This value may be passed on the command text line and must match one of the defined names in the Skulds section If it is passed on the command line
99. r statement that permits the use of a Macro name RFC4646 Language Code One or more language codes formatted per RFC4646 using a semi colon list separator example en en US es es 419 fr fr FR zh Hans CN This list can be used to filter the output of tools that generate unicode strings For example if the unicode strings file defines 50 different languages for each string but the platform integrator only wants to support only three languages then specifying the three language codes in this statement will limit the final output of string parsing tools to strings for these three languages Tools must use a Get Best Language function when filtering the content The RFC_LANGUAGES statement should be used when processing EDK II Modules Space characters are not permitted within the list ISO 639 2 Language Code One or more three character language codes formatted per ISO 639 2 with no separator character for example engfraspa This list can be used to filter the output of tools that generate unicode strings Tools must use a Get Best Language function when filtering the content The ISO_LANGUAGES statement should be used when processing EDK Components Space characters are not permitted within the list Example Defines PLATFORM NAME NT32 PLATFORM GUID EB216561 961F 47EE 9EF9 CA426EF547C2 PLATFORM VERSION 3 DSC_SPECIFICATION 0x00010015 OUTPUT DIRECTORY SUPPORTED ARCHITECTURES WORKSPACE Build
100. rSpec gt definition Plagsering Must be a valid string for the tool specified The string will be appended to the end of the tool s flags from the tools_def txt Both Microsoft and GCC evaluate options from left to right on the command line This allows disabling some flags that may have been specified in the tools_def txt by providing an alternate flag i e if the tools_def txt file s CC FLAGS defines O2 and an O1 options is specified for this module the module will compile with O1 size not with O2 speed Use of the quote characters around options is required when specifying string values with spaces path names with spaces or values containing the hash character not within a string Note that a macro named MDEPKG_NDEBUG is reserved for size reduction purposes The user should not use this keyword to define new macro May 2010 47 EDK II DSC Format Specification DSC Example BuildOptions WINDDK3790x1830 CC FLAGS MYTOOLS CC FLAGS Qwd1418 810 Qwd1418 810 VS2003 CC FLAGS wd4244 WINDDK3790x1830_ CC FLAGS wd4244 MYTOOLS CC FLAGS wd4244 Flags used by Dynamic linker DEBUG _WINDDK3790x1830 IA32_DLINK_FLAGS EXPORT InitializeDriver ModuleEntryPoint ALIGN 4096 SUBSYSTEM CONSOLE 3 6 Skulds Section 48 Summary Defines the SkuIds tag which is optional in all EDK II DSC files Entries may appear in any order This section lists numeric mappings to the SKU ID User Interface
101. re gt lt vpd gt lt vpdEntry gt ELSE lt minEntry1 gt lt PcdName gt lt Value gt lt EOL gt lt TokenSpaceGuidCName gt lt PcdCName gt lt CName gt lt CName gt lt Boolean gt lt Number gt lt String gt lt DataArray gt May 2010 Version 1 22 DSC lt MACRO gt lt Boolean gt lt Number gt lt String gt lt StringType gt lt DatumTypeSize gt lt MaxDatumSize gt lt DataArray gt lt HexArray gt lt vpdEntry gt lt vpdOptionalData gt lt VpdInitialValue gt lt VpdOffset gt lt hiiEntry gt lt Field2 gt lt HiiString gt lt Field3 gt lt VariableGuidCName gt lt Field4 gt lt VariableOffset gt lt DefaultValue gt lt TOKEN gt Parameters BoolExpression EDK II DSC Format Specification lt MACRO gt lt WORD gt 8 9 lt BoolType gt lt BoolExpression gt BOOLEAN Ox a fA FO 9 0 9 lt Expression gt lt StringType gt lt DatumTypeSize gt lt AsciiString gt lt UnicodeString gt lt TOKEN gt VOID lt MaxDatumSize gt Ox lt HexDigit gt lt Integer gt lt Expression gt lt HexArray gt lt DatumTypeSize gt In Ox lt HexDigit gt Ox lt HexDigit gt lt PcdName gt lt VpdOffset gt lt VpdOptionalData gt lt EOL gt lt MaxDatumSize gt lt VpdInitialValue gt lt DefaultValue gt
102. rocess these statements if no value is given the tools will assume that the MACRO is either undefined for the ifdef and ifndef conditional directives or False for the if and elseif conditional directives The include statement may be used in a Defines section Version 1 22 May 2010 41 EDK II DSC Format Specification Prototype lt defines gt lt Attr gt lt Arch gt lt OA gt lt Statements gt lt SpecValue gt lt SkuUiName gt lt ArchList gt lt AddressStatements gt lt Address gt lt NumValue gt lt BuildTargetList gt lt Filename gt lt Extension gt lt PATH gt lt AbsPath gt lt Path gt DSC defines lt Attr gt lt EOL gt lt Statements gt lt Arch gt defines lt Arch gt IA32 X64 IPF EBC common lt OA gt A Z 20 9 DSC SPECIFCIATION lt SpecValue gt lt EOL gt PLATFORM NAME lt Word gt lt EOL gt PLATFORM GUID lt RegistryFormatGUID gt lt EOL gt PLATFORM VERSION lt String gt lt EOL gt SKUID IDENTIFIER lt SkuUiName gt lt EOL gt SUPPORTED ARCHITECTURES lt ArchList gt lt EOL gt BUILD TARGETS lt BuildTargetList gt lt EOL gt OUTPUT DIRECTORY lt PATH gt lt EOL gt FLASH_DEFINITION lt Filename gt lt EOL gt BUILD NUMBER
103. s gt sub section header The lt Buildoptions gt sub element must be the last sub entry of an EDK II module s scoped section Entries for lt LibraryClasses gt lt PCD gt ANT lt Buildoptions gt are used to replace the platform or global definition entries listed elsewhere LibraryClass and PCD s are globally defined in the DSC file s LibraryClasses and Pcd sections while global BuildOptions may be specified in either the DSC file s BuildOptions section or in the WORKSPACE Conf tools def txt file It should be noted that components and modules listed here will be processed during the MAKE phase of the build Binary EDK 11 only modules do not need to be listed in this section but can be put into the FDF file Build tools will use the order of files specified in this section for performing a build Library Class Instances will be built prior to the module s sources however the ordering in this file has not affect on the ordering of modules in a binary image the FDF file describes that ordering Version 1 22 May 2010 67 EDK II DSC Format Specification Prototype lt components gt lt Args gt lt arch gt lt OA gt lt DefineStatements gt lt MACRO gt lt DefineStatements gt lt PATH gt lt Path gt lt IncludeStatement gt lt Filename gt lt comment gt lt InfFiles gt lt Options gt lt InfFilename gt lt Exec gt lt ExecFilename gt lt ExecExtension gt lt Edk2Struct gt lt Librar
104. s permitted in PcdsFixedAtBuild sections although not recommended The PcdsFixedAtBuild entry is a formatted string consisting of two to four fields that are separated by the pipe character Version 1 22 May 2010 55 EDK II DSC Format Specification 56 Prototype lt ped gt lt Args gt lt ArchArg gt lt Arch gt lt OA gt lt IncludeStatement gt lt DefineStatemetns gt lt Filename gt lt PATH gt lt Path gt lt PcdEntry gt lt PcdName gt lt TokenName gt lt TokenSpaceGuidCName gt lt PcdValue gt lt MACRO gt lt Boolean gt lt Number gt lt NumType gt lt StringData gt lt StrValue gt lt StringType gt lt DataArray gt lt MaxDatumSize gt DSC PedsFixedAtBuild lt Args gt lt EOL gt lt DefineStatements gt lt IncludeStatement gt lt PcdEntry gt lt Arch gt PcdsFixedAtBuild lt Arch gt 5 lt Arch gt IA32 X64 IPF EBC common lt OA gt A Z A Z0 9 include lt Filename gt lt EOL gt DEFINE lt MACRO gt lt Value gt lt EOL gt lt PATH gt lt Word gt txt WORKSPACE lt Path gt lt Word gt lt PcdName gt lt PcdValue gt lt comment gt lt EOL gt lt TokenSpaceGuidCName gt lt TokenCName gt lt CName gt lt CName gt lt Boolean gt lt Number gt lt StringData gt lt MACRO
105. s that are compliant with the EFI 1 10 and UEFI 2 0 specifications These modules provide services in the boot services execution environment UEFI Drivers that return EFI_SUCCESS are not unloaded from memory VEFI Drivers that return an error are unloaded from memory UEFI_APPLICATION Any This module type is used by VEFI Applications that are compliant with the EFI 1 10 and EFI 2 0 specifications UEFI Applications are always unloaded when they exit Version 1 22 May 2010 91 92 May 2010 DSC Version 1 22 DSC Version 1 22 May 2010 93 94 May 2010 DSC Version 1 22 DSC Version 1 22 May 2010 95 6 May 2010 DSC Version 1 22 DSC Version 1 22 May 2010 97 98 May 2010 DSC Version 1 22 DSC Version 1 22 May 2010 99 DSC 100 May 2010 Version 1 22 DSC Version 1 22 May 2010 101 DSC 102 May 2010 Version 1 22
106. section take precedence over the platform build options specified in the Defines section The Defines section options take precedence tover options specified in the tools def txt file lt BuildOptions gt TARGET TOOLCHAIN ARCH COMMANDTYPE FLAGS string of flags If the values for the pcdTokenName are specified in the global pcd PcdType section and no values are specified in the INF filename section then the global values will be used It should be noted that only Library class library instance definitions are required Adding just the library class name without the library instances is for informational purposes only and they will not be processed Version 1 22 May 2010 27 DSC Overview DSC Example EDK SOURCE MdeModulePkg Universal Disk DiskIo Dxe DiskIo inf EDK II Module lt LibraryClass gt DebugLib WORKSPACE MdePkg Library PeiDxeDebugLibReportStatusCode PeiDxeDebugLibReportStatusCode inf BaseMemoryLib WORKSPACE MdePkg Library DxeMemoryLib DxeMemoryLib inf MemoryAllocationLib 5 WORKSPACE MdePkg Library DxeMemoryAllocationLib DxeMemoryAllocationLib inf 2 2 15 UserExtensions Section Users may develop custom tools that use the userExtensions sections The EDK II UserExtensions sections allow for extending the DSC file with custom processing of component images The format for a user extension section specifier is UserExtensions UserID Identifier The EDK II buil
107. ss for each module listed in the components section in order of highest precedence 1 lt LibraryClass gt associated with the INF file in the Components section libraryclass Arch MODULE_ TYPE libraryclass Arch S MODULE TYPE libraryclass Arch MODULE TYPE libraryclass common MODULE TYPE libraryclass Arch libraryclass common Or libraryclasses If the Library instance is specified in the context of the INF file see components section then that library instance will be used If only a library class is specified in the context of the INF file then the first matching the library class library instance Om bah May 2010 Version 1 22 DSC DSC Overview following the above precedence rules will be used If no instance is found for the library class the build tools should fail with an error similar to the following ERROR Library Class LibClassName specified by the Module InfFileName does not have a Library Class Instance Defined Build tools should propose at least two fixes e Check for spelling of the Library Class Name for the module in the components section or e Check the WORKSPACE for a library instance that satisfies the Library Class then add that instance to the DSC file in the correct Library Class section The selected library instance is added to the LIBS definition in the output makefile LIBS LIBS LIB DIR S LibInstanceName PCDs that are used b
108. t Path gt lt PcdEntry gt lt minEntryl gt lt PcdName gt lt PcdCName gt lt TokenSpaceGuidCName gt lt Value gt DSC lt PcdTypes gt lt Args gt lt EOL gt lt DefineStatements gt lt IncludeStatement gt lt PcdEntry gt PcdsDynamicEx PcdsDynamicExDefault PcdsDynamicExHii PcdsDynamicExVpd lt Primative gt lt PcdTypes gt lt Primative gt lt Arch gt lt Skuld gt IA32 X64 IPF EBC common lt OA gt A Z 20 9 lt default gt lt hii gt lt vpd gt gt lt Skuldentifier gt Default Hii vpd lt Keyword gt lt Keyword gt DEFINE lt MACRO gt lt Value gt lt EOL gt tinclude lt Filename gt lt EOL gt lt PATH gt lt Word gt txt WORKSPACE lt Path gt lt Word gt IF lt DataStore gt lt hii gt lt hiiEntry gt IF lt DataStore gt lt vpd gt lt vpdEntry gt ELSE lt minEntry1 gt lt PcdName gt lt Value gt lt EOL gt lt TokenSpaceGuidCName gt lt PcdCName gt lt CName gt lt CName gt lt Boolean gt lt Number gt lt String gt lt DataArray gt May 2010 Version 1 22 DSC lt MACRO gt lt Boolean gt lt Number gt lt String gt lt StringType gt lt DatumTypeSize gt lt MaxDatumSize gt lt DataArray gt
109. t Processing The include statement may appear within any section of EDK II DSC file The included file content must match the content type of the current section definition Each section will state whether this statement is valid Using include statements is NOT recommended Rather than use the include statement platform integrators are encouraged to maintain common text files that they would normally include then use a text editor to cut and paste the content into the appropriate section of the DSC file This method ensures that a build can be repeatable and reproducible 2 2 6 Macro Statements The use of MACRO statements which assign a value to a variable are limited in EDK II DSC files to be valid for DSC and FDF files only The format and usage for the macro statements is DEFINE MACRO Path MACRO filename foo Any defined MACRO definitions will be expanded by tools when they encounter the entry in the section Three environment variables WORKSPACE EDK_SOURCE and EDK_TOOLS PATH are never expanded when data is emitted to Makefiles The macro statements are positional in that only statements following a macro definition are permitted a macro cannot be used before it has been defined Macros may be used in conditional statements located within the DSC file Conditional MACROs may be defined on a command line of a parsing tool A macro defined in this manner does not need to have a DEFINE statement to se
110. t a value In the reference build Nt32Pkg Nt32Pkg dsc macros set on a command line override any macro value defined in the DSC file MACROs may also be used as values in PCD statements See Section 3 9 for more information on PCD statements 2 2 7 Conditional Directive Statements lif Conditional directive statements are used by the build tools preprocessor function to include or exclude statements in the DSC file A limited number of statements are Version 1 22 May 2010 13 DSC Overview DSC supported and nesting of conditionals is also aupported Statements are prefixed by the exclamation character Conditional statements may appear anywhere within the DSC file Supported statements are ifdef ifndef if elseif else and endif The following is an example of conditionals lifdef FOO ifndef BAR FOO defined BAR not defined lelse FOO defined BAR is defined lendif lelseif BARFOO FOO is not defined BARFOO is defined as TRUE lelseif BARFOO FOOBAR FOO is not defined BARFOO is defined as FOOBAR lelse FOO is not defined while BARFOO is either NOT defined or does not equal FOOBAR lendif 2 2 8 Defines Section Processing The defines section of an EDK 11 DSC file is used to define variable assignments that can be used in later build steps Note Unlike EDK DSC parsing utilities later assignments of local symbols override previous assignments This section is re
111. t module may want to use the PCD as Patchable and a third module might use the PCD as DynamicEx Under normal circumstances only two of these might be used PcdsFixedAtBuild for modules with well known values for a PCD then either pcdsPatchableInModule Or PcdsDynamicEx the first being for testing a module the second giving the ability for doing individual driver performance tuning on the fly Tools must NOT assume that the first method found for a PCD in the PCDs sections will used for all instances of a PCD but must allow for different modules using a PCD differently using the lt Ped gt statements under the INF file definitions in the components section Precedence for PCDs is as follows e If a module entry in the components section does not specify a PCD value then the PCD entry is for each INF specified PCD CName will be obtained from the Pcd sections e If a module entry in the components section specifies a PCD value then that value is used Another situation that may result in different PCD types is for a PCD that is declared DYNAMIC in the DEC package definition A module developer may decide to code their module using on PcdsFixedAtBuild While a different developer may decide to code their module using the same PCD as PcdsPatchableInModule Library Instances that use PCDs that the module uses must use the same PCD setting as the module using the Library Instance So if a module uses a PCD as PcdsFixedAt
112. tBuild IA32 PcdDevicePathSupportDevicePathFromText FALSE PcdDevicePathSupportDevicePathToText FALSE PcdDxeIplSupportCustomDecompress TRUE PcdDxeIplBuildShareCodeHobs TRUE PcdDxeIplSupportEfiDecompress TRUE PcdDxeIplSupportTianoDecompress TRUE PcdDxeIplSupportCustomDecompress TRUE PcdUefiVariableDefaultLangDepricate FALSE gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdStatusCodeMemorySize l gEfiIntelFrameworkModulePkgTokenSpaceGuid PcdStatusCodeRuntimeMemorySize 8 GEfiNt32PkgTokenSpaceGuid PcdWinNtMemorySizeForSecMain L 64 64 VOID 12 gEfiNt32PkgTokenSpaceGuid PcdWinNtFirmwareVolume L Fv Fv Recovery 6 VOID 52 gEfiNt32PkgTokenSpaceGuid PcdWinNtBootMode 1 gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid gEfiMdePkgTokenSpaceGuid PcdMaximumUnicodeStringlength 1000000 PcdMaximumAsciiStringLength 0 PedMaximumLinkedListLength 0 PedSpinLockTimeout 0 PcdMaximumAsciiStringLength 1000000 PcdMaximumLinkedListLength 0 PcdSpinLockTimeout 0 PcdReportStatusCodePropertyMask 5 PcdDebugPropertyMask 5 PcdDebugClearMemoryValue 0xAF PcdDebugPrintErrorLevel 0 PedPerformanceLibraryPropertyMask 0 gEfiMdeModulePkgTokenSpaceGuid PcdMaxPeiPcdCallBackNumberPerPcd
113. ted below must match the datum type specified in the DEC file that declares this PCD Note that if a PCD s datum type is VOID the MaximumDatumSize field is required Note that specifying different lt DataStore gt values Default HII or VPD in one section header is not permitted It is permissible to specify different Architectures using an identical lt DataStore gt value The following line is permissible PedsDynamicEx X64 Default PcdsDynamicExDefault IPF Default The following line is incorrect and should cause a build break during parsing of the file May 2010 Version 1 22 DSC EDK II DSC Format Specification PcdsDynamicExDefault X64 DEFAULT PcdsDynamicExVpd IPF DEFAULT This is an optional section for EDK II DSC Files and not valid for EDK DSC files An entry must be on a single line Multiple entries on one line and entries spanning multiple lines are prohibited The include statement is permitted in PcdsDynamicEx sections although not recommended The PcdsDynamicEx entry is a formatted string with three to six fields separated by the pipe character Version 1 22 May 2010 63 EDK II DSC Format Specification 64 Prototype lt ped gt lt PcdTypes gt lt Args gt lt Primative gt lt Arch gt lt OA gt lt DataStore gt lt Skuld gt lt default gt lt hii gt lt vpd gt lt Skuldentifier gt lt DefineStatements gt lt IncludeStatement gt lt Filename gt lt PATH gt l
114. ther PCD names and or macro names 52 May 2010 Version 1 22 DSC EDK II DSC Format Specification 3 9 1 Pedestrianisms Section This is an optional section for EDK II DSC Files Summary Defines the PcdsFeatureFlag section tag that may be required for platform DSC files that will use EDK 11 module INF files Each entry must be on a single line The include statement is permitted in the PcdsFeatureFlag sections although not recommended The PcdsFeatureFlag entry is a formatted string with two fields separated by the pipe character Version 1 22 May 2010 53 EDK II DSC Format Specification Prototype lt PcdFeatureFlags gt lt Attrs gt lt ArchArg gt lt Arch gt lt OA gt lt IncludeStatement gt lt Filename gt lt PATH gt lt Path gt lt PcdEntry gt lt PcdName gt lt TokenCName gt lt TokenSpaceGuidCName gt lt PcdValue gt lt MACRO gt lt WORD gt lt BoolExpression gt Parameters BoolExpression DSC PcdsFeatureFlag lt Attrs gt lt EOL gt lt IncludeStatement gt lt PcdEntry gt lt ArchArg gt PcdsFeatureFlag lt ArchArg gt 5 lt Arch gt IA32 X64 IPF EBC common lt OA gt A Z A 20 9 tinclude lt Filename gt lt EOL gt lt PATH gt lt Word gt txt WORKSPACE lt Path gt lt Word gt lt PcdName gt lt PcdV
115. trate the Extended Backus Naur Form item Square brackets denote the enclosed item is optional item Curly braces denote a choice or selection item only one of which may occur on a given line lt item gt Angle brackets denote a name for an item range range Parenthesis with characters and dash characters denote ranges of values for example a zA Z0 9 indicates a single alphanumeric character while 0 9 indicates a single digit 6 May 2010 Version 1 22 DSC Introduction item Characters within quotation marks are the exact content of an item as they must appear in the output text file The question mark denotes zero or one occurrences of an item The star character denotes zero or more occurrences of an item The plus character denotes one or more occurrences of an item itemt A superscript number n is the number occurrences of the item that must be used Example 0 9 8 indicates that there must be exactly eight digits so 01234567 is valid while 1234567 is not valid A superscript number n within curly braces followed by a comma indicates the minimum number of occurrences of the item with no maximum number of occurrences item tn A superscript number n within curly brackets preceded by a comma nn indicates a maximum number of occurrences of the item item rm nn A super script number n followed by a
116. tring using the token name converted to unicode by the tools from the UCS2 file Either the RFC4646 or the ISO 639 2 language code must be provided If the code is not defined in the UCS2 file then the tools must provide a best match with a default of en if no best match is found Examples PedsDynamicExDefault IA32 Default GEfiEdkNt32PkgTokenSpaceGuid PcdWinNtMemorySizeForSecMain L64 64 10 gEfiCpuTokenSpaceGuid PcdCpuProcessorFeatureUserConfiguration Oxffffffff gEfiCpuTokenSpaceGuid PcdCpuProcessorFeatureCapability 0 pcdsDynamicExVpd common Sku_Two SkuSeven gEfiCpuTokenSpaceGuid PcdProcessorFeatureUserConfiguration Ox0001ffff 32 pcdsDynamicExHii IA32 pcdsDynamicExHii X64 Skul gEfiMyModulePkgTokenSpaceGuid PcdChassisIntrution 0x0053 0x0065 0x0074 0x0075 0x0070 gSysConfigGuid 0x83 0x0 3 10 Components Section 66 Summary Defines the Components section tag that is required for platform DSC files This section defines the modules and components that will be processed by compilation tools and the EDK II tools used to generate PE32 PE32 Coff image files This is a required section for EDK II DSC files The include statement is permitted in components sections however this method is NOT recommended All paths must be specified directly or indirectly relative to the global environment May 2010 Version 1 22 DSC EDK II DSC Format Specification variables EDK_SOURCE for EDK components and
117. ust the string Version 1 22 May 2010 45 EDK II DSC Format Specification Prototype lt BuildOptions gt lt Arch gt lt OA gt lt EdkType gt lt IncludeStatement gt lt DefineStatements gt lt Filename gt lt PATH gt lt Path gt lt Statement gt lt ToolFlag gt lt ToolPath gt lt ToolCmd gt lt Other gt lt Equal gt lt Family gt lt UserDef gt lt ToolSpec gt lt FlagSpec gt lt PathSpec gt lt CmdSpec gt lt OtherSpec gt lt TargetArch gt DSC BuildOptions lt Arch gt lt EdkType gt lt EOL gt lt DefineStatements gt lt IncludeStatements lt Statement gt Common IA32 IPF X64 EBC lt OA gt A Z A Z0 9 M a m Common EDK EDKII m include lt Filename gt lt EOL gt DEFINE lt MACRO gt lt Value gt lt EOL gt lt PATH gt lt Word gt lt Extension gt WORKSPACE lt Path gt lt Word gt lt ToolFlag gt lt ToolPath gt lt ToolCmd gt lt Other gt lt Family gt lt FlagSpec gt lt Equal gt lt Flags gt lt EOL gt lt Family gt lt PathSpec gt lt Equal gt lt PATH gt lt EOL gt lt Family gt lt CmdSpec gt lt PATH gt lt ExecCmd gt lt EOL gt lt Family gt lt OtherSpec gt lt Equal gt lt String gt lt EOL gt cH Jet MS
118. ving a higher precedence than a section which uses common or no architecture extension as the architecture Note Content within a section IS case sensitive IA32 la32 and ia32 within a section are processed as separate items Refer to Naming Conventions below for more information on directory and or file naming 2 2 2 Comments The hash character indicates comments in the Platform Description DSC file In line comments terminate the processing of a line In line comments must be placed at the end of the line and may not be placed within the section tags Only FIx_ LOAD TOP MEMORY ADDRESS 0xF0000000 in the following example is processed by tools the remainder of the line is ignored FIX LOAD TOP MEMORY ADDRESS 0xF0000000 set top memory address Note Blank lines and lines that start with the hash character must be ignored by tools Hash characters appearing within a quoted string are permitted with the string being processed as a single entity The following example must handle the quoted string as single element by tools UI Copyright 2007 foobar ltd All rights reserved 2 2 3 Valid Entries All entries must appear on a single line with entries terminated by either a new line or a comment Comments must be scripting style using the hash character See Section 2 2 2 2 2 4 Naming Conventions The EDK II build infrastructure is supported under Microsoft Windows Linux and MAC OS X operat
119. within the libraries section The file specified after the tinclude statement can only contain a list of EDK Library INF files with the path to the file If the line starts with a word rather than a variable like EDK_SOURCE the path is assumed to be relative to EDkK_sourcE Again only EDK Library INF files are permitted in the file specified in the include statement This section will typically use one of the following section definitions libraries common libraries IA32 libraries X64 libraries IPF libraries EBC The formats for entries in this section is Version 1 22 May 2010 19 DSC Overview DSC 2 2 EDK SOURCE Path to LibraryName inf CUSTOM DECOMPRESS_LIB_ INF 12 LibraryClasses Section Processing The LibraryClasses section is used to provide a mapping between the library class names used by an EDK II module and the Library Instances that are selected by the platform integrator Library Classes allow modules to be coded for a library class and then allow platform integrator then chooses a Library Instance based on a priori knowledge of the instances Library Instances are classified using the architecture types they have been coded for as well as the supported EDK 11 module types As an example within EDK II the library class DebugLib has seven potential instances only one of which may be linked to a single component To support a given module type selection the LibraryClasses section he
120. y a library instance are resolved using the PCD settings of the driver linking the library instance Note that if a module s PCD section is used and multiple modules specify different values for the same PCD setting there may be multiple instances of the library instance that will be compiled matching the PCD settings for each module 2 2 13 PCD Sections Processing This section is for specifying global or default PCD values The content here is used for generating the AutoGen c and AutoGen h files for each of the EDK II modules that are coded for the PcdTokenName if an individual component requires a PCD but does not specify the value Pcds PcdType Pcds PcdType IA32 Pcds PcdType X64 Pcds PcdType IPF Peds PcdType EBC Of the five types of PCDs that have been defined they fall into one of three categories e FeatureFlag which always has a Boolean value e FixedAtBuild and PatchableInModule which may have a value of one of three data types Boolean numeric or pointer e Dynamic and DynamicEx which may have a value of any one of the three data types Note that for the dynamic types of PCDs using an Arch extension other than common in the section header is not valid Data Types for PCD values are either Boolean numeric org 1 byte UINT16 2 bytes UINT32 4 bytes or UINT64 8 bytes or variable length vo p which indicates that the value is usually accessed via a pointer To put a limit on
121. yClass gt 68 DSC Components lt Args gt lt EOL gt lt DefineStatements gt lt IncludeStatement gt lt SetStatements gt lt InfFiles gt N lt arch gt components lt arch gt IA32 X64 IPF EBC Common lt OA gt A Z 20 9 DEFINE lt MACRO gt lt PATH gt lt Value gt lt EOL gt lt Word gt Set lt PcdName gt lt Value gt lt EOL gt WORKSPACE lt MACRO gt lt Path gt lt Word gt tinclude lt Filename gt lt EOL gt lt PATH gt lt Word gt lt Extension gt Y lt String gt lt InfFilename gt lt Options gt lt EOL gt lt Exec gt lt Edk2Struct gt lt PATH gt lt Word gt inf EXEC lt ExecFilename gt lt PATH gt lt Word gt lt ExecExtension gt lt Word gt An OS recognisable extension that will automatically be run lt EOL gt lt LibraryClass gt lt PcdsFeatureFlag gt lt PcdsFixedAtBuild gt lt PcdsPatchableInModule gt lt PcdsDynamic gt lt PcdsDynamicEx gt lt BuildOptions gt lt EOL gt lt LibraryClasses gt lt EOL gt lt DefineStatements gt lt LibraryInstances gt May 2010 Version 1 22 DSC lt LibraryInstances gt lt LibInstanceMap gt lt ClassName gt lt NullLibraryI
Download Pdf Manuals
Related Search
Related Contents
Kenmore 790.7943 Range User Manual Scarica l`allegato In order to avoid potential damage to the spa surface, do Large Chick Trailer Background Unitrans Freight and Couches, pipi au lit, énurésie... L`apprentissage de Télécharger le PDF Manual TC-1810 SPANISH Télécharger le manuel Copyright © All rights reserved.
Failed to retrieve file