coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
util.h File Reference
#include <arch/cpu.h>
#include <fsp/api.h>
#include <fsp/soc_binding.h>
#include <program_loading.h>
#include <commonlib/region.h>
Include dependency graph for util.h:

Go to the source code of this file.

Macros

#define EFI_HOB_TYPE_HANDOFF   0x0001
 
#define EFI_HOB_TYPE_MEMORY_POOL   0x0007
 
#define FSP_IMAGE_SIG_LOC   0
 
#define FSP_IMAGE_ID_LOC   16
 
#define FSP_IMAGE_BASE_LOC   28
 
#define FSP_IMAGE_ATTRIBUTE_LOC   32
 
#define GRAPHICS_SUPPORT_BIT   (1 << 0)
 
#define ERROR_NO_FV_SIG   1
 
#define ERROR_NO_FFS_GUID   2
 
#define ERROR_NO_INFO_HEADER   3
 
#define ERROR_IMAGEBASE_MISMATCH   4
 
#define ERROR_INFO_HEAD_SIG_MISMATCH   5
 
#define ERROR_FSP_SIG_MISMATCH   6
 
#define ERROR_FSP_REV_MISMATCH   7
 

Functions

FSP_INFO_HEADER * find_fsp (uintptr_t fsp_base_address)
 
void fsp_set_runtime (FSP_INFO_HEADER *fih, void *hob_list)
 
void fsp_update_fih (FSP_INFO_HEADER *fih)
 
FSP_INFO_HEADER * fsp_get_fih (void)
 
voidfsp_get_hob_list (void)
 
void fsp_early_init (FSP_INFO_HEADER *fsp_info)
 
void fsp_notify (u32 phase)
 
void print_hob_type_structure (u16 hob_type, void *hob_list_ptr)
 
void print_fsp_info (FSP_INFO_HEADER *fsp_header)
 
voidget_resource_hob (const EFI_GUID *guid, const void *hob_start)
 
void fsp_display_upd_value (const char *name, uint32_t size, uint64_t old, uint64_t new)
 
void report_fsp_output (void)
 
static uint32_t fsp_version (FSP_INFO_HEADER *fih)
 
int fsp_relocate (struct prog *fsp_relocd)
 
voidget_hob_list (void)
 
voidget_guid_hob (const EFI_GUID *guid, const void *hob_start)
 
asmlinkage void chipset_teardown_car_main (void)
 

Macro Definition Documentation

◆ EFI_HOB_TYPE_HANDOFF

#define EFI_HOB_TYPE_HANDOFF   0x0001

Definition at line 57 of file util.h.

◆ EFI_HOB_TYPE_MEMORY_POOL

#define EFI_HOB_TYPE_MEMORY_POOL   0x0007

Definition at line 58 of file util.h.

◆ ERROR_FSP_REV_MISMATCH

#define ERROR_FSP_REV_MISMATCH   7

Definition at line 73 of file util.h.

◆ ERROR_FSP_SIG_MISMATCH

#define ERROR_FSP_SIG_MISMATCH   6

Definition at line 72 of file util.h.

◆ ERROR_IMAGEBASE_MISMATCH

#define ERROR_IMAGEBASE_MISMATCH   4

Definition at line 70 of file util.h.

◆ ERROR_INFO_HEAD_SIG_MISMATCH

#define ERROR_INFO_HEAD_SIG_MISMATCH   5

Definition at line 71 of file util.h.

◆ ERROR_NO_FFS_GUID

#define ERROR_NO_FFS_GUID   2

Definition at line 68 of file util.h.

◆ ERROR_NO_FV_SIG

#define ERROR_NO_FV_SIG   1

Definition at line 67 of file util.h.

◆ ERROR_NO_INFO_HEADER

#define ERROR_NO_INFO_HEADER   3

Definition at line 69 of file util.h.

◆ FSP_IMAGE_ATTRIBUTE_LOC

#define FSP_IMAGE_ATTRIBUTE_LOC   32

Definition at line 64 of file util.h.

◆ FSP_IMAGE_BASE_LOC

#define FSP_IMAGE_BASE_LOC   28

Definition at line 63 of file util.h.

◆ FSP_IMAGE_ID_LOC

#define FSP_IMAGE_ID_LOC   16

Definition at line 62 of file util.h.

◆ FSP_IMAGE_SIG_LOC

#define FSP_IMAGE_SIG_LOC   0

Definition at line 61 of file util.h.

◆ GRAPHICS_SUPPORT_BIT

#define GRAPHICS_SUPPORT_BIT   (1 << 0)

Definition at line 65 of file util.h.

Function Documentation

◆ chipset_teardown_car_main()

asmlinkage void chipset_teardown_car_main ( void  )

Definition at line 8 of file temp_ram_exit.c.

References BIOS_CRIT, BIOS_DEBUG, cbfs_map(), cbmem_initialize(), die(), find_fsp(), FSP_SUCCESS, NULL, and printk.

Here is the call graph for this function:

◆ find_fsp()

FSP_INFO_HEADER* find_fsp ( uintptr_t  fsp_base_address)

◆ fsp_display_upd_value()

void fsp_display_upd_value ( const char *  name,
uint32_t  size,
uint64_t  old,
uint64_t  new 
)

Definition at line 226 of file fsp_util.c.

References BIOS_SPEW, name, and printk.

Referenced by soc_display_fspm_upd_params(), soc_display_memory_init_params(), and soc_display_silicon_init_params().

Here is the caller graph for this function:

◆ fsp_early_init()

void fsp_early_init ( FSP_INFO_HEADER *  fsp_info)

◆ fsp_get_fih()

FSP_INFO_HEADER* fsp_get_fih ( void  )

Definition at line 190 of file fsp_util.c.

References cbmem_find(), CBMEM_ID_FSP_RUNTIME, fsp_runtime::fih, and NULL.

Referenced by fsp_notify(), and intel_silicon_init().

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

◆ fsp_get_hob_list()

void* fsp_get_hob_list ( void  )

Definition at line 202 of file fsp_util.c.

◆ fsp_notify()

void fsp_notify ( u32  phase)

Definition at line 114 of file fsp_util.c.

References BIOS_ERR, die(), find_fsp(), fsp_get_fih(), NULL, post_code, POST_FSP_NOTIFY_BEFORE_ENUMERATE, POST_FSP_NOTIFY_BEFORE_FINALIZE, printk, timestamp_add_now(), TS_FSP_ENUMERATE_END, TS_FSP_ENUMERATE_START, TS_FSP_FINALIZE_END, and TS_FSP_FINALIZE_START.

Referenced by fsp_notify_boot_state_callback().

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

◆ fsp_relocate()

int fsp_relocate ( struct prog fsp_relocd)

Definition at line 9 of file fsp_relocate.c.

References BIOS_ERR, cbfs_cbmem_alloc(), CBMEM_ID_REFCODE, fsp1_1_relocate(), NULL, printk, prog_name(), prog_set_area(), and prog_set_entry().

Referenced by fsp_load().

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

◆ fsp_set_runtime()

void fsp_set_runtime ( FSP_INFO_HEADER *  fih,
void hob_list 
)

Definition at line 177 of file fsp_util.c.

References cbmem_add(), CBMEM_ID_FSP_RUNTIME, die(), fsp_runtime::fih, fsp_runtime::hob_list, and NULL.

Referenced by raminit().

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

◆ fsp_update_fih()

void fsp_update_fih ( FSP_INFO_HEADER *  fih)

Definition at line 214 of file fsp_util.c.

References cbmem_find(), CBMEM_ID_FSP_RUNTIME, die(), fsp_runtime::fih, and NULL.

Referenced by fsp_load().

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

◆ fsp_version()

static uint32_t fsp_version ( FSP_INFO_HEADER *  fih)
inlinestatic

Definition at line 33 of file util.h.

◆ get_guid_hob()

void* get_guid_hob ( const EFI_GUID *  guid,
const void hob_start 
)

Definition at line 48 of file hob.c.

References compare_guid(), get_next_hob(), and NULL.

Referenced by display_hob_info(), fsp_run_silicon_init(), mainboard_save_dimm_info(), raminit(), and set_dimm_info().

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

◆ get_hob_list()

void* get_hob_list ( void  )

Definition at line 16 of file hob.c.

References die(), fsp_get_hob_list(), and NULL.

Referenced by display_hob_info(), and fsp_run_silicon_init().

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

◆ get_resource_hob()

void* get_resource_hob ( const EFI_GUID *  guid,
const void hob_start 
)

Definition at line 65 of file hob.c.

References compare_guid(), get_next_hob(), and NULL.

Referenced by raminit().

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

◆ print_fsp_info()

void print_fsp_info ( FSP_INFO_HEADER *  fsp_header)

Definition at line 74 of file fsp_util.c.

References BIOS_INFO, BIOS_SPEW, and printk.

Referenced by cache_as_ram_stage_main(), and fsp_run_silicon_init().

Here is the caller graph for this function:

◆ print_hob_type_structure()

void print_hob_type_structure ( u16  hob_type,
void hob_list_ptr 
)

Definition at line 235 of file hob.c.

References BIOS_DEBUG, get_hob_type_string(), print_hob_mem_attributes(), print_hob_resource_attributes(), and printk.

Referenced by display_hob_info(), and raminit().

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

◆ report_fsp_output()

void report_fsp_output ( void  )

Definition at line 11 of file fsp_report.c.

References _car_region_size, _car_region_start, BIOS_DEBUG, BIOS_ERR, region::offset, printk, region_is_subregion(), region::size, temp_memory_end, and temp_memory_start.

Referenced by bootblock_soc_init().

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