blob: 8e9803616f001a0fd9b55ef28d867e9e6d1757ef [file] [log] [blame]
Julius Werner0d9072b2020-03-05 12:51:08 -08001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#ifndef _CBFS_PRIVATE_H_
4#define _CBFS_PRIVATE_H_
5
6#include <commonlib/bsd/cbfs_private.h>
7#include <commonlib/region.h>
8#include <types.h>
9
10/*
11 * This header contains low-level CBFS APIs that should only be used by code
12 * that really needs this level of access. Most code (particularly platform
13 * code) should use the higher-level CBFS APIs in <cbfs.h>. Code using these
14 * APIs needs to take special care to ensure CBFS file data is verified (in a
15 * TOCTOU-safe manner) before access (TODO: add details on how to do this once
16 * file verification code is in).
17 */
18
19/* Find by name, load metadata into |mdata| and chain file data to |rdev|. */
20cb_err_t cbfs_boot_lookup(const char *name, bool force_ro,
21 union cbfs_mdata *mdata, struct region_device *rdev);
22
23#endif