12 #define BLOB_SIZE VB2_NVDATA_SIZE
44 return (current &
new) ==
new;
53 int used_below, empty_above;
73 while (used_below + 1 < empty_above) {
74 int guess = (used_below + empty_above) / 2;
void * memcpy(void *dest, const void *src, size_t n)
#define printk(level,...)
static struct region_device rdev
int fmap_locate_area_as_rdev_rw(const char *name, struct region_device *area)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
ssize_t rdev_eraseat(const struct region_device *rd, size_t offset, size_t size)
static size_t region_device_sz(const struct region_device *rdev)
ssize_t rdev_writeat(const struct region_device *rd, const void *b, size_t offset, size_t size)
ssize_t rdev_readat(const struct region_device *rd, void *b, size_t offset, size_t size)
int memcmp(const void *s1, const void *s2, size_t n)
struct region_device vbnv_dev
static uint8_t erase_value(void)
static int init_vbnv(void)
void read_vbnv_flash(uint8_t *vbnv_copy)
static int erase_nvram(void)
static int can_overwrite(uint8_t current, uint8_t new)
static struct vbnv_flash_ctx vbnv_flash
void save_vbnv_flash(const uint8_t *vbnv_copy)