coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
util.c File Reference
#include <boot/coreboot_tables.h>
#include <device/mmio.h>
#include <cbfs.h>
#include <cf9_reset.h>
#include <commonlib/bsd/compression.h>
#include <commonlib/fsp.h>
#include <console/console.h>
#include <fsp/util.h>
#include <string.h>
#include <types.h>
#include <assert.h>
Include dependency graph for util.c:

Go to the source code of this file.

Functions

static uint32_t fsp_hdr_get_expected_min_length (void)
 
static bool looks_like_fsp_header (struct fsp_header *hdr)
 
enum cb_err fsp_identify (struct fsp_header *hdr, const void *fsp_blob)
 
enum cb_err fsp_validate_component (struct fsp_header *hdr, void *fsp_file, size_t file_size)
 
static bool fsp_reset_requested (uint32_t status)
 
void fsp_handle_reset (uint32_t status)
 
static bool fspm_env (void)
 
static bool fspm_xip (void)
 
enum cb_err fsp_load_component (struct fsp_load_descriptor *fspld, struct fsp_header *hdr)
 
void fsp_get_version (char *buf)
 
void fsp_verify_upd_header_signature (uint64_t upd_signature, uint64_t expected_signature)
 
void lb_string_platform_blob_version (struct lb_header *header)
 
__weak void soc_validate_fspm_header (const struct fsp_header *hdr)
 

Function Documentation

◆ fsp_get_version()

void fsp_get_version ( char *  buf)

Definition at line 166 of file util.c.

References buf, FSP_VER_LEN, fsps_hdr, fsp_revision::revision, and snprintf().

Referenced by lb_string_platform_blob_version().

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

◆ fsp_handle_reset()

void fsp_handle_reset ( uint32_t  status)

Definition at line 92 of file util.c.

References BIOS_SPEW, chipset_handle_reset(), fsp_reset_requested(), full_reset(), printk, and system_reset().

Referenced by do_fsp_memory_init(), fsp_notify(), and fsps_return_value_handler().

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

◆ fsp_hdr_get_expected_min_length()

static uint32_t fsp_hdr_get_expected_min_length ( void  )
static

Definition at line 15 of file util.c.

References CONFIG, and dead_code_t.

Referenced by fsp_identify().

Here is the caller graph for this function:

◆ fsp_identify()

enum cb_err fsp_identify ( struct fsp_header *  hdr,
const void fsp_blob 
)

Definition at line 29 of file util.c.

References BIOS_ALERT, fsp_hdr_get_expected_min_length(), FSP_HDR_SIGNATURE, memcmp(), and printk.

Here is the call graph for this function:

◆ fsp_load_component()

enum cb_err fsp_load_component ( struct fsp_load_descriptor fspld,
struct fsp_header *  hdr 
)

Definition at line 126 of file util.c.

References CONFIG, and fspm_env().

Referenced by fsps_load().

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

◆ fsp_reset_requested()

static bool fsp_reset_requested ( uint32_t  status)
static

Definition at line 86 of file util.c.

Referenced by fsp_handle_reset().

Here is the caller graph for this function:

◆ fsp_validate_component()

enum cb_err fsp_validate_component ( struct fsp_header *  hdr,
void fsp_file,
size_t  file_size 
)

Definition at line 29 of file util.c.

Referenced by fsp_temp_ram_exit(), and fsps_load().

Here is the caller graph for this function:

◆ fsp_verify_upd_header_signature()

void fsp_verify_upd_header_signature ( uint64_t  upd_signature,
uint64_t  expected_signature 
)

Definition at line 180 of file util.c.

References die_with_post_code, and POST_INVALID_VENDOR_BINARY.

Referenced by do_fsp_memory_init(), and do_silicon_init().

Here is the caller graph for this function:

◆ fspm_env()

static bool fspm_env ( void  )
inlinestatic

Definition at line 119 of file util.c.

References ENV_ROMSTAGE.

Referenced by fsp_load_component().

Here is the caller graph for this function:

◆ fspm_xip()

static bool fspm_xip ( void  )
inlinestatic

Definition at line 126 of file util.c.

◆ lb_string_platform_blob_version()

void lb_string_platform_blob_version ( struct lb_header header)

Definition at line 193 of file util.c.

References ALIGN_UP, fsp_get_version(), FSP_VER_LEN, fsp_version, header, lb_new_record(), LB_TAG_PLATFORM_BLOB_VERSION, memcpy(), lb_string::size, lb_string::string, strlen(), and lb_string::tag.

Referenced by write_coreboot_table().

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

◆ looks_like_fsp_header()

static bool looks_like_fsp_header ( struct fsp_header *  hdr)
static

Definition at line 29 of file util.c.

◆ soc_validate_fspm_header()

__weak void soc_validate_fspm_header ( const struct fsp_header *  hdr)

Definition at line 207 of file util.c.