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

Go to the source code of this file.

Functions

__weak const char * mainboard_vbt_filename (void)
 
voidlocate_vbt (size_t *vbt_size)
 
static void intel_gma_opregion_register (uintptr_t opregion)
 
static enum cb_err intel_gma_restore_opregion (void)
 
static enum cb_err vbt_validate (struct region_device *rdev)
 
static enum cb_err locate_vbt_vbios (const u8 *vbios, struct region_device *rdev)
 
static enum cb_err locate_vbt_cbfs (struct region_device *rdev)
 
static enum cb_err locate_vbt_vbios_cbfs (struct region_device *rdev)
 
static enum cb_err find_vbt_location (struct region_device *rdev)
 
static struct opregion_version opregion_get_version (void)
 
static bool is_ext_vbt_required (igd_opregion_t *opregion, optionrom_vbt_t *vbt)
 
static bool uses_relative_vbt_addr (opregion_header_t *header)
 
static void opregion_add_ext_vbt (igd_opregion_t *opregion, uint8_t *ext_vbt, optionrom_vbt_t *vbt)
 
enum cb_err intel_gma_init_igd_opregion (void)
 

Variables

static char vbt_data [CONFIG_VBT_DATA_SIZE_KB *KiB]
 
static size_t vbt_data_sz
 

Function Documentation

◆ find_vbt_location()

static enum cb_err find_vbt_location ( struct region_device rdev)
static

Definition at line 59 of file opregion.c.

References ASLS, CONFIG, device::enabled, GSSCIE, pci_read_config16(), pci_write_config16(), pci_write_config32(), pcidev_on_root(), SMISCISEL, SWSCI, and SWSMISCI.

Here is the call graph for this function:

◆ intel_gma_init_igd_opregion()

enum cb_err intel_gma_init_igd_opregion ( void  )

Definition at line 290 of file opregion.c.

References header, memcpy(), and uses_relative_vbt_addr().

Referenced by gfx_init(), gma_func0_init(), gma_init(), and igd_init().

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

◆ intel_gma_opregion_register()

static void intel_gma_opregion_register ( uintptr_t  opregion)
static

Definition at line 59 of file opregion.c.

◆ intel_gma_restore_opregion()

static enum cb_err intel_gma_restore_opregion ( void  )
static

Definition at line 59 of file opregion.c.

◆ is_ext_vbt_required()

static bool is_ext_vbt_required ( igd_opregion_t *  opregion,
optionrom_vbt_t *  vbt 
)
inlinestatic

Definition at line 272 of file opregion.c.

◆ locate_vbt()

void* locate_vbt ( size_t vbt_size)

Definition at line 25 of file opregion.c.

References BIOS_ERR, BIOS_INFO, cbfs_load(), mainboard_vbt_filename(), memcpy(), NULL, printk, vbt_data, vbt_data_sz, and VBT_SIGNATURE.

Referenced by load_vbt(), and vbt_get().

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

◆ locate_vbt_cbfs()

static enum cb_err locate_vbt_cbfs ( struct region_device rdev)
static

Definition at line 59 of file opregion.c.

◆ locate_vbt_vbios()

static enum cb_err locate_vbt_vbios ( const u8 vbios,
struct region_device rdev 
)
static

Definition at line 59 of file opregion.c.

◆ locate_vbt_vbios_cbfs()

static enum cb_err locate_vbt_vbios_cbfs ( struct region_device rdev)
static

Definition at line 59 of file opregion.c.

◆ mainboard_vbt_filename()

__weak const char* mainboard_vbt_filename ( void  )

Definition at line 17 of file opregion.c.

Referenced by locate_vbt().

Here is the caller graph for this function:

◆ opregion_add_ext_vbt()

static void opregion_add_ext_vbt ( igd_opregion_t *  opregion,
uint8_t ext_vbt,
optionrom_vbt_t *  vbt 
)
static

Definition at line 290 of file opregion.c.

◆ opregion_get_version()

static struct opregion_version opregion_get_version ( void  )
static

Definition at line 59 of file opregion.c.

◆ uses_relative_vbt_addr()

static bool uses_relative_vbt_addr ( opregion_header_t *  header)
inlinestatic

Definition at line 278 of file opregion.c.

References header.

Referenced by intel_gma_init_igd_opregion().

Here is the caller graph for this function:

◆ vbt_validate()

static enum cb_err vbt_validate ( struct region_device rdev)
static

Definition at line 59 of file opregion.c.

Variable Documentation

◆ vbt_data

char vbt_data[CONFIG_VBT_DATA_SIZE_KB *KiB]
static

Definition at line 22 of file opregion.c.

Referenced by load_vbt(), locate_vbt(), and platform_fsp_silicon_init_params_cb().

◆ vbt_data_sz

size_t vbt_data_sz
static

Definition at line 23 of file opregion.c.

Referenced by locate_vbt().