summaryrefslogtreecommitdiffstats
path: root/src/security/vboot/vbnv_ec.c
blob: 8ecb5492df14ec23db7f01809fa1f2a9e0727560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#include <types.h>
#include <ec/google/chromeec/ec.h>
#include <security/vboot/vbnv.h>
#include <security/vboot/vbnv_layout.h>

void read_vbnv_ec(uint8_t *vbnv_copy)
{
	google_chromeec_vbnv_context(1, vbnv_copy, VBOOT_VBNV_BLOCK_SIZE);
}

void save_vbnv_ec(const uint8_t *vbnv_copy)
{
	google_chromeec_vbnv_context(0, (uint8_t *)vbnv_copy,
				     VBOOT_VBNV_BLOCK_SIZE);
}