Julius Werner | 0d9072b | 2020-03-05 12:51:08 -0800 | [diff] [blame] | 1 | /* 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|. */ |
| 20 | cb_err_t cbfs_boot_lookup(const char *name, bool force_ro, |
| 21 | union cbfs_mdata *mdata, struct region_device *rdev); |
| 22 | |
| 23 | #endif |