summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorT Michael Turney <mturney@codeaurora.org>2019-03-20 14:37:34 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-04-23 10:22:54 +0000
commit19fcc89fe085fad2e7aba52375b4190463667fdb (patch)
treeeb77c8bec07fdc59b55de5134037e5ab93621e1e /src/include
parentd61c5ea7f5cc87a58db3d0d004b94dfab3897ac1 (diff)
downloadcoreboot-19fcc89fe085fad2e7aba52375b4190463667fdb.tar.xz
lib/fmap: Add area read/write functions
Change-Id: I7669b8dc07b1aa5f00e7d8d0b1305b3de6c5949c Signed-off-by: T Michael Turney <mturney@codeaurora.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32287 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/fmap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/fmap.h b/src/include/fmap.h
index 5834831489..ab7e5ab895 100644
--- a/src/include/fmap.h
+++ b/src/include/fmap.h
@@ -40,4 +40,12 @@ int fmap_locate_area(const char *name, struct region *r);
* Return 0 on success, < 0 on error. */
int fmap_find_region_name(const struct region * const ar,
char name[FMAP_STRLEN]);
+
+/* Read fmap area into provided buffer.
+ * Return size read on success, < 0 on error. */
+ssize_t fmap_read_area(const char *name, void *buffer, size_t size);
+
+/* Write provided buffer into fmap area.
+ * Return size written on success, < 0 on error. */
+ssize_t fmap_overwrite_area(const char *name, const void *buffer, size_t size);
#endif