2020-04-02 23:48:53 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-30 21:01:06 +02:00
|
|
|
|
|
|
|
#include <types.h>
|
2013-08-30 00:57:11 +02:00
|
|
|
#include <ec/google/chromeec/ec.h>
|
2017-10-17 17:02:29 +02:00
|
|
|
#include <security/vboot/vbnv.h>
|
|
|
|
#include <security/vboot/vbnv_layout.h>
|
2012-03-30 21:01:06 +02:00
|
|
|
|
2016-01-26 02:13:27 +01:00
|
|
|
void read_vbnv_ec(uint8_t *vbnv_copy)
|
2012-03-30 21:01:06 +02:00
|
|
|
{
|
2016-07-25 20:48:03 +02:00
|
|
|
google_chromeec_vbnv_context(1, vbnv_copy, VBOOT_VBNV_BLOCK_SIZE);
|
2013-03-02 00:12:26 +01:00
|
|
|
}
|
|
|
|
|
2016-01-26 02:13:27 +01:00
|
|
|
void save_vbnv_ec(const uint8_t *vbnv_copy)
|
2013-03-02 00:12:26 +01:00
|
|
|
{
|
2016-07-25 20:48:03 +02:00
|
|
|
google_chromeec_vbnv_context(0, (uint8_t *)vbnv_copy,
|
|
|
|
VBOOT_VBNV_BLOCK_SIZE);
|
2013-03-02 00:12:26 +01:00
|
|
|
}
|