coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
p2sblib.c File Reference
#include <console/console.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <intelblocks/p2sb.h>
#include <intelblocks/p2sblib.h>
#include <intelblocks/pcr.h>
#include <soc/pci_devs.h>
Include dependency graph for p2sblib.c:

Go to the source code of this file.

Macros

#define __SIMPLE_DEVICE__
 

Functions

void p2sb_dev_enable_bar (pci_devfn_t dev, uint64_t bar)
 
bool p2sb_dev_is_hidden (pci_devfn_t dev)
 
static void p2sb_dev_set_hide_bit (pci_devfn_t dev, int hide)
 
void p2sb_dev_unhide (pci_devfn_t dev)
 
void p2sb_dev_hide (pci_devfn_t dev)
 
static void p2sb_execute_sideband_access (pci_devfn_t dev, uint8_t cmd, uint8_t pid, uint16_t reg, uint32_t *data)
 
uint32_t p2sb_dev_sbi_read (pci_devfn_t dev, uint8_t pid, uint16_t reg)
 
void p2sb_dev_sbi_write (pci_devfn_t dev, uint8_t pid, uint16_t reg, uint32_t val)
 

Macro Definition Documentation

◆ __SIMPLE_DEVICE__

#define __SIMPLE_DEVICE__

Definition at line 3 of file p2sblib.c.

Function Documentation

◆ p2sb_dev_enable_bar()

void p2sb_dev_enable_bar ( pci_devfn_t  dev,
uint64_t  bar 
)

Definition at line 13 of file p2sblib.c.

References PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_COMMAND, PCI_COMMAND_MASTER, PCI_COMMAND_MEMORY, pci_write_config16(), and pci_write_config32().

Referenced by ioe_p2sb_enable_bar(), and p2sb_enable_bar().

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

◆ p2sb_dev_hide()

void p2sb_dev_hide ( pci_devfn_t  dev)

Definition at line 57 of file p2sblib.c.

References die_with_post_code, p2sb_dev_is_hidden(), p2sb_dev_set_hide_bit(), and POST_HW_INIT_FAILURE.

Referenced by p2sb_execute_sideband_access(), and p2sb_hide().

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

◆ p2sb_dev_is_hidden()

bool p2sb_dev_is_hidden ( pci_devfn_t  dev)

Definition at line 23 of file p2sblib.c.

References BIOS_ERR, pci_read_config16(), PCI_VENDOR_ID, PCI_VID_INTEL, and printk.

Referenced by p2sb_dev_hide(), and p2sb_dev_unhide().

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

◆ p2sb_dev_sbi_read()

uint32_t p2sb_dev_sbi_read ( pci_devfn_t  dev,
uint8_t  pid,
uint16_t  reg 
)

Definition at line 92 of file p2sblib.c.

References p2sb_execute_sideband_access(), PCR_READ, pcr_sbi_msg::pid, and val.

Referenced by ioe_p2sb_sbi_read().

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

◆ p2sb_dev_sbi_write()

void p2sb_dev_sbi_write ( pci_devfn_t  dev,
uint8_t  pid,
uint16_t  reg,
uint32_t  val 
)

Definition at line 99 of file p2sblib.c.

References p2sb_execute_sideband_access(), PCR_WRITE, pcr_sbi_msg::pid, and val.

Referenced by ioe_p2sb_sbi_write().

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

◆ p2sb_dev_set_hide_bit()

static void p2sb_dev_set_hide_bit ( pci_devfn_t  dev,
int  hide 
)
static

Definition at line 35 of file p2sblib.c.

References mask, P2SBC, P2SBC_HIDE_BIT, pci_read_config8(), pci_write_config8(), and val.

Referenced by p2sb_dev_hide(), and p2sb_dev_unhide().

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

◆ p2sb_dev_unhide()

void p2sb_dev_unhide ( pci_devfn_t  dev)

Definition at line 48 of file p2sblib.c.

References die_with_post_code, p2sb_dev_is_hidden(), p2sb_dev_set_hide_bit(), and POST_HW_INIT_FAILURE.

Referenced by p2sb_execute_sideband_access(), and p2sb_unhide().

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

◆ p2sb_execute_sideband_access()

static void p2sb_execute_sideband_access ( pci_devfn_t  dev,
uint8_t  cmd,
uint8_t  pid,
uint16_t  reg,
uint32_t data 
)
static

Definition at line 66 of file p2sblib.c.

References BIOS_ERR, p2sb_dev_hide(), p2sb_dev_unhide(), pcr_execute_sideband_msg(), pcr_sbi_msg::pid, and printk.

Referenced by p2sb_dev_sbi_read(), and p2sb_dev_sbi_write().

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