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 <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <device/device.h>
#include <drivers/tpm/cr50.h>
#include <drivers/wwan/fm/chip.h>
#include <ec/ec.h>
#include <fw_config.h>
#include <security/tpm/tss.h>
#include <soc/gpio.h>
#include <soc/ramstage.h>
#include <stdio.h>
Include dependency graph for mainboard.c:

Go to the source code of this file.

Functions

 WEAK_DEV_PTR (rp6_wwan)
 
static void add_fw_config_oem_string (const struct fw_config *config, void *arg)
 
static void mainboard_smbios_strings (struct device *dev, struct smbios_type11 *t)
 
void mainboard_update_soc_chip_config (struct soc_intel_alderlake_config *config)
 
__weak void variant_update_soc_chip_config (struct soc_intel_alderlake_config *config)
 
__weak void variant_init (void)
 
static void mainboard_init (void *chip_info)
 
void __weak variant_devtree_update (void)
 
static void mainboard_dev_init (struct device *dev)
 
static void mainboard_generate_shutdown (const struct device *dev)
 
static void mainboard_generate_s0ix_hook (void)
 
static void mainboard_fill_ssdt (const struct device *dev)
 
void __weak variant_fill_ssdt (const struct device *dev)
 
void __weak variant_generate_s0ix_hook (enum s0ix_entry entry)
 
static void mainboard_enable (struct device *dev)
 
void __weak variant_finalize (void)
 
static void mainboard_final (void *chip_info)
 

Variables

struct chip_operations mainboard_ops
 

Function Documentation

◆ add_fw_config_oem_string()

static void add_fw_config_oem_string ( const struct fw_config config,
void arg 
)
static

Definition at line 18 of file mainboard.c.

References arg, buffer, config, smbios_type11::count, smbios_type11::eos, smbios_add_string(), and snprintf().

Referenced by mainboard_smbios_strings().

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

◆ mainboard_dev_init()

static void mainboard_dev_init ( struct device dev)
static

Definition at line 91 of file mainboard.c.

References mainboard_ec_init().

Referenced by mainboard_enable().

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

◆ mainboard_enable()

static void mainboard_enable ( struct device dev)
static

Definition at line 176 of file mainboard.c.

References device_operations::init, mainboard_dev_init(), mainboard_fill_ssdt(), mainboard_smbios_strings(), and device::ops.

Here is the call graph for this function:

◆ mainboard_fill_ssdt()

static void mainboard_fill_ssdt ( const struct device dev)
static

Definition at line 136 of file mainboard.c.

References acpigen_write_method_end(), acpigen_write_method_serialized(), acpigen_write_scope(), acpigen_write_scope_end(), DEV_PTR, mainboard_generate_s0ix_hook(), mainboard_generate_shutdown(), and variant_fill_ssdt().

Referenced by mainboard_enable().

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

◆ mainboard_final()

static void mainboard_final ( void chip_info)
static

Definition at line 188 of file mainboard.c.

References variant_finalize().

Here is the call graph for this function:

◆ mainboard_generate_s0ix_hook()

static void mainboard_generate_s0ix_hook ( void  )
static

Definition at line 119 of file mainboard.c.

References acpigen_soc_clear_tx_gpio(), acpigen_soc_set_tx_gpio(), acpigen_write_else(), acpigen_write_if_end(), acpigen_write_if_lequal_op_int(), ARG0_OP, CONFIG, GPIO_SLP_S0_GATE, S0IX_ENTRY, S0IX_EXIT, and variant_generate_s0ix_hook().

Referenced by mainboard_fill_ssdt().

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

◆ mainboard_generate_shutdown()

static void mainboard_generate_shutdown ( const struct device dev)
static

Definition at line 96 of file mainboard.c.

References acpi_device_path_join(), acpigen_emit_byte(), acpigen_emit_namestring(), acpigen_write_if_end(), acpigen_write_if_lequal_op_int(), acpigen_write_store(), ARG0_OP, device::bus, config, config_of(), bus::dev, LOCAL0_OP, and ONE_OP.

Referenced by mainboard_fill_ssdt().

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 72 of file mainboard.c.

References gpio_configure_pads_with_override(), variant_devtree_update(), variant_gpio_override_table(), variant_gpio_table(), and variant_init().

Here is the call graph for this function:

◆ mainboard_smbios_strings()

static void mainboard_smbios_strings ( struct device dev,
struct smbios_type11 t 
)
static

Definition at line 29 of file mainboard.c.

References add_fw_config_oem_string().

Referenced by mainboard_enable().

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

◆ mainboard_update_soc_chip_config()

void mainboard_update_soc_chip_config ( struct soc_intel_alderlake_config config)

Definition at line 34 of file mainboard.c.

References BIOS_ERR, BIOS_INFO, COMM_0, COMM_1, COMM_2, COMM_3, COMM_4, COMM_5, config, cr50_is_long_interrupt_pulse_enabled(), printk, tlcl_lib_init(), and variant_update_soc_chip_config().

Referenced by mainboard_init().

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

◆ variant_devtree_update()

void __weak variant_devtree_update ( void  )

Definition at line 86 of file mainboard.c.

Referenced by mainboard_devtree_update(), and mainboard_init().

Here is the caller graph for this function:

◆ variant_fill_ssdt()

void __weak variant_fill_ssdt ( const struct device dev)

Definition at line 158 of file mainboard.c.

Referenced by mainboard_fill_ssdt().

Here is the caller graph for this function:

◆ variant_finalize()

void __weak variant_finalize ( void  )

Definition at line 184 of file mainboard.c.

Referenced by mainboard_final().

Here is the caller graph for this function:

◆ variant_generate_s0ix_hook()

void __weak variant_generate_s0ix_hook ( enum s0ix_entry  entry)

Definition at line 163 of file mainboard.c.

Referenced by mainboard_generate_s0ix_hook().

Here is the caller graph for this function:

◆ variant_init()

__weak void variant_init ( void  )

Definition at line 67 of file mainboard.c.

Referenced by mainboard_init().

Here is the caller graph for this function:

◆ variant_update_soc_chip_config()

__weak void variant_update_soc_chip_config ( struct soc_intel_alderlake_config config)

Definition at line 62 of file mainboard.c.

Referenced by mainboard_update_soc_chip_config().

Here is the caller graph for this function:

◆ WEAK_DEV_PTR()

WEAK_DEV_PTR ( rp6_wwan  )

Variable Documentation

◆ mainboard_ops

struct chip_operations mainboard_ops
Initial value:
= {
.init = mainboard_init,
.enable_dev = mainboard_enable,
.final = mainboard_final,
}
static void mainboard_init(void *chip_info)
Definition: mainboard.c:72
static void mainboard_final(void *chip_info)
Definition: mainboard.c:188
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:176

Definition at line 188 of file mainboard.c.