7.9 Dependency for PEIMs

A PEIM must have a dependency section. The PEIM is dispatched after all conditions in the dependency section are met.

If a PEIM has a dependency section TRUE, it can be dispatched immediately. In an extended INF file, a dependency section is contained in the [Depex] section. PPI dependency is defined by the GUID of the PPI.

For example:


gEfiPeiReadOnlyVariable2PpiGuid AND gEfiPeiCachePpiGuid AND
gPeiCapsulePpiGuid

This module may be dispatched only after Read Only Variable2 Ppi, CachePpi and CapsultPpi are all installed successfully.

In the preceding example, the expression opcode AND is used to show the logical relationship between GUIDs. See the EDK II Extended INF Specification for complete details.


Note: A PEIM inherits dependency expressions from all library instances it links with. The dependency expression listed in module INF is a subset of the dependency section in the PE32+ image built from this module.


The PI specification also defines a generic rule to decide the dispatch order for PEIMs: the apriori file. It complements the dependency expression mechanism of the PEI Phase by stipulating a series of modules that must be dispatched in a prescribed order. The [depex] sections for these modules are ignored.

results matching ""

    No results matching ""