coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
crashlog_lib.c File Reference
#include <console/console.h>
#include <intelblocks/crashlog.h>
#include <string.h>
#include <soc/crashlog.h>
#include <arch/bert_storage.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
Include dependency graph for crashlog_lib.c:

Go to the source code of this file.

Functions

u32 __weak cl_get_cpu_mb_int_addr (void)
 
bool pmc_cl_discovery (void)
 
u32 cl_get_cpu_bar_addr (void)
 
u32 cl_get_cpu_tmp_bar (void)
 
bool cl_pmc_sram_has_mmio_access (void)
 
static bool cpu_cl_get_capability (tel_crashlog_devsc_cap_t *cl_devsc_cap)
 
static bool cpu_cl_gen_discovery_table (void)
 
bool cpu_cl_discovery (void)
 
void reset_discovery_buffers (void)
 
int cl_get_total_data_size (void)
 
pmc_ipc_discovery_buf_t cl_get_pmc_discovery_buf (void)
 
pmc_crashlog_desc_table_t cl_get_pmc_descriptor_table (void)
 
int cl_get_pmc_record_size (void)
 
int cl_get_cpu_record_size (void)
 
bool cl_cpu_data_present (void)
 
bool cl_pmc_data_present (void)
 
bool cpu_crashlog_support (void)
 
bool pmc_crashlog_support (void)
 
void update_new_pmc_crashlog_size (u32 *pmc_crash_size)
 
cpu_crashlog_discovery_table_t cl_get_cpu_discovery_table (void)
 
void update_new_cpu_crashlog_size (u32 *cpu_crash_size)
 

Variables

static bool m_pmc_crashLog_support
 
static bool m_pmc_crashLog_present
 
static bool m_cpu_crashLog_support
 
static bool m_cpu_crashLog_present
 
static u32 m_pmc_crashLog_size
 
static u32 m_cpu_crashLog_size
 
static u32 cpu_crash_version
 
static pmc_ipc_discovery_buf_t discovery_buf
 
static pmc_crashlog_desc_table_t descriptor_table
 
static tel_crashlog_devsc_cap_t cpu_cl_devsc_cap
 
static cpu_crashlog_discovery_table_t cpu_cl_disc_tab
 

Function Documentation

◆ cl_cpu_data_present()

bool cl_cpu_data_present ( void  )

Definition at line 279 of file crashlog_lib.c.

References m_cpu_crashLog_present.

◆ cl_get_cpu_bar_addr()

u32 cl_get_cpu_bar_addr ( void  )

Definition at line 94 of file crashlog_lib.c.

References BIOS_ERR, cpu_cl_devsc_cap, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_BASE_ADDRESS_MEM_ATTR_MASK, pci_read_config32(), printk, SA_DEV_TMT, TEL_DVSEC_TBIR_BAR0, and TEL_DVSEC_TBIR_BAR1.

Referenced by cpu_cl_gen_discovery_table().

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

◆ cl_get_cpu_discovery_table()

cpu_crashlog_discovery_table_t cl_get_cpu_discovery_table ( void  )

Definition at line 309 of file crashlog_lib.c.

References cpu_cl_disc_tab.

◆ cl_get_cpu_mb_int_addr()

u32 __weak cl_get_cpu_mb_int_addr ( void  )

Definition at line 24 of file crashlog_lib.c.

References CRASHLOG_MAILBOX_INTF_ADDRESS.

◆ cl_get_cpu_record_size()

int cl_get_cpu_record_size ( void  )

Definition at line 273 of file crashlog_lib.c.

References m_cpu_crashLog_size.

◆ cl_get_cpu_tmp_bar()

u32 cl_get_cpu_tmp_bar ( void  )

Definition at line 112 of file crashlog_lib.c.

References SPI_BASE_ADDRESS.

◆ cl_get_pmc_descriptor_table()

pmc_crashlog_desc_table_t cl_get_pmc_descriptor_table ( void  )

Definition at line 261 of file crashlog_lib.c.

References descriptor_table.

◆ cl_get_pmc_discovery_buf()

pmc_ipc_discovery_buf_t cl_get_pmc_discovery_buf ( void  )

Definition at line 255 of file crashlog_lib.c.

References discovery_buf.

◆ cl_get_pmc_record_size()

int cl_get_pmc_record_size ( void  )

Definition at line 267 of file crashlog_lib.c.

References m_pmc_crashLog_size.

◆ cl_get_total_data_size()

int cl_get_total_data_size ( void  )

Definition at line 249 of file crashlog_lib.c.

References m_cpu_crashLog_size, and m_pmc_crashLog_size.

◆ cl_pmc_data_present()

bool cl_pmc_data_present ( void  )

Definition at line 285 of file crashlog_lib.c.

References m_pmc_crashLog_present.

◆ cl_pmc_sram_has_mmio_access()

bool cl_pmc_sram_has_mmio_access ( void  )

Definition at line 117 of file crashlog_lib.c.

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

Here is the call graph for this function:

◆ cpu_cl_discovery()

◆ cpu_cl_gen_discovery_table()

static bool cpu_cl_gen_discovery_table ( void  )
static

Definition at line 163 of file crashlog_lib.c.

References BIOS_DEBUG, BIOS_ERR, cl_get_cpu_bar_addr(), cpu_cl_devsc_cap, cpu_cl_disc_tab, CPU_CRASHLOG_DISC_TAB_GUID_VALID, m_cpu_crashLog_present, m_cpu_crashLog_size, memset(), printk, and read32().

Referenced by cpu_cl_discovery().

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

◆ cpu_cl_get_capability()

static bool cpu_cl_get_capability ( tel_crashlog_devsc_cap_t *  cl_devsc_cap)
static

Definition at line 128 of file crashlog_lib.c.

References BIOS_DEBUG, cpu_crash_version, CRASHLOG_DVSEC_ID, pci_read_config32(), printk, SA_DEV_TMT, TEL_DVSEC_OFFSET, TEL_DVSEC_PCIE_CAP_ID, TEL_DVSEV_DISCOVERY_TABLE_OFFSET, TEL_DVSEV_ID, and TELEMETRY_EXTENDED_CAP_ID.

Referenced by cpu_cl_discovery().

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

◆ cpu_crashlog_support()

bool cpu_crashlog_support ( void  )

Definition at line 291 of file crashlog_lib.c.

References m_cpu_crashLog_support.

◆ pmc_cl_discovery()

◆ pmc_crashlog_support()

bool pmc_crashlog_support ( void  )

Definition at line 297 of file crashlog_lib.c.

References m_pmc_crashLog_support.

◆ reset_discovery_buffers()

void reset_discovery_buffers ( void  )

Definition at line 241 of file crashlog_lib.c.

References cpu_cl_devsc_cap, descriptor_table, discovery_buf, and memset().

Here is the call graph for this function:

◆ update_new_cpu_crashlog_size()

void update_new_cpu_crashlog_size ( u32 cpu_crash_size)

Definition at line 315 of file crashlog_lib.c.

References m_cpu_crashLog_size.

◆ update_new_pmc_crashlog_size()

void update_new_pmc_crashlog_size ( u32 pmc_crash_size)

Definition at line 303 of file crashlog_lib.c.

References m_pmc_crashLog_size.

Variable Documentation

◆ cpu_cl_devsc_cap

tel_crashlog_devsc_cap_t cpu_cl_devsc_cap
static

◆ cpu_cl_disc_tab

cpu_crashlog_discovery_table_t cpu_cl_disc_tab
static

Definition at line 22 of file crashlog_lib.c.

Referenced by cl_get_cpu_discovery_table(), and cpu_cl_gen_discovery_table().

◆ cpu_crash_version

u32 cpu_crash_version
static

Definition at line 18 of file crashlog_lib.c.

Referenced by cpu_cl_get_capability().

◆ descriptor_table

pmc_crashlog_desc_table_t descriptor_table
static

◆ discovery_buf

pmc_ipc_discovery_buf_t discovery_buf
static

◆ m_cpu_crashLog_present

bool m_cpu_crashLog_present
static

◆ m_cpu_crashLog_size

u32 m_cpu_crashLog_size
static

◆ m_cpu_crashLog_support

bool m_cpu_crashLog_support
static

Definition at line 14 of file crashlog_lib.c.

Referenced by cpu_cl_discovery(), and cpu_crashlog_support().

◆ m_pmc_crashLog_present

bool m_pmc_crashLog_present
static

Definition at line 13 of file crashlog_lib.c.

Referenced by cl_pmc_data_present(), and pmc_cl_discovery().

◆ m_pmc_crashLog_size

u32 m_pmc_crashLog_size
static

◆ m_pmc_crashLog_support

bool m_pmc_crashLog_support
static

Definition at line 12 of file crashlog_lib.c.

Referenced by pmc_cl_discovery(), and pmc_crashlog_support().