Use the INF file to specify the information required to package a UEFI Driver into a PCI Option ROM image without having to manually run the
EfiRom utility. Chapter 7 covers Driver Entry Points and includes a number of example INF files. The following example shows an expanded version of the
AbcDriverMinimum from Chapter 7 and also shows how the PCI Option ROM related information can be specified. The only changes are the addition of the PCI statements in the [Defines] section. These PCI statements allow the Vendor ID, Device ID, Class Code, and Revision values to be specified and they are used to fill in the PCI Option ROM headers. The
PCI_COMPRESS statement specifies whether the UEFI Driver should be compressed using the UEFI compression algorithm or not. If a statement is not present, the value is assumed to be 0 If the PCI statements are present, and if the UEFI Driver is successfully built, the PCI Option ROM image is then automatically generated. The one limitation of this method is that the PCI Option ROMs are allowed to contain only a single UEFI Driver.
[Defines]INF_VERSION = 0x00010005BASE_NAME = AbcDriverPciOptionRomFILE_GUID = DA87D340-15C0-4824-9BF3-D52286674BEFMODULE_TYPE = CAE55A8A-4307-4ae1-824E-326EE24928D7VERSION_STRING = 1.0ENTRY_POINT = AbcDriverEntryPointPCI_VENDOR_ID = 0xABCDPCI_DEVICE_ID = 0x1234PCI_CLASS_CODE = 0x56789APCI_REVISION = 0x0003PCI_COMPRESS = TRUE[Sources]Abc.c[Packages]MdePkg/MdePkg.dec[LibraryClasses]UefiDriverEntryPoint