coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
bert_storage.h File Reference
#include <acpi/acpi.h>
#include <types.h>
Include dependency graph for bert_storage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRASHLOG_RECORD_TYPE   0x2
 
#define CRASHLOG_FW_ERR_REV   0x2
 
#define section_of_acpientry(A, B)   ((typeof(A))((u8 *)(B) + sizeof(*(B))))
 

Functions

void bert_reserved_region (void **start, size_t *size)
 
void bert_errors_region (void **start, size_t *size)
 
size_t bert_storage_remaining (void)
 
bool bert_errors_present (void)
 
static bool bert_should_generate_acpi_table (void)
 
static size_t bert_entry_count (acpi_generic_error_status_t *status)
 
static void bert_bump_entry_count (acpi_generic_error_status_t *status)
 
static acpi_hest_generic_data_v300_tacpi_hest_generic_data3 (acpi_generic_error_status_t *status)
 
cper_ia32x64_context_tnew_cper_ia32x64_ctx (acpi_generic_error_status_t *status, cper_ia32x64_proc_error_section_t *x86err, int type, int num)
 
cper_ia32x64_context_tcper_new_ia32x64_context_msr (acpi_generic_error_status_t *status, cper_ia32x64_proc_error_section_t *x86err, u32 addr, int num)
 
cper_ia32x64_proc_error_info_tnew_cper_ia32x64_check (acpi_generic_error_status_t *status, cper_ia32x64_proc_error_section_t *x86err, enum cper_x86_check_type type)
 
acpi_hest_generic_data_v300_tbert_append_error_datasection (acpi_generic_error_status_t *status, guid_t *guid)
 
acpi_hest_generic_data_v300_tbert_append_genproc (acpi_generic_error_status_t *status)
 
acpi_hest_generic_data_v300_tbert_append_ia32x64 (acpi_generic_error_status_t *status)
 
voidnew_cper_fw_error_crashlog (acpi_generic_error_status_t *status, size_t cl_size)
 
acpi_hest_generic_data_v300_tbert_append_fw_err (acpi_generic_error_status_t *status)
 
acpi_generic_error_status_tbert_new_event (guid_t *guid)
 

Macro Definition Documentation

◆ CRASHLOG_FW_ERR_REV

#define CRASHLOG_FW_ERR_REV   0x2

Definition at line 45 of file bert_storage.h.

◆ CRASHLOG_RECORD_TYPE

#define CRASHLOG_RECORD_TYPE   0x2

Definition at line 44 of file bert_storage.h.

◆ section_of_acpientry

#define section_of_acpientry (   A,
 
)    ((typeof(A))((u8 *)(B) + sizeof(*(B))))

Definition at line 91 of file bert_storage.h.

Function Documentation

◆ acpi_hest_generic_data3()

static acpi_hest_generic_data_v300_t* acpi_hest_generic_data3 ( acpi_generic_error_status_t status)
inlinestatic

Definition at line 83 of file bert_storage.h.

Referenced by build_bert_mca_error().

Here is the caller graph for this function:

◆ bert_append_error_datasection()

acpi_hest_generic_data_v300_t* bert_append_error_datasection ( acpi_generic_error_status_t status,
guid_t *  guid 
)

Definition at line 242 of file acpi_bert_storage.c.

References bert_allocate_storage(), bert_storage_remaining(), guidcpy(), new_generic_error_entry(), NULL, revise_error_sizes(), acpi_hest_generic_data_v300::section_type, and sizeof_error_section().

Referenced by bert_append_fw_err(), bert_append_genproc(), and bert_append_ia32x64().

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

◆ bert_append_fw_err()

◆ bert_append_genproc()

◆ bert_append_ia32x64()

◆ bert_bump_entry_count()

static void bert_bump_entry_count ( acpi_generic_error_status_t status)
inlinestatic

Definition at line 73 of file bert_storage.h.

References bert_entry_count(), acpi_generic_error_status::block_status, count, GENERIC_ERR_STS_ENTRY_COUNT_MASK, and GENERIC_ERR_STS_ENTRY_COUNT_SHIFT.

Referenced by new_generic_error_entry().

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

◆ bert_entry_count()

static size_t bert_entry_count ( acpi_generic_error_status_t status)
inlinestatic

◆ bert_errors_present()

bool bert_errors_present ( void  )

Definition at line 37 of file acpi_bert_storage.c.

References bert_region_broken, and bert_region_used.

Referenced by bert_should_generate_acpi_table().

Here is the caller graph for this function:

◆ bert_errors_region()

void bert_errors_region ( void **  start,
size_t size 
)

Definition at line 42 of file acpi_bert_storage.c.

References bert_region_base, bert_region_broken, bert_region_used, and NULL.

Referenced by acpi_soc_get_bert_region().

Here is the caller graph for this function:

◆ bert_new_event()

acpi_generic_error_status_t* bert_new_event ( guid_t *  guid)

◆ bert_reserved_region()

void bert_reserved_region ( void **  start,
size_t size 
)

Definition at line 573 of file acpi_bert_storage.c.

References BERT_REGION_MAX_SIZE, BIOS_DEBUG, BIOS_ERR, BIOS_INFO, cbmem_add(), CBMEM_ID_ACPI_BERT, cbmem_top(), CONFIG, NULL, and printk.

Referenced by bert_storage_setup().

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

◆ bert_should_generate_acpi_table()

static bool bert_should_generate_acpi_table ( void  )
inlinestatic

Definition at line 60 of file bert_storage.h.

References bert_errors_present(), and CONFIG.

Referenced by acpi_soc_get_bert_region().

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

◆ bert_storage_remaining()

size_t bert_storage_remaining ( void  )

Definition at line 32 of file acpi_bert_storage.c.

References bert_region_broken, bert_region_size, and bert_region_used.

Referenced by bert_append_error_datasection(), bert_new_event(), and build_bert_mca_error().

Here is the caller graph for this function:

◆ cper_new_ia32x64_context_msr()

cper_ia32x64_context_t* cper_new_ia32x64_context_msr ( acpi_generic_error_status_t status,
cper_ia32x64_proc_error_section_t x86err,
u32  addr,
int  num 
)

Definition at line 547 of file acpi_bert_storage.c.

References addr, cper_ia32x64_context::array_size, CPER_IA32X64_CTX_MSR, cper_ia32x64_context::msr_addr, new_cper_ia32x64_ctx(), NULL, and rdmsr().

Referenced by build_bert_mca_error().

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

◆ new_cper_fw_error_crashlog()

void* new_cper_fw_error_crashlog ( acpi_generic_error_status_t status,
size_t  cl_size 
)

Definition at line 199 of file acpi_bert_storage.c.

References bert_allocate_storage(), BIOS_ERR, NULL, printk, and revise_error_sizes().

Here is the call graph for this function:

◆ new_cper_ia32x64_check()

◆ new_cper_ia32x64_ctx()