coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vboot_loader.c File Reference
#include <boot_device.h>
#include <cbfs.h>
#include <cbmem.h>
#include <commonlib/bsd/cbfs_private.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include <rmodule.h>
#include <security/vboot/misc.h>
#include <security/vboot/symbols.h>
#include <security/vboot/vboot_common.h>
#include <timestamp.h>
Include dependency graph for vboot_loader.c:

Go to the source code of this file.

Functions

 _Static_assert (CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)+CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)+CONFIG(VBOOT_STARTS_IN_ROMSTAGE)==1, "vboot must start in bootblock, PSP or romstage (but only one!)")
 
 _Static_assert (!CONFIG(VBOOT_SEPARATE_VERSTAGE)||CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)||CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK), "stand-alone verstage must start in or before bootblock ")
 
 _Static_assert (!CONFIG(VBOOT_RETURN_FROM_VERSTAGE)||CONFIG(VBOOT_SEPARATE_VERSTAGE), "return from verstage only makes sense for separate verstages")
 
static void after_verstage (void)
 
void vboot_run_logic (void)
 
const struct cbfs_boot_devicevboot_get_cbfs_boot_device (void)
 

Variables

int vboot_executed
 

Function Documentation

◆ _Static_assert() [1/3]

_Static_assert ( CONFIGVBOOT_RETURN_FROM_VERSTAGE)||CONFIG(VBOOT_SEPARATE_VERSTAGE,
"return from verstage only makes sense for separate verstages"   
)

◆ _Static_assert() [2/3]

_Static_assert ( CONFIGVBOOT_SEPARATE_VERSTAGE)||CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)||CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK,
"stand-alone verstage must start in or before bootblock "   
)

◆ _Static_assert() [3/3]

_Static_assert ( CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)+CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)+CONFIG(VBOOT_STARTS_IN_ROMSTAGE)  = =1,
"vboot must start in  bootblock,
PSP or romstage(but only one!)"   
)

◆ after_verstage()

static void after_verstage ( void  )
static

Definition at line 29 of file vboot_loader.c.

References CB_CBFS_CACHE_FULL, cbfs_init_boot_device(), die(), NULL, vboot_executed, and vboot_get_cbfs_boot_device().

Referenced by vboot_run_logic().

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

◆ vboot_get_cbfs_boot_device()

const struct cbfs_boot_device* vboot_get_cbfs_boot_device ( void  )

Definition at line 73 of file vboot_loader.c.

References boot_device_init(), cbfs_boot_device_find_mcache(), CBMEM_ID_CBFS_RW_MCACHE, NULL, cbfs_boot_device::rdev, region_device_sz(), vboot_get_context(), vboot_locate_firmware(), and vboot_logic_executed().

Referenced by after_verstage(), and cbfs_get_boot_device().

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

◆ vboot_run_logic()

void vboot_run_logic ( void  )

Definition at line 42 of file vboot_loader.c.

References after_verstage(), BIOS_DEBUG, cbfs_prog_stage_load(), CONFIG, die(), printk, PROG_INIT, prog_run(), PROG_VERSTAGE, timestamp_add_now(), TS_COPYVER_END, TS_COPYVER_START, verification_should_run(), verstage_main(), and verstage_should_load().

Referenced by load_postcar_cbfs(), Main(), run_ramstage(), and run_romstage().

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

Variable Documentation

◆ vboot_executed

int vboot_executed

Definition at line 27 of file vboot_loader.c.

Referenced by after_verstage(), and vboot_logic_executed().