coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fsp_params.c File Reference
#include <assert.h>
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/cpu_ids.h>
#include <device/device.h>
#include <drivers/wifi/generic/wifi.h>
#include <fsp/fsp_debug_event.h>
#include <fsp/util.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/pcie_rp.h>
#include <soc/gpio_soc_defs.h>
#include <soc/iomap.h>
#include <soc/msr.h>
#include <soc/pci_devs.h>
#include <soc/pcie.h>
#include <soc/romstage.h>
#include <soc/soc_chip.h>
#include <string.h>
Include dependency graph for fsp_params.c:

Go to the source code of this file.

Macros

#define FSP_CLK_NOTUSED   0xFF
 
#define FSP_CLK_LAN   0x70
 
#define FSP_CLK_FREE_RUNNING   0x80
 
#define CPU_PCIE_BASE   0x40
 

Enumerations

enum  vtd_base_index_type {
  VTD_GFX , VTD_IPU , VTD_VTVCO , VTD_TBT0 ,
  VTD_TBT1 , VTD_TBT2 , VTD_TBT3
}
 

Functions

static uint8_t clk_src_to_fsp (enum pcie_rp_type type, int rp_number)
 
static void pcie_rp_init (FSP_M_CONFIG *m_cfg, uint32_t en_mask, enum pcie_rp_type type, const struct pcie_rp_config *cfg, size_t cfg_count)
 
static void fill_fspm_pcie_rp_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_igd_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_mrc_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_cpu_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_security_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_uart_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_ipu_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_smbus_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_misc_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_audio_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_ish_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_tcss_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_usb4_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_vtd_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fspm_trace_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
static void soc_memory_init_params (FSP_M_CONFIG *m_cfg, const struct soc_intel_alderlake_config *config)
 
void platform_fsp_memory_init_params_cb (FSPM_UPD *mupd, uint32_t version)
 
__weak void mainboard_memory_init_params (FSPM_UPD *memupd)
 

Macro Definition Documentation

◆ CPU_PCIE_BASE

#define CPU_PCIE_BASE   0x40

Definition at line 26 of file fsp_params.c.

◆ FSP_CLK_FREE_RUNNING

#define FSP_CLK_FREE_RUNNING   0x80

Definition at line 24 of file fsp_params.c.

◆ FSP_CLK_LAN

#define FSP_CLK_LAN   0x70

Definition at line 23 of file fsp_params.c.

◆ FSP_CLK_NOTUSED

#define FSP_CLK_NOTUSED   0xFF

Definition at line 22 of file fsp_params.c.

Enumeration Type Documentation

◆ vtd_base_index_type

Enumerator
VTD_GFX 
VTD_IPU 
VTD_VTVCO 
VTD_TBT0 
VTD_TBT1 
VTD_TBT2 
VTD_TBT3 

Definition at line 28 of file fsp_params.c.

Function Documentation

◆ clk_src_to_fsp()

static uint8_t clk_src_to_fsp ( enum pcie_rp_type  type,
int  rp_number 
)
static

Definition at line 38 of file fsp_params.c.

References assert, CPU_PCIE_BASE, PCIE_RP_CPU, PCIE_RP_PCH, and type.

Referenced by pcie_rp_init().

Here is the caller graph for this function:

◆ fill_fspm_audio_params()

static void fill_fspm_audio_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 222 of file fsp_params.c.

References config, is_devfn_enabled(), memset(), and PCH_DEVFN_HDA.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_cpu_params()

static void fill_fspm_cpu_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 148 of file fsp_params.c.

References config, get_valid_prmrr_size(), msr_struct::lo, MSR_FLEX_RATIO, and rdmsr().

Referenced by soc_memory_init_params().

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

◆ fill_fspm_igd_params()

static void fill_fspm_igd_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 98 of file fsp_params.c.

References ARRAY_SIZE, config, CONFIG, DDI_ENABLE_DDC, DDI_ENABLE_HPD, DDI_PORT_1, DDI_PORT_2, DDI_PORT_3, DDI_PORT_4, DDI_PORT_A, DDI_PORT_B, DDI_PORT_C, is_devfn_enabled(), and SA_DEVFN_IGD.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_ipu_params()

static void fill_fspm_ipu_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 185 of file fsp_params.c.

References is_devfn_enabled(), memset(), and SA_DEVFN_IPU.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_ish_params()

static void fill_fspm_ish_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 243 of file fsp_params.c.

References is_devfn_enabled(), and PCH_DEVFN_ISH.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_misc_params()

static void fill_fspm_misc_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 200 of file fsp_params.c.

References ARRAY_SIZE, config, DEVICE_PATH_GENERIC, DEVICE_PATH_PCI, find_dev_nested_path(), is_dev_enabled(), device::path, PCH_DEVFN_CNVI_WIFI, pci_root_bus(), device_path::type, and wifi_generic_cnvi_ddr_rfim_enabled().

Referenced by soc_memory_init_params().

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

◆ fill_fspm_mrc_params()

static void fill_fspm_mrc_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 139 of file fsp_params.c.

References config.

Referenced by soc_memory_init_params().

Here is the caller graph for this function:

◆ fill_fspm_pcie_rp_params()

static void fill_fspm_pcie_rp_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 71 of file fsp_params.c.

References config, FSP_CLK_FREE_RUNNING, FSP_CLK_LAN, FSP_CLK_NOTUSED, get_cpu_pcie_rp_table(), get_pch_pcie_rp_table(), PCIE_CLK_FREE_RUNNING, PCIE_CLK_LAN, PCIE_RP_CPU, pcie_rp_enable_mask(), pcie_rp_init(), and PCIE_RP_PCH.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_security_params()

static void fill_fspm_security_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 165 of file fsp_params.c.

References CONFIG.

Referenced by soc_memory_init_params().

Here is the caller graph for this function:

◆ fill_fspm_smbus_params()

static void fill_fspm_smbus_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 194 of file fsp_params.c.

References is_devfn_enabled(), and PCH_DEVFN_SMBUS.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_tcss_params()

static void fill_fspm_tcss_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 249 of file fsp_params.c.

References is_devfn_enabled(), SA_DEVFN_TCSS_DMA0, SA_DEVFN_TCSS_DMA1, SA_DEVFN_TCSS_XDCI, and SA_DEVFN_TCSS_XHCI.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_trace_params()

static void fill_fspm_trace_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 324 of file fsp_params.c.

References CONFIG, is_devfn_enabled(), and SA_DEVFN_TMT.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_uart_params()

static void fill_fspm_uart_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 173 of file fsp_params.c.

References CONFIG, and PchSerialIoSkipInit.

Referenced by soc_memory_init_params().

Here is the caller graph for this function:

◆ fill_fspm_usb4_params()

static void fill_fspm_usb4_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 261 of file fsp_params.c.

References is_devfn_enabled(), SA_DEVFN_TBT0, SA_DEVFN_TBT1, SA_DEVFN_TBT2, and SA_DEVFN_TBT3.

Referenced by soc_memory_init_params().

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

◆ fill_fspm_vtd_params()

static void fill_fspm_vtd_params ( FSP_M_CONFIG m_cfg,
const struct soc_intel_alderlake_config config 
)
static

◆ mainboard_memory_init_params()

__weak void mainboard_memory_init_params ( FSPM_UPD *  memupd)

Definition at line 389 of file fsp_params.c.

References BIOS_DEBUG, and printk.

Referenced by platform_fsp_memory_init_params_cb().

Here is the caller graph for this function:

◆ pcie_rp_init()

static void pcie_rp_init ( FSP_M_CONFIG m_cfg,
uint32_t  en_mask,
enum pcie_rp_type  type,
const struct pcie_rp_config cfg,
size_t  cfg_count 
)
static

Definition at line 48 of file fsp_params.c.

References BIOS_WARNING, BIT, pcie_rp_config::clk_req, pcie_rp_config::clk_src, clk_src_to_fsp(), PCIE_RP_CLK_REQ_UNUSED, PCIE_RP_CLK_SRC_UNUSED, printk, and type.

Referenced by fill_fspm_pcie_rp_params().

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

◆ platform_fsp_memory_init_params_cb()

void platform_fsp_memory_init_params_cb ( FSPM_UPD *  mupd,
uint32_t  version 
)

◆ soc_memory_init_params()