2.10 PCD Database
Dynamic and DynamicEx PCDs can be modified during the boot/setup stages. In order to support modifications, a PEIM and a DXE driver use databases of these PCDs so that changes can persist across reboots. These databases are generated prior to the final image assembly. The following rules determine when the build system will add the PCDs into these databases.
If a PCD is listed in a
PcdsDynamicVpd
orPcdsDynamicExVpd
section, and the PCD is not used by any module that is listed in the DSC file, the build MUST ADD the entry in the Platform's PCD Database, and the parser must not throw an error or warning message.If PCD is listed in a
PcdsDynamicDefault
orPcdsDynamicExDefault
section, and the PCD is not used by any module that is listed in the DSC and FDF file, the build must NOT add the entry in the Platform's PCD Database; the build may provide a warning message.If PCD is listed in a
PcdsDynamicHii
orPcdsDynamicExHii
section, and the PCD is not used by any module that is listed in the DSC and FDF file, the build must NOT add the entry in the Platform's PCD Database; the build may provide a warning message.If a PCD is not listed in the DSC file but is listed under a
[PcdEx]
section in a Binary INF file listed in the FDF file, then the build must add the entry to the Platform's PCD Database asPcdsDynamicExDefault
.If a PCD is not listed in the DSC file, but binary INF files used by this platform all (that use this PCD) list the PCD in a
[PcdEx]
section, AND all source INF files used by this platform the build that use the PCD list the PCD in either a[Pcd]
or[PcdEx]
section, then the tools MUST ADD the PCD to the Platform's PCD Database; the build must assign the access method for this PCD asPcdsDynamicExDefault
.If a PCD is not listed in the DSC file, but binary INF files used by this platform all (that use this PCD) list the PCD in a
[PatchPcd]
section, AND all source INF files used by this platform the build that use the PCD list the PCD in either a[Pcd]
or[PatchPcd]
section, then the tools must NOT add the PCD to the Platform's PCD Database; the build must assign the access method for this PCD asPcdsPatchableInModule
If one of the Source built modules listed in the DSC is not listed in FDF modules, and the INF lists a PCD can only use the
PcdsDynamic
access method (it is only listed in the DEC file that declares the PCD asPcdsDynamic
), then build tool will report warning message- notify the PI that they are attempting to build a module that must be included in a flash image in order to be functional. These Dynamic PCD will not be added into the Database unless it is used by other modules that are included in the FDF file.If one of the Source built modules listed in the DSC is not listed in FDF modules, and the INF lists a PCD can only use the
PcdsDynamicEx
access method (it is only listed in the DEC file that declares the PCD asPcdsDynamicEx
), then DO NOT break the build; DO NOT add the PCD to the Platform's PCD Database.If a module is listed in FDF file and use a Dynamic or DynamicEx PCD, the PCD MUST be added into the PCD Database.