![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <commonlib/region.h>
#include <console/console.h>
#include <fmap.h>
#include <string.h>
#include <vb2_api.h>
#include <security/vboot/vboot_common.h>
#include <security/vboot/vbnv.h>
#include <security/vboot/vbnv_layout.h>
Go to the source code of this file.
Data Structures | |
struct | vbnv_flash_ctx |
Macros | |
#define | BLOB_SIZE VB2_NVDATA_SIZE |
Functions | |
static uint8_t | erase_value (void) |
static int | can_overwrite (uint8_t current, uint8_t new) |
static int | init_vbnv (void) |
static int | erase_nvram (void) |
void | read_vbnv_flash (uint8_t *vbnv_copy) |
void | save_vbnv_flash (const uint8_t *vbnv_copy) |
Variables | |
static struct vbnv_flash_ctx | vbnv_flash |
#define BLOB_SIZE VB2_NVDATA_SIZE |
Definition at line 12 of file vbnv_flash.c.
Definition at line 42 of file vbnv_flash.c.
Referenced by save_vbnv_flash().
|
static |
Definition at line 103 of file vbnv_flash.c.
References BIOS_ERR, BIOS_INFO, printk, rdev, rdev_eraseat(), region_device_sz(), vbnv_flash_ctx::vbnv_dev, and vbnv_flash.
Referenced by save_vbnv_flash().
Definition at line 37 of file vbnv_flash.c.
Referenced by init_vbnv().
|
static |
Definition at line 47 of file vbnv_flash.c.
References BIOS_ERR, vbnv_flash_ctx::blob_offset, BLOB_SIZE, buf, vbnv_flash_ctx::cache, erase_value(), fmap_locate_area_as_rdev_rw(), vbnv_flash_ctx::initialized, memcmp(), offset, printk, rdev, rdev_readat(), region_device_sz(), vbnv_flash_ctx::top_offset, vbnv_flash_ctx::vbnv_dev, and vbnv_flash.
Referenced by read_vbnv_flash(), and save_vbnv_flash().
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().
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().
|
static |
Definition at line 1 of file vbnv_flash.c.
Referenced by erase_nvram(), init_vbnv(), read_vbnv_flash(), and save_vbnv_flash().