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/intel/microcode.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <fsp/api.h>
#include <fsp/fsp_debug_event.h>
#include <fsp/ppi/mp_service_ppi.h>
#include <fsp/util.h>
#include <option.h>
#include <intelblocks/irq.h>
#include <intelblocks/lpss.h>
#include <intelblocks/pmclib.h>
#include <intelblocks/xdci.h>
#include <intelpch/lockdown.h>
#include <intelblocks/tcss.h>
#include <soc/cpu.h>
#include <soc/gpio_soc_defs.h>
#include <soc/intel/common/vbt.h>
#include <soc/pci_devs.h>
#include <soc/pcie.h>
#include <soc/ramstage.h>
#include <soc/soc_chip.h>
#include <stdlib.h>
#include <string.h>
#include <types.h>
Include dependency graph for fsp_params.c:

Go to the source code of this file.

Macros

#define THC_NONE   0
 
#define THC_0   1
 
#define THC_1   2
 
#define DEF_DMVAL   15
 
#define DEF_DITOVAL   625
 
#define MILLIAMPS_TO_AMPS   1000
 
#define ICC_MAX_TDP_45W   34250
 
#define ICC_MAX_TDP_15W_28W   32000
 
#define ICC_MAX_ID_ADL_M_MA   12000
 

Enumerations

enum  fsp_end_of_post { EOP_DISABLE = 0 , EOP_PEI = 1 , EOP_DXE = 2 }
 

Functions

static const SI_PCH_DEVICE_INTERRUPT_CONFIG * pci_irq_to_fsp (size_t *out_count)
 
static int get_l1_substate_control (enum L1_substates_control ctl)
 
static unsigned int get_aspm_control (enum ASPM_control ctl)
 
static uint16_t get_vccin_aux_imon_iccmax (void)
 
__weak void mainboard_update_soc_chip_config (struct soc_intel_alderlake_config *config)
 
static void fill_fsps_lpss_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_cpu_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_igd_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_tcss_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_chipset_lockdown_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_xhci_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_xdci_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_uart_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_sata_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_thermal_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_lan_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_cnvi_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_vmd_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_thc_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_tbt_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_8254_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_pm_timer_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_storage_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_pcie_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_cpu_pcie_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_misc_power_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_irq_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_fivr_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_fivr_rfi_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void fill_fsps_acoustic_params (FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_config *config)
 
static void soc_silicon_init_params (FSP_S_CONFIG *s_cfg, struct soc_intel_alderlake_config *config)
 
void platform_fsp_silicon_init_params_cb (FSPS_UPD *supd)
 
void platform_fsp_multi_phase_init_cb (uint32_t phase_index)
 
__weak void mainboard_silicon_init_params (FSP_S_CONFIG *s_cfg)
 

Variables

static const struct slot_irq_constraints irq_constraints []
 

Macro Definition Documentation

◆ DEF_DITOVAL

#define DEF_DITOVAL   625

Definition at line 38 of file fsp_params.c.

◆ DEF_DMVAL

#define DEF_DMVAL   15

Definition at line 37 of file fsp_params.c.

◆ ICC_MAX_ID_ADL_M_MA

#define ICC_MAX_ID_ADL_M_MA   12000

Definition at line 44 of file fsp_params.c.

◆ ICC_MAX_TDP_15W_28W

#define ICC_MAX_TDP_15W_28W   32000

Definition at line 43 of file fsp_params.c.

◆ ICC_MAX_TDP_45W

#define ICC_MAX_TDP_45W   34250

Definition at line 42 of file fsp_params.c.

◆ MILLIAMPS_TO_AMPS

#define MILLIAMPS_TO_AMPS   1000

Definition at line 41 of file fsp_params.c.

◆ THC_0

#define THC_0   1

Definition at line 33 of file fsp_params.c.

◆ THC_1

#define THC_1   2

Definition at line 34 of file fsp_params.c.

◆ THC_NONE

#define THC_NONE   0

Definition at line 32 of file fsp_params.c.

Enumeration Type Documentation

◆ fsp_end_of_post

Enumerator
EOP_DISABLE 
EOP_PEI 
EOP_DXE 

Definition at line 52 of file fsp_params.c.

Function Documentation

◆ fill_fsps_8254_params()

static void fill_fsps_8254_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 614 of file fsp_params.c.

References CONFIG, and get_uint_option().

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_acoustic_params()

static void fill_fsps_acoustic_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 826 of file fsp_params.c.

References config, and NUM_VR_DOMAINS.

Referenced by soc_silicon_init_params().

Here is the caller graph for this function:

◆ fill_fsps_chipset_lockdown_params()

static void fill_fsps_chipset_lockdown_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 445 of file fsp_params.c.

References CHIPSET_LOCKDOWN_FSP, EOP_DISABLE, and get_lockdown_config().

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_cnvi_params()

static void fill_fsps_cnvi_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 578 of file fsp_params.c.

References assert, config, is_devfn_enabled(), and PCH_DEVFN_CNVI_WIFI.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_cpu_params()

static void fill_fsps_cpu_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 377 of file fsp_params.c.

References CONFIG, get_microcode_size(), intel_microcode_find(), mp_fill_ppi_services_data(), and NULL.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_cpu_pcie_params()

static void fill_fsps_cpu_pcie_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 673 of file fsp_params.c.

References BIT, config, pcie_rp_config::flags, get_cpu_pcie_rp_table(), get_l1_substate_control(), PCIE_RP_AER, pcie_rp_enable_mask(), PCIE_RP_HOTPLUG, PCIE_RP_LTR, and pcie_rp_config::PcieRpL1Substates.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_fivr_params()

static void fill_fsps_fivr_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 779 of file fsp_params.c.

References config.

Referenced by soc_silicon_init_params().

Here is the caller graph for this function:

◆ fill_fsps_fivr_rfi_params()

static void fill_fsps_fivr_rfi_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 818 of file fsp_params.c.

References config, and KHz.

Referenced by soc_silicon_init_params().

Here is the caller graph for this function:

◆ fill_fsps_igd_params()

static void fill_fsps_igd_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 400 of file fsp_params.c.

References CONFIG, is_devfn_enabled(), PAVP, SA_DEVFN_IGD, and vbt_get().

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_irq_params()

static void fill_fsps_irq_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 765 of file fsp_params.c.

References ARRAY_SIZE, assign_pci_irqs(), BIOS_INFO, die(), irq_constraints, pci_irq_to_fsp(), and printk.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_lan_params()

static void fill_fsps_lan_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 571 of file fsp_params.c.

References is_devfn_enabled(), and PCH_DEVFN_GBE.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_lpss_params()

static void fill_fsps_lpss_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 361 of file fsp_params.c.

References config.

Referenced by soc_silicon_init_params().

Here is the caller graph for this function:

◆ fill_fsps_misc_power_params()

static void fill_fsps_misc_power_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 694 of file fsp_params.c.

References ARRAY_SIZE, BIOS_DEBUG, config, fill_vr_domain_config(), get_pm_pwr_cyc_dur(), get_supported_lpm_mask(), get_vccin_aux_imon_iccmax(), LIMIT_AUTO, MILLIAMPS_TO_AMPS, and printk.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_pcie_params()

static void fill_fsps_pcie_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

◆ fill_fsps_pm_timer_params()

static void fill_fsps_pm_timer_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 623 of file fsp_params.c.

Referenced by soc_silicon_init_params().

Here is the caller graph for this function:

◆ fill_fsps_sata_params()

static void fill_fsps_sata_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 526 of file fsp_params.c.

References ARRAY_SIZE, config, is_devfn_enabled(), memcpy(), and PCH_DEVFN_SATA.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_storage_params()

static void fill_fsps_storage_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 636 of file fsp_params.c.

References config, is_devfn_enabled(), PCH_DEVFN_EMMC, and PCH_DEVFN_UFS.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_tbt_params()

static void fill_fsps_tbt_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 606 of file fsp_params.c.

References ARRAY_SIZE, is_devfn_enabled(), and SA_DEVFN_TBT.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_tcss_params()

static void fill_fsps_tcss_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 412 of file fsp_params.c.

References BIT, config, DEV_PTR, is_dev_enabled(), MAX_TYPE_C_PORTS, and memset().

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_thc_params()

static void fill_fsps_thc_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 598 of file fsp_params.c.

References is_devfn_enabled(), PCH_DEVFN_THC0, PCH_DEVFN_THC1, THC_0, THC_1, and THC_NONE.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_thermal_params()

static void fill_fsps_thermal_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 561 of file fsp_params.c.

References config, is_devfn_enabled(), and SA_DEVFN_DPTF.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_uart_params()

static void fill_fsps_uart_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 513 of file fsp_params.c.

References ARRAY_SIZE, ASSERT, CONFIG, and fsp_debug_event_handler().

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_vmd_params()

static void fill_fsps_vmd_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 591 of file fsp_params.c.

References is_devfn_enabled(), and SA_DEVFN_VMD.

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_xdci_params()

static void fill_fsps_xdci_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 507 of file fsp_params.c.

References PCH_DEVFN_USBOTG, and xdci_can_enable().

Referenced by soc_silicon_init_params().

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

◆ fill_fsps_xhci_params()

static void fill_fsps_xhci_params ( FSP_S_CONFIG s_cfg,
const struct soc_intel_alderlake_config config 
)
static

Definition at line 460 of file fsp_params.c.

References ARRAY_SIZE, config, and OC_SKIP.

Referenced by soc_silicon_init_params().

Here is the caller graph for this function:

◆ get_aspm_control()

static unsigned int get_aspm_control ( enum ASPM_control  ctl)
static

Definition at line 314 of file fsp_params.c.

References ASPM_AUTO, and ASPM_DEFAULT.

Referenced by fill_fsps_pcie_params().

Here is the caller graph for this function:

◆ get_l1_substate_control()

static int get_l1_substate_control ( enum L1_substates_control  ctl)
static

Definition at line 294 of file fsp_params.c.

References L1_SS_FSP_DEFAULT, and L1_SS_L1_2.

Referenced by fill_fsps_cpu_pcie_params(), and fill_fsps_pcie_params().

Here is the caller graph for this function:

◆ get_vccin_aux_imon_iccmax()

◆ mainboard_silicon_init_params()

__weak void mainboard_silicon_init_params ( FSP_S_CONFIG s_cfg)

Definition at line 915 of file fsp_params.c.

References BIOS_DEBUG, and printk.

Referenced by platform_fsp_silicon_init_params_cb().

Here is the caller graph for this function:

◆ mainboard_update_soc_chip_config()

__weak void mainboard_update_soc_chip_config ( struct soc_intel_alderlake_config config)

Definition at line 356 of file fsp_params.c.

Referenced by platform_fsp_silicon_init_params_cb(), and soc_silicon_init_params().

Here is the caller graph for this function:

◆ pci_irq_to_fsp()

static const SI_PCH_DEVICE_INTERRUPT_CONFIG* pci_irq_to_fsp ( size_t out_count)
static

Definition at line 242 of file fsp_params.c.

References calloc(), config, pci_irq_entry::devfn, get_cached_pci_irqs(), pci_irq_entry::irq, MIN_PCH_SLOT, pci_irq_entry::next, NULL, PCI_FUNC, PCI_SLOT, and pci_irq_entry::pin.

Referenced by fill_fsps_irq_params().

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

◆ platform_fsp_multi_phase_init_cb()

void platform_fsp_multi_phase_init_cb ( uint32_t  phase_index)

Definition at line 896 of file fsp_params.c.

References BIOS_DEBUG, config, CONFIG, config_of_soc, printk, and tcss_configure().

Here is the call graph for this function:

◆ platform_fsp_silicon_init_params_cb()

void platform_fsp_silicon_init_params_cb ( FSPS_UPD *  supd)

Definition at line 879 of file fsp_params.c.

References config, config_of_soc, FSP_S_CONFIG, mainboard_silicon_init_params(), and soc_silicon_init_params().

Here is the call graph for this function:

◆ soc_silicon_init_params()

Variable Documentation

◆ irq_constraints

const struct slot_irq_constraints irq_constraints[]
static

Definition at line 1 of file fsp_params.c.

Referenced by fill_fsps_irq_params().