coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pcie_rp.h File Reference
#include <stdint.h>
Include dependency graph for pcie_rp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pcie_rp_config
 
struct  pcie_rp_group
 

Macros

#define PCIE_RP(x)   ((x) - 1)
 
#define PCH_RP(x)   PCIE_RP(x)
 
#define CPU_RP(x)   PCIE_RP(x)
 

Enumerations

enum  pcie_rp_flags {
  PCIE_RP_HOTPLUG = (1 << 0) , PCIE_RP_LTR = (1 << 1) , PCIE_RP_AER = (1 << 2) , PCIE_RP_CLK_SRC_UNUSED = (1 << 3) ,
  PCIE_RP_CLK_REQ_DETECT = (1 << 4) , PCIE_RP_CLK_REQ_UNUSED = (1 << 5)
}
 
enum  pcie_clk_src_flags { PCIE_CLK_FREE_RUNNING = (1 << 0) , PCIE_CLK_LAN = (1 << 1) }
 
enum  L1_substates_control { L1_SS_FSP_DEFAULT , L1_SS_DISABLED , L1_SS_L1_1 , L1_SS_L1_2 }
 
enum  ASPM_control {
  ASPM_DEFAULT , ASPM_DISABLE , ASPM_L0S , ASPM_L1 ,
  ASPM_L0S_L1 , ASPM_AUTO
}
 
enum  pcie_rp_type { PCIE_RP_UNKNOWN , PCIE_RP_CPU , PCIE_RP_PCH }
 

Functions

static unsigned int rp_start_fn (const struct pcie_rp_group *group)
 
static unsigned int rp_end_fn (const struct pcie_rp_group *group)
 
void pcie_rp_update_devicetree (const struct pcie_rp_group *groups)
 
uint32_t pcie_rp_enable_mask (const struct pcie_rp_group *groups)
 
const struct pcie_rp_groupsoc_get_pch_rp_groups (void)
 
enum pcie_rp_type soc_get_pcie_rp_type (const struct device *dev)
 
int soc_get_cpu_rp_vw_idx (const struct device *dev)
 

Macro Definition Documentation

◆ CPU_RP

#define CPU_RP (   x)    PCIE_RP(x)

Definition at line 14 of file pcie_rp.h.

◆ PCH_RP

#define PCH_RP (   x)    PCIE_RP(x)

Definition at line 13 of file pcie_rp.h.

◆ PCIE_RP

#define PCIE_RP (   x)    ((x) - 1)

Definition at line 12 of file pcie_rp.h.

Enumeration Type Documentation

◆ ASPM_control

Enumerator
ASPM_DEFAULT 
ASPM_DISABLE 
ASPM_L0S 
ASPM_L1 
ASPM_L0S_L1 
ASPM_AUTO 

Definition at line 46 of file pcie_rp.h.

◆ L1_substates_control

Enumerator
L1_SS_FSP_DEFAULT 
L1_SS_DISABLED 
L1_SS_L1_1 
L1_SS_L1_2 

Definition at line 38 of file pcie_rp.h.

◆ pcie_clk_src_flags

Enumerator
PCIE_CLK_FREE_RUNNING 
PCIE_CLK_LAN 

Definition at line 32 of file pcie_rp.h.

◆ pcie_rp_flags

Enumerator
PCIE_RP_HOTPLUG 
PCIE_RP_LTR 
PCIE_RP_AER 
PCIE_RP_CLK_SRC_UNUSED 
PCIE_RP_CLK_REQ_DETECT 
PCIE_RP_CLK_REQ_UNUSED 

Definition at line 16 of file pcie_rp.h.

◆ pcie_rp_type

Enumerator
PCIE_RP_UNKNOWN 
PCIE_RP_CPU 
PCIE_RP_PCH 

Definition at line 135 of file pcie_rp.h.

Function Documentation

◆ pcie_rp_enable_mask()

uint32_t pcie_rp_enable_mask ( const struct pcie_rp_group groups)

Definition at line 24 of file pcie_helpers.c.

References BIOS_ERR, pcie_rp_group::count, mask, offset, pcie_slot_enable_mask(), and printk.

Referenced by fill_fspm_pcie_rp_params(), fill_fsps_cpu_pcie_params(), and fill_fsps_pcie_params().

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

◆ pcie_rp_update_devicetree()

void pcie_rp_update_devicetree ( const struct pcie_rp_group groups)

Definition at line 131 of file pcie_rp.c.

References ARRAY_SIZE, BIOS_ERR, bus::children, pcie_rp_group::count, NULL, offset, pci_root_bus(), pcie_rp_scan_groups(), pcie_rp_update_dev(), printk, and device::sibling.

Referenced by soc_init_pre_device().

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

◆ rp_end_fn()

static unsigned int rp_end_fn ( const struct pcie_rp_group group)
inlinestatic

Definition at line 95 of file pcie_rp.h.

References pcie_rp_group::count, and pcie_rp_group::start.

Referenced by pcie_rp_scan_groups(), and pcie_rp_update_dev().

Here is the caller graph for this function:

◆ rp_start_fn()

static unsigned int rp_start_fn ( const struct pcie_rp_group group)
inlinestatic

Definition at line 90 of file pcie_rp.h.

References pcie_rp_group::start.

Referenced by is_part_of_group(), pcie_rp_scan_groups(), pcie_rp_update_dev(), and pcie_slot_enable_mask().

Here is the caller graph for this function:

◆ soc_get_cpu_rp_vw_idx()

int soc_get_cpu_rp_vw_idx ( const struct device dev)

◆ soc_get_pch_rp_groups()

const struct pcie_rp_group* soc_get_pch_rp_groups ( void  )

Definition at line 50 of file pcie_rp.c.

References CONFIG, pch_h_rp_groups, and pch_lp_rp_groups.

Referenced by soc_init_pre_device().

Here is the caller graph for this function:

◆ soc_get_pcie_rp_type()

enum pcie_rp_type soc_get_pcie_rp_type ( const struct device dev)

Definition at line 80 of file pcie_rp.c.

Referenced by pcie_rtd3_acpi_fill_ssdt().

Here is the caller graph for this function: