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

Go to the source code of this file.

Functions

static void clear_vbnv_battery_cutoff_flag (uint8_t *vbnv_copy)
 
static int restore_from_backup (uint8_t *vbnv_copy)
 
void read_vbnv_cmos (uint8_t *vbnv_copy)
 
void save_vbnv_cmos (const uint8_t *vbnv_copy)
 
void vbnv_init_cmos (uint8_t *vbnv_copy)
 
void lb_table_add_vbnv_cmos (struct lb_header *header)
 

Function Documentation

◆ clear_vbnv_battery_cutoff_flag()

static void clear_vbnv_battery_cutoff_flag ( uint8_t vbnv_copy)
static

Definition at line 11 of file vbnv_cmos.c.

References BIOS_INFO, MISC_FLAGS_BATTERY_CUTOFF_MASK, MISC_FLAGS_OFFSET, printk, and regen_vbnv_crc().

Referenced by restore_from_backup().

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

◆ lb_table_add_vbnv_cmos()

void lb_table_add_vbnv_cmos ( struct lb_header header)

Definition at line 90 of file vbnv_cmos.c.

References header, lb_new_record(), LB_TAG_VBNV, vbnv, and VBOOT_VBNV_BLOCK_SIZE.

Referenced by write_coreboot_table().

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:

◆ restore_from_backup()

static int restore_from_backup ( uint8_t vbnv_copy)
static

Definition at line 28 of file vbnv_cmos.c.

References BIOS_INFO, clear_vbnv_battery_cutoff_flag(), CONFIG, printk, read_vbnv_flash(), save_vbnv_cmos(), and verify_vbnv().

Referenced by read_vbnv_cmos(), and vbnv_init_cmos().

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:

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