2.4 [Defines] Section

This is a required section.

The [Defines] section of EDK II INF files is used to define variable assignments that can be used in later build steps. The INF_VERSION of existing INF files does not need to be updated unless content in the file has been updated to match new content specified by this revision of the specification.

Architectural modifiers are not permitted in the [Defines] section.

The parsing utilities process any local symbol assignments defined in this section. The

EDK II parsing utilities will use some of this section's information for generating AutoGen.c and AutoGen.h files. Note that the sections are processed in the order listed in the INF file, and later assignments of these local symbols override previous assignments.

[Defines]

The format for entries in this section is:

Name = Value

The following is an example of a driver's [Defines] section.

[Defines]
  INF_VERSION     = 0x0001001B
  BASE_NAME       = DxeIpl
  FILE_GUID       = 86D70125-BAA3-4296-A62F-602BEBBB9081
  VERSION_STRING  = 1.0
  MODULE_TYPE     = PEIM
  ENTRY_POINT     = PeimInitializeDxeIpl
  MODULE_UNI_FILE = DxeIpl.uni

The following is an example of a library's [Defines] section.

[Defines]
  INF_VERSION    = 1.27
  BASE_NAME      = BaseMemoryLib
  FILE_GUID      = fd44e603-002a-4b29-9f5f-529e815b6165
  MODULE_TYPE    = BASE
  VERSION_STRING = 1.0
  LIBRARY_CLASS  = BaseMemoryLib

Drivers may expose library functionality, such as a DXE_CORE module that may implement functions that satisfy the BaseMemoryAllocation library class. In this instance, the driver module would also specify the LIBRARY_CLASS in the [Defines] section. Other DXE drivers that would require a library instance for the BaseMemoryAllocation class could specify the DXE_CORE INF file as the recommended instance for satisfying the required library class instance.

Appendix F lists the available MODULE_TYPE values supported by EDK II INF files.

The EDK II [Defines] section is common to all architectures and does not permit using architectural modifiers in the section tag name.

The following table shows EDK II unique elements of a defines section that may be required for generating the AutoGen.c and AutoGen.h files. Library modules must never specify driver elements.

Note: Any lines not starting with one of the tag names defined in the table below are added to the top of the INF's generated makefile exactly as typed on the line in the INF file.

Note: COMBINED_PEIM_DRIVER is a driver that may be dispatched by either the PEI Core or the Dxe Core. EDK II only references the first possible dispatch instance.

Table 1 EDK II [Defines] Section Elements

Last updated