2012-03-30 21:01:06 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <types.h>
|
2013-08-30 00:57:11 +02:00
|
|
|
#include <ec/google/chromeec/ec.h>
|
2016-07-25 20:48:03 +02:00
|
|
|
#include <vboot/vbnv.h>
|
|
|
|
#include <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
|
|
|
}
|