PCI Expasion ROM(Option ROM)  

PCI Expasion ROM(Option ROM)

PCI/PCI ExpressデバイスはPCI Expasion ROM(Option ROM)をもつことができる。


PCI Local Bus Specification 2.2 1998 (For Legacy BIOS)
6.3. PCI Expansion ROMs
6.3.3. PC-compatible Expansion ROMs

entry point INIT function POST Code Extensions


VGA device C0000h INIT Function Extensions

PCI Firmware Specification 3.0(For Legacy BIOS & EFI)
3.2. PCI-X Mode 2 and PCI Express

The PCI-X Mode 2 and PCI Express provide a software programming model that is software compatible with the Conventional PCI.
EFI PCI I/O Protocol supports up to 4 GB of configuration space; therefore, it covers the PCI-X Mode 2 and PCI Express Extended Configuration space of 4 KB in size.
EFI uses a single timer interrupt in pre-boot, EFI device drivers are polled so INTx, MSI, or MSI-X is not used by EFI.
To identify a function (e.g., Conventional PCI, PCI-X vs. PCI Express), the EFI driver uses Device ID, Vendor ID, and Capability Pointer in the compatibility configuration space.

5. PCI Expation ROMs

PCI Expansion ROM Header Format
Offset Length Description
0x00 1 0x55 ROM Signature, byte 1
0x01 1 0xAA ROM Signature, byte 2
0x02 16h XX Reserved (Processor architecture unique data)
0x18 2 XX Pointer to PCI Data Structure

PCI Data Structure Format
Offset Length Description
0x00 4 "PCIR"
0x04 2 Vender ID
0x06 2 Device ID
0x08 2 Device List Pointer
0x0A 2 PCI Data Structure Length
0x0C 1 PCI Data Structure Revision
0x0D 3 Class Code
0x10 2 Image Length
0x12 2 Revision Level of the Vender's ROM
0x14 1 Code Type
0x15 1 Last Image Indicator
0x16 2 Maximum Run-time Image Length
0x18 2 Pointer to Configuration Utility Code Header
0x1A 2 Pointer to DMTF CLP Entry Point

PCI Data Structure Revision
0x03 PCI Firmware Specification 3.0

Code Type Description
0x00 IA-32, PC-AT compatible
0x01 Open Firmware standard for PCI
0x02 Hewlett-Packard PA RISC
0x03 EFI Image
0x04-0xFF Reserved

UEFI Platform Initialization Specification Version 1.4 VOLUME 5   Standards
11 PCI Platform
11.6.1 PCI Platform Protocol

The GetPciRom() function gets the PCI device's option ROM from a platform-specific location.The option ROM will be loaded into memory. This member function is used to return an image that is packaged as a PCI 2.2 option ROM. The image may contain both legacy and UEFI option ROMs. See the UEFI 2.1 Specification for details. 

UEFI Specification 2.4 13 Protocols - PCI Bus Support
13.4 EFI PCI I/O Protocol
13.4.2 PCI Option ROMs

EFI takes advantage of both the PCI Firmware Specification and the PE/COFF Specification 
to store EFI images in a PCI Option ROM. 

• A PCI Option ROM may contain one or more images.
• Each image must being on a 512-byte boundary.
• Legacy Option ROM images begin with a Standard PCI Expansion ROM Header (Table 114).
• EFI Option ROM images begin with an EFI PCI Expansion ROM Header (Table 118).
• Each image must contain a PCIR data structure in the first 64 KiB of the image.
• The image data for an EFI Option ROM image must be a PE/COFF image or a compressed PE/COFF image following the UEFI Compression Algorithm.
• The PCIR data structure must begin on a 4-byte boundary.
• If the PCI Option ROM contains a Legacy Option ROM image, it must be the first image.
• The images are placed in the PCI Option ROM in order from highest to lowest priority. This priority is used to build the ordered list of Driver Image Handles that are produced by the Bus Specific Driver Override Protocol for a PCI Controller.

Table 116. EFI PCI Expansion ROM Header
Offset Byte Length Value Description
0x00 1 0x55 ROM Signature, byte 1
0x01 1 0xAA ROM Signature, byte 2
0x02 2 XXXX Initialization Size – size of this image in units of 512 bytes. 
0x04 4 0x0EF1 Signature from EFI image header
0x08 2 XX Subsystem value for EFI image header
0x0a 2 XX Machine type from EFI image header
0x0c 2 XX Compression type 0x0001 - The image is compressed.
0x0e 8 0x00 Reserved
0x16 2 XX Offset to EFI Image
0x18 2 XX Offset to PCIR Data Structure



category: PC-HW

tb: 0   cm: 0