OLD | NEW |
1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /* Non-volatile storage routines for verified boot. | 6 /* Non-volatile storage routines for verified boot. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef VBOOT_REFERENCE_NVSTORAGE_H_ | 9 #ifndef VBOOT_REFERENCE_NVSTORAGE_H_ |
10 #define VBOOT_REFERENCE_NVSTORAGE_H_ | 10 #define VBOOT_REFERENCE_NVSTORAGE_H_ |
(...skipping 29 matching lines...) Expand all Loading... |
40 * Valid range: 0-15. */ | 40 * Valid range: 0-15. */ |
41 VBNV_TRY_B_COUNT, | 41 VBNV_TRY_B_COUNT, |
42 /* Request recovery mode on next boot; see VBNB_RECOVERY_* below for | 42 /* Request recovery mode on next boot; see VBNB_RECOVERY_* below for |
43 * currently defined reason codes. 8-bit value. */ | 43 * currently defined reason codes. 8-bit value. */ |
44 VBNV_RECOVERY_REQUEST, | 44 VBNV_RECOVERY_REQUEST, |
45 /* Localization index for screen bitmaps displayed by firmware. | 45 /* Localization index for screen bitmaps displayed by firmware. |
46 * 8-bit value. */ | 46 * 8-bit value. */ |
47 VBNV_LOCALIZATION_INDEX, | 47 VBNV_LOCALIZATION_INDEX, |
48 /* Field reserved for kernel/user-mode use; 32-bit value. */ | 48 /* Field reserved for kernel/user-mode use; 32-bit value. */ |
49 VBNV_KERNEL_FIELD, | 49 VBNV_KERNEL_FIELD, |
50 /* Firmware checked RW slot B before slot A on the current boot because | |
51 * VBNV_TRY_B_COUNT was non-zero at that time. 0=no; 1=yes. */ | |
52 VBNV_TRIED_FIRMWARE_B, | |
53 /* Firmware verified the kernel key block signature using the key stored | |
54 * in the firmware. 0=no, just used the key block hash; 1=yes, used the | |
55 * key block signature. */ | |
56 VBNV_FW_VERIFIED_KERNEL_KEY, | |
57 /* Verified boot API function which should generate a test error, if | 50 /* Verified boot API function which should generate a test error, if |
58 * error number (below) is non-zero. */ | 51 * error number (below) is non-zero. */ |
59 VBNV_TEST_ERROR_FUNC, | 52 VBNV_TEST_ERROR_FUNC, |
60 /* Verified boot API error to generate for the function, if non-zero. */ | 53 /* Verified boot API error to generate for the function, if non-zero. */ |
61 VBNV_TEST_ERROR_NUM, | 54 VBNV_TEST_ERROR_NUM, |
62 } VbNvParam; | 55 } VbNvParam; |
63 | 56 |
64 | 57 |
65 /* Recovery reason codes for VBNV_RECOVERY_REQUEST */ | 58 /* Recovery reason codes for VBNV_RECOVERY_REQUEST */ |
66 /* Recovery not requested. */ | 59 /* Recovery not requested. */ |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 int VbNvGet(VbNvContext* context, VbNvParam param, uint32_t* dest); | 154 int VbNvGet(VbNvContext* context, VbNvParam param, uint32_t* dest); |
162 | 155 |
163 /* Set a NV storage param to a new value. Returns 0 if success, | 156 /* Set a NV storage param to a new value. Returns 0 if success, |
164 * non-zero if error. | 157 * non-zero if error. |
165 * | 158 * |
166 * This may only be called between VbNvSetup() and VbNvTeardown(). */ | 159 * This may only be called between VbNvSetup() and VbNvTeardown(). */ |
167 int VbNvSet(VbNvContext* context, VbNvParam param, uint32_t value); | 160 int VbNvSet(VbNvContext* context, VbNvParam param, uint32_t value); |
168 | 161 |
169 | 162 |
170 #endif /* VBOOT_REFERENCE_NVSTORAGE_H_ */ | 163 #endif /* VBOOT_REFERENCE_NVSTORAGE_H_ */ |
OLD | NEW |