summaryrefslogtreecommitdiff
path: root/host/include/crossystem_vbnv.h
blob: 2f246188931b8a97124719197957fdd6c66b1c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * vboot nv storage related functions exported for use by userspace programs
 */

#ifndef VBOOT_REFERENCE_CROSSYSTEM_VBNV_H_
#define VBOOT_REFERENCE_CROSSYSTEM_VBNV_H_

#ifdef __cplusplus
extern "C" {
#endif

struct vb2_context;

/**
 * Attempt to read non-volatile storage using flashrom.
 *
 * Returns 0 if success, non-zero if error.
 */
int vb2_read_nv_storage_flashrom(struct vb2_context *ctx);

/**
 * Attempt to write non-volatile storage using flashrom.
 *
 * Returns 0 if success, non-zero if error.
 */
int vb2_write_nv_storage_flashrom(struct vb2_context* ctx);

#ifdef __cplusplus
}
#endif

#endif  /* VBOOT_REFERENCE_CROSSYSTEM_VBNV_H_ */