coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fsp_params.c File Reference
#include <bootsplash.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <fsp/api.h>
#include <fsp/util.h>
#include <option.h>
#include <intelblocks/irq.h>
#include <intelblocks/lpss.h>
#include <intelblocks/power_limit.h>
#include <intelblocks/pmclib.h>
#include <intelblocks/xdci.h>
#include <intelpch/lockdown.h>
#include <soc/intel/common/vbt.h>
#include <soc/pci_devs.h>
#include <soc/ramstage.h>
#include <string.h>
#include <types.h>
#include "chip.h"
Include dependency graph for fsp_params.c:

Go to the source code of this file.

Macros

#define PCH_SERIAL_IO_INDEX(x)   ((x) - 1)
 

Functions

static uint8_t get_param_value (const config_t *config, uint32_t dev_offset)
 
static void parse_devicetree (const config_t *config, FSP_S_CONFIG *params)
 
static void ignore_gbe_ltr (void)
 
static void configure_gspi_cs (int idx, const config_t *config, uint8_t *polarity, uint8_t *enable, uint8_t *defaultcs)
 
static const SI_PCH_DEVICE_INTERRUPT_CONFIG * pci_irq_to_fsp (size_t *out_count)
 
void platform_fsp_silicon_init_params_cb (FSPS_UPD *supd)
 
__weak void mainboard_silicon_init_params (FSPS_UPD *supd)
 
void soc_load_logo (FSPS_UPD *supd)
 

Variables

static const pci_devfn_t serial_io_dev []
 
static const struct slot_irq_constraints irq_constraints []
 

Macro Definition Documentation

◆ PCH_SERIAL_IO_INDEX

#define PCH_SERIAL_IO_INDEX (   x)    ((x) - 1)

Definition at line 212 of file fsp_params.c.

Function Documentation

◆ configure_gspi_cs()

static void configure_gspi_cs ( int  idx,
const config_t config,
uint8_t polarity,
uint8_t enable,
uint8_t defaultcs 
)
static

Definition at line 267 of file fsp_params.c.

References config, spi_cfg::cs_polarity, gspi_get_soc_spi_cfg(), NULL, and SPI_POLARITY_LOW.

Referenced by platform_fsp_silicon_init_params_cb().

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

◆ get_param_value()

static uint8_t get_param_value ( const config_t config,
uint32_t  dev_offset 
)
static

Definition at line 214 of file fsp_params.c.

References config, is_devfn_enabled(), PCH_SERIAL_IO_INDEX, PchSerialIoDisabled, PchSerialIoMax, PchSerialIoNotInitialized, PchSerialIoPci, and serial_io_dev.

Referenced by parse_devicetree().

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

◆ ignore_gbe_ltr()

static void ignore_gbe_ltr ( void  )
static

Definition at line 257 of file fsp_params.c.

References IGN_GBE, LTR_IGN, pmc_mmio_regs(), read8(), and write8().

Referenced by platform_fsp_silicon_init_params_cb().

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

◆ mainboard_silicon_init_params()

__weak void mainboard_silicon_init_params ( FSPS_UPD *  supd)

Definition at line 749 of file fsp_params.c.

References BIOS_DEBUG, and printk.

◆ parse_devicetree()

static void parse_devicetree ( const config_t config,
FSP_S_CONFIG params 
)
static

Definition at line 229 of file fsp_params.c.

References ARRAY_SIZE, config, get_param_value(), params, serial_io_dev, and SOC_INTEL_CML_UART_DEV_MAX.

Referenced by platform_fsp_silicon_init_params_cb().

Here is the call graph for this function:
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 289 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 platform_fsp_silicon_init_params_cb().

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

◆ platform_fsp_silicon_init_params_cb()

◆ soc_load_logo()

void soc_load_logo ( FSPS_UPD *  supd)

Definition at line 755 of file fsp_params.c.

References bmp_load_logo().

Here is the call graph for this function:

Variable Documentation

◆ irq_constraints

const struct slot_irq_constraints irq_constraints[]
static

Definition at line 24 of file fsp_params.c.

Referenced by platform_fsp_silicon_init_params_cb().

◆ serial_io_dev

const pci_devfn_t serial_io_dev[]
static
Initial value:
= {
}
#define PCH_DEVFN_I2C5
Definition: pci_devs.h:163
#define PCH_DEVFN_GSPI0
Definition: pci_devs.h:206
#define PCH_DEVFN_I2C0
Definition: pci_devs.h:134
#define PCH_DEVFN_UART0
Definition: pci_devs.h:204
#define PCH_DEVFN_I2C3
Definition: pci_devs.h:137
#define PCH_DEVFN_I2C4
Definition: pci_devs.h:162
#define PCH_DEVFN_I2C2
Definition: pci_devs.h:136
#define PCH_DEVFN_UART1
Definition: pci_devs.h:205
#define PCH_DEVFN_I2C1
Definition: pci_devs.h:135
#define PCH_DEVFN_GSPI2
Definition: pci_devs.h:107
#define PCH_DEVFN_UART2
Definition: pci_devs.h:164
#define PCH_DEVFN_GSPI1
Definition: pci_devs.h:207

Definition at line 24 of file fsp_params.c.

Referenced by get_param_value(), and parse_devicetree().