coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pci_rom.c File Reference
#include <console/console.h>
#include <commonlib/endian.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <stdio.h>
#include <string.h>
#include <cbfs.h>
#include <cbmem.h>
#include <acpi/acpigen.h>
Include dependency graph for pci_rom.c:

Go to the source code of this file.

Functions

void __weak map_oprom_vendev_rev (u32 *vendev, u8 *rev)
 
u32 __weak map_oprom_vendev (u32 vendev)
 
void vga_oprom_preload (void)
 
static voidcbfs_boot_map_optionrom (uint16_t vendor, uint16_t device)
 
static voidcbfs_boot_map_optionrom_revision (uint16_t vendor, uint16_t device, uint8_t rev)
 
struct rom_headerpci_rom_probe (const struct device *dev)
 
struct rom_headerpci_rom_load (struct device *dev, struct rom_header *rom_header)
 

Variables

static voidpci_ram_image_start = (void *)PCI_RAM_IMAGE_START
 

Function Documentation

◆ cbfs_boot_map_optionrom()

static void* cbfs_boot_map_optionrom ( uint16_t  vendor,
uint16_t  device 
)
static

Definition at line 34 of file pci_rom.c.

References cbfs_map(), name, NULL, snprintf(), and vendor.

Referenced by pci_rom_probe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbfs_boot_map_optionrom_revision()

static void* cbfs_boot_map_optionrom_revision ( uint16_t  vendor,
uint16_t  device,
uint8_t  rev 
)
static

Definition at line 43 of file pci_rom.c.

References cbfs_map(), name, NULL, snprintf(), and vendor.

Referenced by pci_rom_probe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_oprom_vendev()

u32 __weak map_oprom_vendev ( u32  vendev)

Definition at line 17 of file pci_rom.c.

Referenced by pci_rom_probe().

Here is the caller graph for this function:

◆ map_oprom_vendev_rev()

void __weak map_oprom_vendev_rev ( u32 vendev,
u8 rev 
)

Definition at line 16 of file pci_rom.c.

Referenced by pci_rom_probe().

Here is the caller graph for this function:

◆ pci_rom_load()

struct rom_header* pci_rom_load ( struct device dev,
struct rom_header rom_header 
)

Definition at line 153 of file pci_rom.c.

References BIOS_DEBUG, device::class, rom_header::data, pci_data::ilen, pci_data::indicator, memcpy(), NULL, PCI_CLASS_DISPLAY_VGA, pci_ram_image_start, PCI_VGA_RAM_IMAGE_START, printk, rom_header::size, pci_data::type, and vga_pri.

Referenced by graphics_set_resources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pci_rom_probe()

◆ vga_oprom_preload()

void vga_oprom_preload ( void  )

Definition at line 19 of file pci_rom.c.

References BIOS_DEBUG, cbfs_preload(), CONFIG, name, and printk.

Here is the call graph for this function:

Variable Documentation

◆ pci_ram_image_start

void* pci_ram_image_start = (void *)PCI_RAM_IMAGE_START
static

Definition at line 151 of file pci_rom.c.

Referenced by pci_rom_load().