12.07.2015 Views

EDK II Module Writer's Guide - Intel

EDK II Module Writer's Guide - Intel

EDK II Module Writer's Guide - Intel

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DSC, the PCD type will be same as its declaration PCD type in the package DEC file. Ifa PCD is declared to support multiple PCD types, the default PCD type is a fixed PCD.The PCD value may set the different values for the different drivers. If its value is notspecified, the value will be from its declaration default value to the chosen PCD type inthe package DEC file.Remember that the PCD has four types:• PcdsFeatureFlag,• PcdsFixedAtBuild,• PcdsPatchableIn<strong>Module</strong>,• PcdsDynamic.3.7.3.1 Feature Flag PCD3.7.3.2 Fixed PCDIf a PCD is declared as PcdsFeatureFlag, it must be of the FeatureFlag PCD type andBOOLEAN data type. When this type of PCD is used in a module, it must be specifiedin the [FeaturePcd] section of the module INF.Note: Only FeaturePcdGet API can access this PCD type.If a PCD value is decided during the build time, its type can be set toPcdsFixedAtBuild. When this PCD type is used in module, it can be specified in the[FixedPcd] or [PCD] section of the module INF. Also, FixedPcdGet and PcdGet API canbe used to access this type PCD in the module source code.When FixedPcdGet API is used, this type PCD can be used as the array index in adriver.Note: For a library no such usage is supported.3.7.3.3 Patchable PCDIf the PCD value needs to be modified in the binary image, its type will bePcdsPatchableIn<strong>Module</strong>. When this type PCD is used in module, it can be specified inthe [FatchPcd] or [PCD] section of the module INF. Also, PatchPcdGet/PatchPcdSetand PcdGet/PcdSet API can be used to access this type PCD in the module sourcecode.3.7.3.4 Dynamic PCDIf PCD value is obtained from the runtime environment, its type must be Dynamic. Ifa dynamic PCD is from PCD data base that shares data between drives, its type will bePcdsDynamicDefault. If a dynamic PCD is related to a UEFI variable, its type will bePcdsDynamicH<strong>II</strong>.37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!