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

Go to the source code of this file.

Macros

#define __SIMPLE_DEVICE__
 
#define PCH_P2SB_EPMASK(mask_number)   (PCH_P2SB_EPMASK0 + ((mask_number) * 4))
 

Functions

void p2sb_enable_bar (void)
 
void p2sb_configure_hpet (void)
 
union p2sb_bdf p2sb_get_hpet_bdf (void)
 
void p2sb_set_hpet_bdf (union p2sb_bdf bdf)
 
union p2sb_bdf p2sb_get_ioapic_bdf (void)
 
void p2sb_set_ioapic_bdf (union p2sb_bdf bdf)
 
void p2sb_unhide (void)
 
void p2sb_hide (void)
 
static void p2sb_configure_endpoints (int epmask_id, uint32_t mask)
 
static void p2sb_lock_endpoints (void)
 
void p2sb_disable_sideband_access (void)
 
static void read_resources (struct device *dev)
 

Variables

static const struct device_operations device_ops
 
static const unsigned short pci_device_ids []
 
static const struct pci_driver pmc __pci_driver
 

Macro Definition Documentation

◆ __SIMPLE_DEVICE__

#define __SIMPLE_DEVICE__

Definition at line 3 of file p2sb.c.

◆ PCH_P2SB_EPMASK

#define PCH_P2SB_EPMASK (   mask_number)    (PCH_P2SB_EPMASK0 + ((mask_number) * 4))

Definition at line 17 of file p2sb.c.

Function Documentation

◆ p2sb_configure_endpoints()

static void p2sb_configure_endpoints ( int  epmask_id,
uint32_t  mask 
)
static

Definition at line 88 of file p2sb.c.

References mask, PCH_DEV_P2SB, PCH_P2SB_EPMASK, pci_read_config32(), and pci_write_config32().

Referenced by p2sb_disable_sideband_access().

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

◆ p2sb_configure_hpet()

void p2sb_configure_hpet ( void  )

Definition at line 29 of file p2sb.c.

References HPTC_ADDR_ENABLE_BIT, HPTC_OFFSET, PCH_DEV_P2SB, and pci_write_config8().

Referenced by bootblock_c_entry(), and bootblock_pch_early_init().

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

◆ p2sb_disable_sideband_access()

void p2sb_disable_sideband_access ( void  )

Definition at line 107 of file p2sb.c.

References ARRAY_SIZE, memset(), p2sb_configure_endpoints(), P2SB_EP_MASK_MAX_REG, p2sb_lock_endpoints(), and p2sb_soc_get_sb_mask().

Referenced by heci1_disable_using_sbi(), and soc_disable_heci1_using_pcr().

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

◆ p2sb_enable_bar()

void p2sb_enable_bar ( void  )

Definition at line 19 of file p2sb.c.

References P2SB_BAR, p2sb_dev_enable_bar(), and PCH_DEV_P2SB.

Referenced by bootblock_c_entry(), and bootblock_pch_early_init().

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

◆ p2sb_get_hpet_bdf()

union p2sb_bdf p2sb_get_hpet_bdf ( void  )

Definition at line 29 of file p2sb.c.

Referenced by acpi_create_drhd(), and soc_fill_dmar().

Here is the caller graph for this function:

◆ p2sb_get_ioapic_bdf()

union p2sb_bdf p2sb_get_ioapic_bdf ( void  )

Definition at line 54 of file p2sb.c.

References PCH_DEV_P2SB, PCH_P2SB_HBDF, pci_write_config16(), and p2sb_bdf::raw.

Referenced by acpi_create_drhd(), and soc_fill_dmar().

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

◆ p2sb_hide()

void p2sb_hide ( void  )

Definition at line 83 of file p2sb.c.

References p2sb_dev_hide(), and PCH_DEV_P2SB.

Referenced by chip_final(), gpio_lock_pads(), heci1_disable_using_sbi(), pch_finalize_script(), platform_fsp_notify_status(), and soc_fill_dmar().

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

◆ p2sb_lock_endpoints()

static void p2sb_lock_endpoints ( void  )
static

Definition at line 97 of file p2sb.c.

References P2SB_E0_MASKLOCK, PCH_DEV_P2SB, PCH_P2SB_E0, pci_read_config8(), and pci_write_config8().

Referenced by p2sb_disable_sideband_access().

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

◆ p2sb_set_hpet_bdf()

void p2sb_set_hpet_bdf ( union p2sb_bdf  bdf)

Definition at line 54 of file p2sb.c.

Referenced by override_hpet_ioapic_bdf().

Here is the caller graph for this function:

◆ p2sb_set_ioapic_bdf()

void p2sb_set_ioapic_bdf ( union p2sb_bdf  bdf)

Definition at line 73 of file p2sb.c.

References PCH_DEV_P2SB, PCH_P2SB_IBDF, pci_write_config16(), and p2sb_bdf::raw.

Referenced by override_hpet_ioapic_bdf().

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

◆ p2sb_unhide()

void p2sb_unhide ( void  )

Definition at line 78 of file p2sb.c.

References p2sb_dev_unhide(), and PCH_DEV_P2SB.

Referenced by chip_init(), gpio_lock_pads(), heci1_disable_using_sbi(), soc_disable_heci1_using_pcr(), and soc_init().

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

◆ read_resources()

static void read_resources ( struct device dev)
static

Definition at line 123 of file p2sb.c.

Variable Documentation

◆ __pci_driver

const struct pci_driver pmc __pci_driver
static
Initial value:
= {
.ops = &device_ops,
.vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
}
static const struct device_operations device_ops
Definition: p2sb.c:134
static const unsigned short pci_device_ids[]
Definition: p2sb.c:140
#define PCI_VID_INTEL
Definition: pci_ids.h:2157

Definition at line 140 of file p2sb.c.

◆ device_ops

const struct device_operations device_ops
static
Initial value:
= {
.read_resources = read_resources,
.set_resources = noop_set_resources,
.ops_pci = &pci_dev_ops_pci,
}
static void read_resources(struct device *dev)
Definition: p2sb.c:123
static void noop_set_resources(struct device *dev)
Definition: device.h:74
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911

Definition at line 123 of file p2sb.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0,
}
#define PCI_DID_INTEL_EHL_P2SB
Definition: pci_ids.h:4156
#define PCI_DID_INTEL_SKL_LP_P2SB
Definition: pci_ids.h:4146
#define PCI_DID_INTEL_GLK_P2SB
Definition: pci_ids.h:4143
#define PCI_DID_INTEL_CNL_P2SB
Definition: pci_ids.h:4149
#define PCI_DID_INTEL_ADP_M_P2SB
Definition: pci_ids.h:4160
#define PCI_DID_INTEL_CMP_P2SB
Definition: pci_ids.h:4152
#define PCI_DID_INTEL_APL_P2SB
Definition: pci_ids.h:4142
#define PCI_DID_INTEL_LWB_P2SB_SUPER
Definition: pci_ids.h:4145
#define PCI_DID_INTEL_KBL_P2SB
Definition: pci_ids.h:4148
#define PCI_DID_INTEL_TGL_P2SB
Definition: pci_ids.h:4154
#define PCI_DID_INTEL_LWB_P2SB
Definition: pci_ids.h:4144
#define PCI_DID_INTEL_ADP_P_P2SB
Definition: pci_ids.h:4158
#define PCI_DID_INTEL_ADP_S_P2SB
Definition: pci_ids.h:4159
#define PCI_DID_INTEL_SKL_P2SB
Definition: pci_ids.h:4147
#define PCI_DID_INTEL_CNP_H_P2SB
Definition: pci_ids.h:4150
#define PCI_DID_INTEL_MTL_SOC_P2SB
Definition: pci_ids.h:4161
#define PCI_DID_INTEL_TGL_H_P2SB
Definition: pci_ids.h:4155
#define PCI_DID_INTEL_JSP_P2SB
Definition: pci_ids.h:4157
#define PCI_DID_INTEL_ICL_P2SB
Definition: pci_ids.h:4151
#define PCI_DID_INTEL_CMP_H_P2SB
Definition: pci_ids.h:4153

Definition at line 140 of file p2sb.c.