coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <acpi/acpigen.h>
#include <arch/cpu.h>
#include <bootstate.h>
#include <cbmem.h>
#include <console/console.h>
#include <crc_byte.h>
#include <device/device.h>
#include <device/dram/spd.h>
#include <drivers/intel/gma/opregion.h>
#include <gpio.h>
#include <intelblocks/gpio.h>
#include <intelblocks/pmclib.h>
#include <smbios.h>
#include <soc/gpio.h>
#include <types.h>
#include "eeprom.h"
Include dependency graph for mainboard.c:

Go to the source code of this file.

Functions

const char * mainboard_vbt_filename (void)
 
static void mb_configure_dp1_pwr (bool enable)
 
static void mb_configure_dp2_pwr (bool enable)
 
static void mb_configure_dp3_pwr (bool enable)
 
static void mb_hda_amp_enable (bool enable)
 
static void mb_usb31_rp1_pwr_enable (bool enable)
 
static void mb_usb31_rp2_pwr_enable (bool enable)
 
static void mb_usb31_fp_pwr_enable (bool enable)
 
static void mb_usb2_fp1_pwr_enable (bool enable)
 
static void mb_usb2_fp2_pwr_enable (bool enable)
 
static void copy_meminfo (const struct dimm_info *dimm, union eeprom_dimm_layout *l)
 
static void update_board_layout (void)
 
static void mainboard_init (void *chip_info)
 
static void mainboard_final (struct device *dev)
 
static void mainboard_enable (struct device *dev)
 
static void mainboard_early (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_PRE_DEVICE, BS_ON_EXIT, mainboard_early, NULL)
 

Variables

struct chip_operations mainboard_ops
 

Function Documentation

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_PRE_DEVICE  ,
BS_ON_EXIT  ,
mainboard_early  ,
NULL   
)

◆ copy_meminfo()

static void copy_meminfo ( const struct dimm_info dimm,
union eeprom_dimm_layout l 
)
static

Definition at line 79 of file mainboard.c.

References dimm_info::bus_width, dimm_info::dimm_size, memset(), dimm_info::mod_id, dimm_info::module_part_number, dimm_info::rank_per_dimm, spd_manufacturer_name(), and strncpy().

Referenced by update_board_layout().

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

◆ mainboard_early()

static void mainboard_early ( void unused)
static

Definition at line 234 of file mainboard.c.

References board_cfg, check_signature(), config, config_of_soc, get_board_settings(), offsetof, and READ_EEPROM_FSP_S.

Here is the call graph for this function:

◆ mainboard_enable()

◆ mainboard_final()

static void mainboard_final ( struct device dev)
static

Definition at line 162 of file mainboard.c.

References board_cfg, get_board_settings(), pmc_soc_set_afterg3_en(), and update_board_layout().

Referenced by mainboard_enable().

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

◆ mainboard_init()

static void mainboard_init ( void chip_info)
static

Definition at line 148 of file mainboard.c.

References board_cfg, get_board_settings(), and mb_hda_amp_enable().

Here is the call graph for this function:

◆ mainboard_vbt_filename()

const char* mainboard_vbt_filename ( void  )

Definition at line 22 of file mainboard.c.

References eeprom_bmc_settings::efp3_displayport, and get_bmc_settings().

Here is the call graph for this function:

◆ mb_configure_dp1_pwr()

static void mb_configure_dp1_pwr ( bool  enable)
static

Definition at line 34 of file mainboard.c.

References gpio_output(), and GPP_K3.

Referenced by mainboard_enable().

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

◆ mb_configure_dp2_pwr()

static void mb_configure_dp2_pwr ( bool  enable)
static

Definition at line 39 of file mainboard.c.

References gpio_output(), and GPP_K4.

Referenced by mainboard_enable().

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

◆ mb_configure_dp3_pwr()

static void mb_configure_dp3_pwr ( bool  enable)
static

Definition at line 44 of file mainboard.c.

References gpio_output(), and GPP_K5.

Referenced by mainboard_enable().

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

◆ mb_hda_amp_enable()

static void mb_hda_amp_enable ( bool  enable)
static

Definition at line 49 of file mainboard.c.

References gpio_output(), and GPP_C19.

Referenced by mainboard_init().

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

◆ mb_usb2_fp1_pwr_enable()

static void mb_usb2_fp1_pwr_enable ( bool  enable)
static

Definition at line 69 of file mainboard.c.

References gpio_output(), and GPP_G3.

Referenced by mainboard_enable().

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

◆ mb_usb2_fp2_pwr_enable()

static void mb_usb2_fp2_pwr_enable ( bool  enable)
static

Definition at line 74 of file mainboard.c.

References gpio_output(), and GPP_G4.

Referenced by mainboard_enable().

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

◆ mb_usb31_fp_pwr_enable()

static void mb_usb31_fp_pwr_enable ( bool  enable)
static

Definition at line 64 of file mainboard.c.

References gpio_output(), and GPP_G2.

Referenced by mainboard_enable().

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

◆ mb_usb31_rp1_pwr_enable()

static void mb_usb31_rp1_pwr_enable ( bool  enable)
static

Definition at line 54 of file mainboard.c.

References gpio_output(), and GPP_G0.

Referenced by mainboard_enable().

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

◆ mb_usb31_rp2_pwr_enable()

static void mb_usb31_rp2_pwr_enable ( bool  enable)
static

Definition at line 59 of file mainboard.c.

References gpio_output(), and GPP_G1.

Referenced by mainboard_enable().

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

◆ update_board_layout()

Variable Documentation

◆ mainboard_ops

struct chip_operations mainboard_ops
Initial value:
= {
.init = mainboard_init,
.enable_dev = mainboard_enable,
}
static void mainboard_init(void *chip_info)
Definition: mainboard.c:148
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:208

Definition at line 208 of file mainboard.c.