1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __VBOOT_VBNV_H__
4 #define __VBOOT_VBNV_H__
8 /* Generic functions */
9 void read_vbnv(uint8_t *vbnv_copy
);
10 void save_vbnv(const uint8_t *vbnv_copy
);
11 int verify_vbnv(uint8_t *vbnv_copy
);
12 void regen_vbnv_crc(uint8_t *vbnv_copy
);
14 /* Read the USB Device Controller(UDC) enable flag from VBNV. */
15 int vbnv_udc_enable_flag(void);
17 /* Initialize and read vbnv. This is used in the main vboot logic path. */
19 /* Reset vbnv snapshot to a known state. */
20 void vbnv_reset(uint8_t *vbnv_copy
);
23 /* Initialize the vbnv CMOS backing store. The vbnv_copy pointer is used for
24 optional temporary storage in the init function. */
25 void vbnv_init_cmos(uint8_t *vbnv_copy
);
26 /* Platform-specific CMOS init function, called by vbnv_init_cmos(). */
27 void vbnv_platform_init_cmos(void);
28 /* Return non-zero if CMOS power was lost. */
29 int vbnv_cmos_failed(void);
30 void read_vbnv_cmos(uint8_t *vbnv_copy
);
31 void save_vbnv_cmos(const uint8_t *vbnv_copy
);
34 void read_vbnv_flash(uint8_t *vbnv_copy
);
35 void save_vbnv_flash(const uint8_t *vbnv_copy
);
38 void read_vbnv_ec(uint8_t *vbnv_copy
);
39 void save_vbnv_ec(const uint8_t *vbnv_copy
);
41 #endif /* __VBOOT_VBNV_H__ */