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

Go to the source code of this file.

Functions

void read_vbnv (uint8_t *vbnv_copy)
 
void save_vbnv (const uint8_t *vbnv_copy)
 
int verify_vbnv (uint8_t *vbnv_copy)
 
void regen_vbnv_crc (uint8_t *vbnv_copy)
 
int vbnv_udc_enable_flag (void)
 
void vbnv_init (uint8_t *vbnv_copy)
 
void vbnv_reset (uint8_t *vbnv_copy)
 
void vbnv_init_cmos (uint8_t *vbnv_copy)
 
int vbnv_cmos_failed (void)
 
void read_vbnv_cmos (uint8_t *vbnv_copy)
 
void save_vbnv_cmos (const uint8_t *vbnv_copy)
 
void read_vbnv_flash (uint8_t *vbnv_copy)
 
void save_vbnv_flash (const uint8_t *vbnv_copy)
 
void read_vbnv_ec (uint8_t *vbnv_copy)
 
void save_vbnv_ec (const uint8_t *vbnv_copy)
 

Function Documentation

◆ 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:

◆ read_vbnv_cmos()

void read_vbnv_cmos ( uint8_t vbnv_copy)

Definition at line 48 of file vbnv_cmos.c.

References cmos_read(), restore_from_backup(), VBOOT_VBNV_BLOCK_SIZE, and verify_vbnv().

Referenced by cmos_init_vbnv(), and read_vbnv().

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

◆ read_vbnv_ec()

void read_vbnv_ec ( uint8_t vbnv_copy)

Definition at line 8 of file vbnv_ec.c.

References google_chromeec_vbnv_context(), and VBOOT_VBNV_BLOCK_SIZE.

Referenced by read_vbnv().

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

◆ read_vbnv_flash()

void read_vbnv_flash ( uint8_t vbnv_copy)

Definition at line 117 of file vbnv_flash.c.

References BLOB_SIZE, vbnv_flash_ctx::cache, init_vbnv(), vbnv_flash_ctx::initialized, memcpy(), and vbnv_flash.

Referenced by read_vbnv(), and restore_from_backup().

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:

◆ save_vbnv_cmos()

void save_vbnv_cmos ( const uint8_t vbnv_copy)

Definition at line 62 of file vbnv_cmos.c.

References cmos_write(), and VBOOT_VBNV_BLOCK_SIZE.

Referenced by cmos_init_vbnv(), restore_from_backup(), save_vbnv(), and vbnv_init_cmos().

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

◆ save_vbnv_ec()

void save_vbnv_ec ( const uint8_t vbnv_copy)

Definition at line 13 of file vbnv_ec.c.

References google_chromeec_vbnv_context(), and VBOOT_VBNV_BLOCK_SIZE.

Referenced by save_vbnv().

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

◆ save_vbnv_flash()

void save_vbnv_flash ( const uint8_t vbnv_copy)

Definition at line 128 of file vbnv_flash.c.

References BIOS_ERR, vbnv_flash_ctx::blob_offset, BLOB_SIZE, vbnv_flash_ctx::cache, can_overwrite(), erase_nvram(), init_vbnv(), vbnv_flash_ctx::initialized, memcmp(), memcpy(), printk, rdev, rdev_writeat(), vbnv_flash_ctx::top_offset, vbnv_flash_ctx::vbnv_dev, and vbnv_flash.

Referenced by save_vbnv().

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

◆ vbnv_cmos_failed()

int vbnv_cmos_failed ( void  )

◆ 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_init_cmos()

void vbnv_init_cmos ( uint8_t vbnv_copy)

Definition at line 70 of file vbnv_cmos.c.

References HEADER_FIRMWARE_SETTINGS_RESET, HEADER_KERNEL_SETTINGS_RESET, HEADER_OFFSET, HEADER_SIGNATURE, regen_vbnv_crc(), restore_from_backup(), save_vbnv_cmos(), vbnv_cmos_failed(), and vbnv_reset().

Referenced by vbnv_init().

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_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: