3.11 PCI OptionRom Section
This is an optional section.
Summary
This section is used to specify the content of a PCI Option ROM container. A PCI Option ROM image may contain zero or more PCI ROM image files - binary only, and zero or more UEFI driver images, specified by either binary or INF files, that are to be packaged into a single Option ROM image. Additionally, support for a single EFI driver with both native (IA32, X64, IPF, etc). and EBC images in the same PCI Option ROM container is provided.
Conditional statements may be used anywhere within this section.
Prototype
<OptionRom> ::= "[OptionRom" "." <DriverName> "]" <EOL> <Components>*
<DriverName> ::= (a-zA-Z)(a-zA-Z0-9)*
<Components> ::= {<InfComponent>} {<Binary>}
<InfComponent> ::= <TS> "INF" <MTS> <UseArch> <InfFile>
[<Overrides>] <EOL>
<UseArch> ::= "USE" <Eq> <TargetArch> <MTS>
<TargetArch> ::= <arch>
<InfFile> ::= [<PATH>] <Word> ".inf"
<Overrides> ::= <MTS> "{" <EOL>
[<TS> "PCI_VENDOR_ID" <Eq> <UINT16> <EOL>]
[<TS> "PCI_CLASS_CODE" <Eq> <UINT8> <EOL>]
[<TS> "PCI_DEVICE_ID" <Eq> <UINT16> <EOL>]
[<TS> "PCI_REVISION" <Eq> <UINT8> <EOL>]
[<TS> "PCI_COMPRESS" <Eq> <TrueFalse> <EOL>]
<TS> "}" <EOL>
<Binary> ::= {<EfiBinary>} {<OtherBinary>}
<EfiBinary> ::= <TS> "FILE" <MTS> "EFI" <EfiFileName>
[<Overrides>] <EOL>
<EfiFileName> ::= <MTS> [<PATH>] <Word> {".efi"} {".EFI"} {".Efi"}
<OtherBinary> ::= <TS> "FILE" <MTS> "BIN" <Filename> <EOL>
Restrictions
TargetArch
Only specific architectures are permitted - use of "common" or the wildcard character is prohibited.
Paths
For BINARY ONLY content (UEFI_DRIVER
and UEFI_APPLICATION
.efi files) the
file names specified in <EfiFileName>
of this section must be relative to the
directory identified by the WORKSPACE
system environment variable (or
relative to a directory listed in the PACKAGESPATH system environment
variable). In some cases, the tools will search well known paths for some
files, for example, for FD filenames, the output will typically be located in
the `$(OUTPUT_DIRECTORY)/ $(TARGET)$(TAGNAME)/FV` directory.
Related Definitions
DriverName
Specifies the name of the created PCI Option ROM image that will be placed in the build's FV directory.
USE
Specifies the architecture to use to create a PCI Option ROM.
Filename
Filenames must match the actual case of the file; three variations are shown for the .efi extension in the ENBF above.
Example
[OptionRom.AtapiPassThru]
INF USE = IA32 OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf {
PCI_REVISION = 0x0020
}
INF USE = EBC OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf