| 1 | /* Copyright 2016 The ChromiumOS Authors |
| 2 | * Use of this source code is governed by a BSD-style license that can be |
| 3 | * found in the LICENSE file. |
| 4 | * |
| 5 | * vboot nv storage related functions exported for use by userspace programs |
| 6 | */ |
| 7 | |
| 8 | #ifndef VBOOT_REFERENCE_CROSSYSTEM_VBNV_H_ |
| 9 | #define VBOOT_REFERENCE_CROSSYSTEM_VBNV_H_ |
| 10 | |
| 11 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif |
| 14 | |
| 15 | struct vb2_context; |
| 16 | |
| 17 | /** |
| 18 | * Attempt to read non-volatile storage using flashrom. |
| 19 | * |
| 20 | * Returns 0 if success, non-zero if error. |
| 21 | */ |
| 22 | int vb2_read_nv_storage_flashrom(struct vb2_context *ctx); |
| 23 | |
| 24 | /** |
| 25 | * Attempt to write non-volatile storage using flashrom. |
| 26 | * |
| 27 | * Returns 0 if success, non-zero if error. |
| 28 | */ |
| 29 | int vb2_write_nv_storage_flashrom(struct vb2_context* ctx); |
| 30 | |
| 31 | #ifdef __cplusplus |
| 32 | } |
| 33 | #endif |
| 34 | |
| 35 | #endif /* VBOOT_REFERENCE_CROSSYSTEM_VBNV_H_ */ |