diff options
author | Edward O'Callaghan <quasisec@google.com> | 2021-11-29 11:02:46 +1100 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2022-01-14 23:10:55 +0000 |
commit | d74b8d9c990780ba64515b36aaff79d719d71ead (patch) | |
tree | d6adb48a2f271cb333f9182e8b839015b612950b /util/cbfstool/uflashrom.h | |
parent | e565f752217d8f67504f65b980fe7511724e8dd9 (diff) |
util/cbfstool: Port elogtool to libflashrom
This also uncouples cbfstool from being overly Chromium
specific. However the main objective is to not subprocess
flashrom any more and instead use the programmatic API.
BUG=b:207808292
TEST=built and ran `elogtool (list|clear|add 0x16 C0FFEE)`.
Change-Id: I79df2934b9b0492a554a4fecdd533a0abe1df231
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59714
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
Diffstat (limited to 'util/cbfstool/uflashrom.h')
-rw-r--r-- | util/cbfstool/uflashrom.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/util/cbfstool/uflashrom.h b/util/cbfstool/uflashrom.h new file mode 100644 index 0000000000..1ef0085dd9 --- /dev/null +++ b/util/cbfstool/uflashrom.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ + +#ifndef UFLASHROM_H +#define UFLASHROM_H + +#define FLASHROM_PROGRAMMER_INTERNAL_AP "internal" + +struct firmware_programmer { + const char *programmer; + uint32_t size; + uint8_t *data; +}; + +int flashrom_read(struct firmware_programmer *image, const char *region); +int flashrom_write(struct firmware_programmer *image, const char *region); + +#endif /* UFLASHROM_H */ |