coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vbnv.c File Reference
#include <string.h>
#include <types.h>
#include <security/vboot/vbnv.h>
#include <security/vboot/vbnv_layout.h>
Include dependency graph for vbnv.c:

Go to the source code of this file.

Functions

static uint8_t crc8_vbnv (const uint8_t *data, int len)
 
void vbnv_reset (uint8_t *vbnv_copy)
 
static void vbnv_setup (void)
 
int verify_vbnv (uint8_t *vbnv_copy)
 
void regen_vbnv_crc (uint8_t *vbnv_copy)
 
void read_vbnv (uint8_t *vbnv_copy)
 
void save_vbnv (const uint8_t *vbnv_copy)
 
int vbnv_udc_enable_flag (void)
 
void vbnv_init (uint8_t *vbnv_copy)
 

Variables

static int vbnv_initialized
 
static uint8_t vbnv [VBOOT_VBNV_BLOCK_SIZE]
 

Function Documentation

◆ crc8_vbnv()

static uint8_t crc8_vbnv ( const uint8_t data,
int  len 
)
static

Definition at line 12 of file vbnv.c.

Referenced by regen_vbnv_crc(), and verify_vbnv().

Here is the caller graph for this function:

◆ read_vbnv()

void read_vbnv ( uint8_t vbnv_copy)

Definition at line 60 of file vbnv.c.

References CONFIG, read_vbnv_cmos(), read_vbnv_ec(), read_vbnv_flash(), vbnv_reset(), and verify_vbnv().

Referenced by vbnv_init(), and vbnv_setup().

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

◆ regen_vbnv_crc()

void regen_vbnv_crc ( uint8_t vbnv_copy)

Definition at line 51 of file vbnv.c.

References crc8_vbnv(), and CRC_OFFSET.

Referenced by clear_vbnv_battery_cutoff_flag(), and vbnv_init_cmos().

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

◆ save_vbnv()

void save_vbnv ( const uint8_t vbnv_copy)

Definition at line 78 of file vbnv.c.

References CONFIG, save_vbnv_cmos(), save_vbnv_ec(), save_vbnv_flash(), and vbnv_initialized.

Referenced by vb2ex_commit_data(), and vboot_save_data().

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

◆ vbnv_init()

void vbnv_init ( uint8_t vbnv_copy)

Definition at line 98 of file vbnv.c.

References CONFIG, read_vbnv(), and vbnv_init_cmos().

Referenced by verstage_main().

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

◆ vbnv_reset()

void vbnv_reset ( uint8_t vbnv_copy)

Definition at line 29 of file vbnv.c.

References memset(), and VBOOT_VBNV_BLOCK_SIZE.

Referenced by read_vbnv(), and vbnv_init_cmos().

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

◆ vbnv_setup()

static void vbnv_setup ( void  )
static

Definition at line 35 of file vbnv.c.

References read_vbnv(), vbnv, and vbnv_initialized.

Referenced by vbnv_udc_enable_flag().

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

◆ vbnv_udc_enable_flag()

int vbnv_udc_enable_flag ( void  )

Definition at line 92 of file vbnv.c.

References DEV_ENABLE_UDC, DEV_FLAGS_OFFSET, vbnv, and vbnv_setup().

Referenced by vboot_can_enable_udc().

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

◆ verify_vbnv()

int verify_vbnv ( uint8_t vbnv_copy)

Definition at line 44 of file vbnv.c.

References crc8_vbnv(), CRC_OFFSET, HEADER_MASK, HEADER_OFFSET, and HEADER_SIGNATURE.

Referenced by read_vbnv(), read_vbnv_cmos(), and restore_from_backup().

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

Variable Documentation

◆ vbnv

◆ vbnv_initialized

int vbnv_initialized
static

Definition at line 8 of file vbnv.c.

Referenced by save_vbnv(), and vbnv_setup().