![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <device/mmio.h>
#include <fsp/util.h>
#include <intelblocks/pmc_ipc.h>
#include <types.h>
#include <arch/io.h>
Go to the source code of this file.
Data Structures | |
struct | __packed |
Macros | |
#define | PMC_IPC_CMD_CRASHLOG 0xA6 |
#define | PMC_IPC_CMD_ID_CRASHLOG_DISCOVERY 0x01 |
#define | PMC_IPC_CMD_ID_CRASHLOG_DISABLE 0x02 |
#define | PMC_IPC_CMD_ID_CRASHLOG_ERASE 0x04 |
#define | PMC_IPC_CMD_ID_CRASHLOG_ON_RESET 0x05 |
#define | PMC_IPC_CMD_ID_CRASHLOG_RE_ARM_ON_RESET 0x06 |
#define | CPU_CRASHLOG_CMD_DISABLE 0 |
#define | CPU_CRASHLOG_CMD_CLEAR 2 |
#define | CPU_CRASHLOG_MAILBOX_WAIT_STALL 1 |
#define | CPU_CRASHLOG_MAILBOX_WAIT_TIMEOUT 1000 |
#define | CPU_CRASHLOG_DISC_TAB_GUID_VALID 0x1600 |
#define | CRASHLOG_SIZE_DEBUG_PURPOSE 0x640 |
Variables | |
static const EFI_GUID | FW_ERR_SECTION_GUID |
#define CPU_CRASHLOG_CMD_CLEAR 2 |
Definition at line 25 of file crashlog.h.
#define CPU_CRASHLOG_CMD_DISABLE 0 |
Definition at line 24 of file crashlog.h.
#define CPU_CRASHLOG_DISC_TAB_GUID_VALID 0x1600 |
Definition at line 28 of file crashlog.h.
#define CPU_CRASHLOG_MAILBOX_WAIT_STALL 1 |
Definition at line 26 of file crashlog.h.
#define CPU_CRASHLOG_MAILBOX_WAIT_TIMEOUT 1000 |
Definition at line 27 of file crashlog.h.
#define CRASHLOG_SIZE_DEBUG_PURPOSE 0x640 |
Definition at line 30 of file crashlog.h.
#define PMC_IPC_CMD_CRASHLOG 0xA6 |
Definition at line 16 of file crashlog.h.
#define PMC_IPC_CMD_ID_CRASHLOG_DISABLE 0x02 |
Definition at line 18 of file crashlog.h.
#define PMC_IPC_CMD_ID_CRASHLOG_DISCOVERY 0x01 |
Definition at line 17 of file crashlog.h.
#define PMC_IPC_CMD_ID_CRASHLOG_ERASE 0x04 |
Definition at line 19 of file crashlog.h.
#define PMC_IPC_CMD_ID_CRASHLOG_ON_RESET 0x05 |
Definition at line 20 of file crashlog.h.
#define PMC_IPC_CMD_ID_CRASHLOG_RE_ARM_ON_RESET 0x06 |
Definition at line 21 of file crashlog.h.
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().
Definition at line 255 of file crashlog.c.
References m_cpu_crashLog_present.
Referenced by cl_fill_cpu_records(), and collect_pmc_and_cpu_crashlog_from_srams().
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.
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.
Definition at line 94 of file crashlog.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 cl_get_cpu_sram_data(), cpu_cl_gen_discovery_table(), and cpu_cl_mailbox_cmd().
cpu_crashlog_discovery_table_t cl_get_cpu_discovery_table | ( | void | ) |
Definition at line 280 of file crashlog.c.
References cpu_cl_disc_tab, and memset().
Referenced by cl_get_cpu_sram_data().
Definition at line 24 of file crashlog.c.
References CRASHLOG_MAILBOX_INTF_ADDRESS.
Referenced by cpu_cl_mailbox_cmd().
int cl_get_cpu_record_size | ( | void | ) |
Definition at line 250 of file crashlog.c.
References m_cpu_crashLog_size.
Referenced by cl_fill_cpu_records(), cl_get_cpu_sram_data(), cl_get_total_data_size(), and collect_pmc_and_cpu_crashlog_from_srams().
Definition at line 386 of file crashlog.c.
References BIOS_DEBUG, BIOS_ERR, cbmem_add(), CBMEM_ID_CPU_CRASHLOG, cl_copy_data_from_sram(), cl_get_cpu_bar_addr(), cl_get_cpu_discovery_table(), cl_get_cpu_record_size(), cpu_cl_clear_data(), cpu_cl_disc_tab, m_cpu_crashLog_size, memset(), NULL, printk, and update_new_cpu_crashlog_size().
Referenced by collect_pmc_and_cpu_crashlog_from_srams().
Definition at line 112 of file crashlog.c.
References SPI_BASE_ADDRESS.
Referenced by cl_get_pmc_sram_data().
pmc_crashlog_desc_table_t cl_get_pmc_descriptor_table | ( | void | ) |
Definition at line 240 of file crashlog.c.
References descriptor_table, and memset().
Referenced by cl_get_pmc_sram_data().
pmc_ipc_discovery_buf_t cl_get_pmc_discovery_buf | ( | void | ) |
Definition at line 235 of file crashlog.c.
References discovery_buf, and memset().
Referenced by cl_get_pmc_sram_data().
int cl_get_pmc_record_size | ( | void | ) |
Definition at line 245 of file crashlog.c.
References m_pmc_crashLog_size.
Referenced by cl_fill_pmc_records(), cl_get_pmc_sram_data(), cl_get_total_data_size(), and collect_pmc_and_cpu_crashlog_from_srams().
Definition at line 294 of file crashlog.c.
References BIOS_DEBUG, BIOS_ERR, BIT, cbmem_add(), CBMEM_ID_PMC_CRASHLOG, cl_copy_data_from_sram(), cl_get_cpu_tmp_bar(), cl_get_pmc_descriptor_table(), cl_get_pmc_discovery_buf(), cl_get_pmc_record_size(), cl_pmc_clear(), cl_pmc_re_arm_after_reset(), cl_pmc_sram_has_mmio_access(), descriptor_table, discovery_buf, memset(), NULL, printk, and update_new_pmc_crashlog_size().
Referenced by collect_pmc_and_cpu_crashlog_from_srams().
int cl_get_total_data_size | ( | void | ) |
Definition at line 230 of file crashlog.c.
References cl_get_cpu_record_size(), cl_get_pmc_record_size(), m_cpu_crashLog_size, and m_pmc_crashLog_size.
Referenced by acpi_soc_get_bert_region().
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().
Definition at line 260 of file crashlog.c.
References m_pmc_crashLog_present.
Referenced by cl_fill_pmc_records(), and collect_pmc_and_cpu_crashlog_from_srams().
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().
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().
Definition at line 117 of file crashlog.c.
References BIOS_ERR, PCH_DEV_SRAM, pci_read_config16(), PCI_VENDOR_ID, and printk.
Referenced by cl_get_pmc_sram_data().
Definition at line 445 of file crashlog.c.
References BIOS_DEBUG, cl_cpu_data_present(), cl_get_cpu_record_size(), cl_get_cpu_sram_data(), cl_get_pmc_record_size(), cl_get_pmc_sram_data(), cl_pmc_data_present(), cl_pmc_en_gen_on_all_reboot(), CONFIG, cpu_crashlog_support(), pmc_crashlog_support(), and printk.
Referenced by acpi_soc_get_bert_region().
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().
Definition at line 199 of file crashlog.c.
References resource::base, BIOS_DEBUG, BIOS_ERR, cpu_cl_devsc_cap, cpu_cl_gen_discovery_table(), cpu_cl_get_capability(), find_resource(), m_cpu_crashLog_present, m_cpu_crashLog_support, memset(), PCH_PWRM_BASE_ADDRESS, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_COMMAND, PCI_COMMAND_MEMORY, pci_or_config16(), pci_write_config32(), printk, SA_DEV_TMT, TEL_DVSEC_TBIR_BAR0, and TEL_DVSEC_TBIR_BAR1.
Referenced by discover_crashlog().
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().
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().
Definition at line 265 of file crashlog.c.
References m_cpu_crashLog_support.
Referenced by collect_pmc_and_cpu_crashlog_from_srams().
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().
Definition at line 29 of file crashlog.c.
References BIOS_DEBUG, BIOS_ERR, BIOS_INFO, BIT, pmc_ipc_buffer::buf, descriptor_table, discovery_buf, m_pmc_crashLog_present, m_pmc_crashLog_size, m_pmc_crashLog_support, NULL, PCH_DEV_SRAM, PCI_BASE_ADDRESS_0, PCI_COMMAND, PCI_COMMAND_MEMORY, pci_or_config16(), pci_write_config32(), pmc_cl_gen_descriptor_table(), PMC_IPC_CMD_CRASHLOG, PMC_IPC_CMD_ID_CRASHLOG_DISCOVERY, PMC_IPC_CMD_SIZE_SHIFT, pmc_make_ipc_cmd(), pmc_send_ipc_cmd(), printk, and SPI_BASE_ADDRESS.
Referenced by discover_crashlog().
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().
Definition at line 270 of file crashlog.c.
References m_pmc_crashLog_support.
Referenced by collect_pmc_and_cpu_crashlog_from_srams().
Definition at line 223 of file crashlog.c.
References cpu_cl_devsc_cap, descriptor_table, discovery_buf, and memset().
Referenced by discover_crashlog().
Definition at line 285 of file crashlog.c.
References m_cpu_crashLog_size.
Referenced by cl_get_cpu_sram_data().
Definition at line 275 of file crashlog.c.
References m_pmc_crashLog_size.
Referenced by cl_get_pmc_sram_data().
|
static |
Definition at line 178 of file crashlog.h.