8.6 Dependency Expressions
A dependency expression specifies the protocols that the DXE driver requires to execute. In EDK II, it is specified in the [Depex] section of INF file.
Note: The PI Specification also defines an a priori file as an arbitrary way for a firmware volume to specify driver execution order. Dependency expressions for drivers covered by the apriori file are ignored.
Following is an example of a [Depex] section:
gEfiSimpleTextOutProtocolGuid AND gEfiHiiDatabaseProtocolGuid AND gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid
The example specifies that this driver can be executed only after all the four protocols listed have been installed.
Note: The four protocols in this example are necessary conditions, not sufficient conditions. More dependency requirement smay be inherited. Details follows.
Module writers must pay special attention to two points on dependency expressions.
  • A DXE driver inherits dependency expressions from all library instances it
    links with. The dependency expression listed in the module INF is a subset of
    the dependency section in the PE32+ image built from this module. Linked
    library instances are specified in DSC file.
  • A "non-UEFI driver model" driver's INF must have a dependency section. If
    TRUE is in INF's dependency section, because of inheritance, the generated
    dependency expression maybe not the TRUE.
The EDK II build tool would wipe out the dependency section in PE32+ image when it has exactly all architectural protocols.
Copy link