summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/fmap.h
diff options
context:
space:
mode:
authorJakub Czapiga <jacz@semihalf.com>2021-11-12 13:45:29 +0000
committerFelix Held <felix-coreboot@felixheld.de>2021-12-23 14:37:42 +0000
commit8fac662f308cdfbeec3f71d4728f71ad79c06925 (patch)
treebc2e73ab891c1643ccbf3bde29b36b7f95383735 /payloads/libpayload/include/fmap.h
parente7006fb414d20aa49b1aa7d6e2e5a979f5395a6d (diff)
libpayload/libc/fmap: Implement new FlashMap API
This patch introduces new FlashMap API, the fmap_locate_area(). It works on cached FlashMap provided in lib_sysinfo.fmap_cache. Change-Id: Idbf9016ce73aa58e17f3ee19920ab83dc6c25abb Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59494 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads/libpayload/include/fmap.h')
-rw-r--r--payloads/libpayload/include/fmap.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/payloads/libpayload/include/fmap.h b/payloads/libpayload/include/fmap.h
new file mode 100644
index 0000000000..53ebe23dcb
--- /dev/null
+++ b/payloads/libpayload/include/fmap.h
@@ -0,0 +1,12 @@
+/* SPDX_License-Identifier: BSD-3-Clause */
+
+#ifndef _FMAP_H
+#define _FMAP_H
+
+#include <commonlib/bsd/cb_err.h>
+#include <stddef.h>
+
+/* Looks for area with |name| in FlashMap. Requires lib_sysinfo.fmap_cache. */
+cb_err_t fmap_locate_area(const char *name, size_t *offset, size_t *size);
+
+#endif /* _FMAP_H */