1 /* Copyright 2020 The ChromiumOS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
5 * Host utilities to execute flashrom command.
9 #include "common.h" /* from cbfstool for buffer API. */
12 * Read using flashrom into an allocated buffer.
14 * @param buffer The parameter that contains the buffer to use
15 * in the read operation.
16 * @param region The name of the fmap region to read, or NULL to
17 * read the entire flash chip.
19 * @return 0 on success, or < 0 on error.
21 int flashrom_host_read(struct buffer
*buffer
, const char *region
);
24 * Write using flashrom from a buffer.
26 * @param buffer The parameter that contains the buffer to use
27 * in the write operation.
28 * @param regions The name of the fmap region to write, or NULL to
29 * write the entire flash chip.
31 * @return 0 on success, or < 0 on error.
33 int flashrom_host_write(struct buffer
*buffer
, const char *region
);