summaryrefslogtreecommitdiffstats
path: root/src/include/fmap.h
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-07-09 11:27:44 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-07-14 15:48:43 +0200
commit995269062e631b83079c11bd91112fc0b71c523a (patch)
tree9258c59a902fd364c81205694d9c5f7b57ebe1c0 /src/include/fmap.h
parentad0dda767b9fc1357450e4de04bdf276c7bb40f1 (diff)
downloadcoreboot-995269062e631b83079c11bd91112fc0b71c523a.tar.gz
coreboot-995269062e631b83079c11bd91112fc0b71c523a.tar.bz2
coreboot-995269062e631b83079c11bd91112fc0b71c523a.zip
fmap: Introduce new function to derive fmap name from offset/size
vboot passes around the offset and size of the region to use in later stages. To assign more meaning to this pair, provide a function that returns the fmap area name if there's a precise match (and an error otherwise). Change-Id: I5724b860271025c8cb8b390ecbd33352ea779660 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10865 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/include/fmap.h')
-rw-r--r--src/include/fmap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/fmap.h b/src/include/fmap.h
index e575bbf3fc95..671e802775e1 100644
--- a/src/include/fmap.h
+++ b/src/include/fmap.h
@@ -21,6 +21,7 @@
#define _FMAP_H_
#include <region.h>
+#include <fmap_serialized.h>
/* Locate the named area in the fmap and fill in a region device representing
* that area. The region is a sub-region of the readonly boot media. Return
@@ -32,4 +33,8 @@ int fmap_locate_area_as_rdev(const char *name, struct region_device *area);
* < 0 on error. */
int fmap_locate_area(const char *name, struct region *r);
+/* Find fmap area name by offset and size.
+ * Return 0 on success, < 0 on error. */
+int fmap_find_region_name(const struct region * const ar,
+ char name[FMAP_STRLEN]);
#endif