coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pci_routing_info.c File Reference
#include <amdblocks/amd_pci_util.h>
#include <console/console.h>
#include <device/pci_def.h>
#include <stdlib.h>
#include <types.h>
Include dependency graph for pci_routing_info.c:

Go to the source code of this file.

Enumerations

enum  pcie_swizzle_pin { PIN_A , PIN_B , PIN_C , PIN_D }
 

Functions

const struct pci_routing_infoget_pci_routing_info (unsigned int devfn)
 
unsigned int pci_calculate_irq (const struct pci_routing_info *routing_info, unsigned int pin)
 
void populate_pirq_data (void)
 

Variables

static const uint8_t pcie_swizzle_table [][4]
 

Enumeration Type Documentation

◆ pcie_swizzle_pin

Enumerator
PIN_A 
PIN_B 
PIN_C 
PIN_D 

Definition at line 9 of file pci_routing_info.c.

Function Documentation

◆ get_pci_routing_info()

const struct pci_routing_info* get_pci_routing_info ( unsigned int  devfn)

Definition at line 23 of file pci_routing_info.c.

References BIOS_ERR, pci_routing_info::devfn, get_pci_routing_table(), NULL, PCI_FUNC, PCI_SLOT, and printk.

Referenced by acpigen_write_pci_FCH_PRT(), and acpigen_write_pci_GNB_PRT().

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

◆ pci_calculate_irq()

unsigned int pci_calculate_irq ( const struct pci_routing_info routing_info,
unsigned int  pin 
)

Definition at line 43 of file pci_routing_info.c.

References ARRAY_SIZE, die(), pci_routing_info::group, pci_routing_info::irq, pcie_swizzle_table, and pci_routing_info::swizzle.

Referenced by acpigen_write_PRT_GSI(), acpigen_write_PRT_PIC(), and populate_pirq_data().

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

◆ populate_pirq_data()

void populate_pirq_data ( void  )

Definition at line 60 of file pci_routing_info.c.

References BIOS_ERR, calloc(), pci_routing_info::devfn, get_pci_routing_table(), pci_calculate_irq(), pirq_data_ptr, pirq_data_size, and printk.

Referenced by set_pci_irqs().

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

Variable Documentation

◆ pcie_swizzle_table

const uint8_t pcie_swizzle_table[][4]
static
Initial value:
= {
}
@ PIN_D
@ PIN_B
@ PIN_C
@ PIN_A

Definition at line 16 of file pci_routing_info.c.

Referenced by pci_calculate_irq().