Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: src/platform/vboot_reference/vboot_firmware/include/utility.h

Issue 2283005: Modifying the kernel_utility tool to create our magic blob. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: respond to feedback Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 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 /* Helper functions/wrappers for memory allocations, manipulation and 6 /* Helper functions/wrappers for memory allocations, manipulation and
7 * comparison. 7 * comparison.
8 */ 8 */
9 9
10 #ifndef VBOOT_REFERENCE_UTILITY_H_ 10 #ifndef VBOOT_REFERENCE_UTILITY_H_
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 /* Like StatefulMemcpy() but copies in the opposite direction, populating 78 /* Like StatefulMemcpy() but copies in the opposite direction, populating
79 * data from [src] into the buffer encapsulated in state [state]. 79 * data from [src] into the buffer encapsulated in state [state].
80 * On success, return [src] and update [state]. 80 * On success, return [src] and update [state].
81 * On failure, return NULL, set remaining_len in state to -1. 81 * On failure, return NULL, set remaining_len in state to -1.
82 * 82 *
83 * Useful for iterating through a structure to populate a binary blob. After the 83 * Useful for iterating through a structure to populate a binary blob. After the
84 * first failure (buffer overrun), successive calls will always fail. 84 * first failure (buffer overrun), successive calls will always fail.
85 */ 85 */
86 const void* StatefulMemcpy_r(MemcpyState* state, const void* src, uint64_t len); 86 const void* StatefulMemcpy_r(MemcpyState* state, const void* src, uint64_t len);
87 87
88 /* Like StatefulMemcpy_r() but fills a portion of the encapsulated buffer with
89 * a constant value.
90 * On success, return a meaningless but non-NULL pointer and updates [state].
91 * On failure, return NULL, set remaining_len in state to -1.
92 *
93 * After the first failure (buffer overrun), successive calls will always fail.
94 */
95 const void* StatefulMemset_r(MemcpyState* state, const uint8_t val,
96 uint64_t len);
97
98
88 #endif /* VBOOT_REFERENCE_UTILITY_H_ */ 99 #endif /* VBOOT_REFERENCE_UTILITY_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698