From 8fac662f308cdfbeec3f71d4728f71ad79c06925 Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Fri, 12 Nov 2021 13:45:29 +0000 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59494 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- payloads/libpayload/include/fmap.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 payloads/libpayload/include/fmap.h (limited to 'payloads/libpayload/include/fmap.h') 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 +#include + +/* 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 */ -- cgit v1.2.3