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

Go to the source code of this file.

Functions

int __weak cl_get_cpu_record_size (void)
 
int __weak cl_get_pmc_record_size (void)
 
u32 __weak cl_get_cpu_bar_addr (void)
 
u32 __weak cl_get_cpu_tmp_bar (void)
 
u32 __weak cl_get_cpu_mb_int_addr (void)
 
int __weak cl_get_total_data_size (void)
 
bool __weak cl_pmc_sram_has_mmio_access (void)
 
bool __weak cpu_crashlog_support (void)
 
bool __weak pmc_crashlog_support (void)
 
bool __weak cl_cpu_data_present (void)
 
bool __weak cl_pmc_data_present (void)
 
__weak void reset_discovery_buffers (void)
 
__weak void update_new_pmc_crashlog_size (u32 *pmc_crash_size)
 
__weak void update_new_cpu_crashlog_size (u32 *cpu_crash_size)
 
pmc_ipc_discovery_buf_t __weak cl_get_pmc_discovery_buf (void)
 
pmc_crashlog_desc_table_t __weak cl_get_pmc_descriptor_table (void)
 
cpu_crashlog_discovery_table_t __weak cl_get_cpu_discovery_table (void)
 
int cpu_cl_poll_mailbox_ready (u32 cl_mailbox_addr)
 
int cpu_cl_mailbox_cmd (u8 cmd, u8 param)
 
int cpu_cl_clear_data (void)
 
int pmc_cl_gen_descriptor_table (u32 desc_table_addr, pmc_crashlog_desc_table_t *descriptor_table)
 
bool __weak pmc_cl_discovery (void)
 
bool __weak cpu_cl_discovery (void)
 
int cl_pmc_re_arm_after_reset (void)
 
int cl_pmc_clear (void)
 
int cl_pmc_en_gen_on_all_reboot (void)
 
bool discover_crashlog (void)
 
bool cl_copy_data_from_sram (u32 src_bar, u32 offset, u32 size, u32 *dest_addr, u32 buffer_index, bool pmc_sram)
 
void cl_get_pmc_sram_data (void)
 
void cl_get_cpu_sram_data (void)
 
void collect_pmc_and_cpu_crashlog_from_srams (void)
 
bool cl_fill_cpu_records (void *cl_record)
 
bool cl_fill_pmc_records (void *cl_record)
 

Function Documentation

◆ cl_copy_data_from_sram()

bool cl_copy_data_from_sram ( u32  src_bar,
u32  offset,
u32  size,
u32 dest_addr,
u32  buffer_index,
bool  pmc_sram 
)

Definition at line 254 of file crashlog.c.

References BIOS_DEBUG, BIOS_ERR, BIT, offset, printk, and read32().

Referenced by cl_get_cpu_sram_data(), and cl_get_pmc_sram_data().

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

◆ cl_cpu_data_present()

bool __weak cl_cpu_data_present ( void  )

Definition at line 54 of file crashlog.c.

◆ cl_fill_cpu_records()

bool cl_fill_cpu_records ( void cl_record)

Definition at line 469 of file crashlog.c.

References BIOS_DEBUG, cbmem_find(), CBMEM_ID_CPU_CRASHLOG, cl_cpu_data_present(), cl_get_cpu_record_size(), m_cpu_crashLog_size, memcpy(), NULL, and printk.

Here is the call graph for this function:

◆ cl_fill_pmc_records()

bool cl_fill_pmc_records ( void cl_record)

Definition at line 487 of file crashlog.c.

References BIOS_DEBUG, cbmem_find(), CBMEM_ID_PMC_CRASHLOG, cl_get_pmc_record_size(), cl_pmc_data_present(), m_pmc_crashLog_size, memcpy(), NULL, and printk.

Here is the call graph for this function:

◆ cl_get_cpu_bar_addr()

u32 __weak cl_get_cpu_bar_addr ( void  )

Definition at line 19 of file crashlog.c.

◆ cl_get_cpu_discovery_table()

cpu_crashlog_discovery_table_t __weak cl_get_cpu_discovery_table ( void  )

Definition at line 84 of file crashlog.c.

References memset().

Here is the call graph for this function:

◆ cl_get_cpu_mb_int_addr()

u32 __weak cl_get_cpu_mb_int_addr ( void  )

Definition at line 29 of file crashlog.c.

◆ cl_get_cpu_record_size()

int __weak cl_get_cpu_record_size ( void  )

Definition at line 9 of file crashlog.c.

◆ cl_get_cpu_sram_data()

void cl_get_cpu_sram_data ( void  )

◆ cl_get_cpu_tmp_bar()

u32 __weak cl_get_cpu_tmp_bar ( void  )

Definition at line 24 of file crashlog.c.

◆ cl_get_pmc_descriptor_table()

pmc_crashlog_desc_table_t __weak cl_get_pmc_descriptor_table ( void  )

Definition at line 77 of file crashlog.c.

References memset().

Here is the call graph for this function:

◆ cl_get_pmc_discovery_buf()

pmc_ipc_discovery_buf_t __weak cl_get_pmc_discovery_buf ( void  )

Definition at line 70 of file crashlog.c.

References memset().

Here is the call graph for this function:

◆ cl_get_pmc_record_size()

int __weak cl_get_pmc_record_size ( void  )

Definition at line 14 of file crashlog.c.

◆ cl_get_pmc_sram_data()

◆ cl_get_total_data_size()

int __weak cl_get_total_data_size ( void  )

Definition at line 34 of file crashlog.c.

References cl_get_cpu_record_size(), and cl_get_pmc_record_size().

Here is the call graph for this function:

◆ cl_pmc_clear()

int cl_pmc_clear ( void  )

Definition at line 193 of file crashlog.c.

References BIOS_ERR, PMC_IPC_CMD_CRASHLOG, PMC_IPC_CMD_ID_CRASHLOG_ERASE, PMC_IPC_CMD_SIZE_SHIFT, pmc_make_ipc_cmd(), pmc_send_ipc_cmd(), and printk.

Referenced by cl_get_pmc_sram_data().

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

◆ cl_pmc_data_present()

bool __weak cl_pmc_data_present ( void  )

Definition at line 59 of file crashlog.c.

◆ cl_pmc_en_gen_on_all_reboot()

int cl_pmc_en_gen_on_all_reboot ( void  )

Definition at line 218 of file crashlog.c.

References BIOS_ERR, PMC_IPC_CMD_CRASHLOG, PMC_IPC_CMD_ID_CRASHLOG_ON_RESET, PMC_IPC_CMD_SIZE_SHIFT, pmc_make_ipc_cmd(), pmc_send_ipc_cmd(), and printk.

Referenced by collect_pmc_and_cpu_crashlog_from_srams().

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

◆ cl_pmc_re_arm_after_reset()

int cl_pmc_re_arm_after_reset ( void  )

Definition at line 170 of file crashlog.c.

References BIOS_ERR, PMC_IPC_CMD_CRASHLOG, PMC_IPC_CMD_ID_CRASHLOG_RE_ARM_ON_RESET, PMC_IPC_CMD_SIZE_SHIFT, pmc_make_ipc_cmd(), pmc_send_ipc_cmd(), and printk.

Referenced by cl_get_pmc_sram_data().

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

◆ cl_pmc_sram_has_mmio_access()

bool __weak cl_pmc_sram_has_mmio_access ( void  )

Definition at line 39 of file crashlog.c.

◆ collect_pmc_and_cpu_crashlog_from_srams()

void collect_pmc_and_cpu_crashlog_from_srams ( void  )

◆ cpu_cl_clear_data()

int cpu_cl_clear_data ( void  )

Definition at line 133 of file crashlog.c.

References cpu_cl_mailbox_cmd(), and CPU_CRASHLOG_CMD_CLEAR.

Referenced by cl_get_cpu_sram_data().

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

◆ cpu_cl_discovery()

bool __weak cpu_cl_discovery ( void  )

Definition at line 165 of file crashlog.c.

◆ cpu_cl_mailbox_cmd()

int cpu_cl_mailbox_cmd ( u8  cmd,
u8  param 
)

Definition at line 112 of file crashlog.c.

References cl_get_cpu_bar_addr(), cl_get_cpu_mb_int_addr(), cpu_cl_poll_mailbox_ready(), memset(), and write32().

Referenced by cpu_cl_clear_data().

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

◆ cpu_cl_poll_mailbox_ready()

int cpu_cl_poll_mailbox_ready ( u32  cl_mailbox_addr)

Definition at line 91 of file crashlog.c.

References BIOS_ERR, CPU_CRASHLOG_MAILBOX_WAIT_STALL, CPU_CRASHLOG_MAILBOX_WAIT_TIMEOUT, printk, read32(), and udelay().

Referenced by cpu_cl_mailbox_cmd().

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

◆ cpu_crashlog_support()

bool __weak cpu_crashlog_support ( void  )

Definition at line 44 of file crashlog.c.

◆ discover_crashlog()

bool discover_crashlog ( void  )

Definition at line 239 of file crashlog.c.

References cpu_cl_discovery(), pmc_cl_discovery(), and reset_discovery_buffers().

Referenced by acpi_soc_get_bert_region().

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

◆ pmc_cl_discovery()

bool __weak pmc_cl_discovery ( void  )

Definition at line 160 of file crashlog.c.

◆ pmc_cl_gen_descriptor_table()

int pmc_cl_gen_descriptor_table ( u32  desc_table_addr,
pmc_crashlog_desc_table_t *  descriptor_table 
)

Definition at line 138 of file crashlog.c.

References BIOS_DEBUG, BIOS_ERR, descriptor_table, printk, and read32().

Referenced by pmc_cl_discovery().

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

◆ pmc_crashlog_support()

bool __weak pmc_crashlog_support ( void  )

Definition at line 49 of file crashlog.c.

◆ reset_discovery_buffers()

__weak void reset_discovery_buffers ( void  )

Definition at line 64 of file crashlog.c.

◆ update_new_cpu_crashlog_size()

__weak void update_new_cpu_crashlog_size ( u32 cpu_crash_size)

Definition at line 68 of file crashlog.c.

◆ update_new_pmc_crashlog_size()

__weak void update_new_pmc_crashlog_size ( u32 pmc_crash_size)

Definition at line 66 of file crashlog.c.