coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cbfs_private.h File Reference
#include <commonlib/bsd/cb_err.h>
#include <commonlib/bsd/cbfs_mdata.h>
#include <commonlib/bsd/sysincludes.h>
#include <stdbool.h>
#include <stdint.h>
#include <vb2_sha.h>
#include <cbfs_glue.h>
Include dependency graph for cbfs_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CBFS_MCACHE_ALIGNMENT   sizeof(uint32_t) /* Largest data type used in CBFS */
 

Enumerations

enum  cbfs_walk_flags { CBFS_WALK_WRITEBACK_HASH = (1 << 0) , CBFS_WALK_INCLUDE_EMPTY = (1 << 1) }
 

Functions

enum cb_err cbfs_walk (cbfs_dev_t dev, enum cb_err(*walker)(cbfs_dev_t dev, size_t offset, const union cbfs_mdata *mdata, size_t already_read, void *arg), void *arg, struct vb2_hash *metadata_hash, enum cbfs_walk_flags)
 
enum cb_err cbfs_copy_fill_metadata (union cbfs_mdata *dst, const union cbfs_mdata *src, size_t already_read, cbfs_dev_t dev, size_t offset)
 
enum cb_err cbfs_lookup (cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out, size_t *data_offset_out, struct vb2_hash *metadata_hash)
 
enum cb_err cbfs_mcache_build (cbfs_dev_t dev, void *mcache, size_t mcache_size, struct vb2_hash *metadata_hash)
 
enum cb_err cbfs_mcache_lookup (const void *mcache, size_t mcache_size, const char *name, union cbfs_mdata *mdata_out, size_t *data_offset_out)
 
size_t cbfs_mcache_real_size (const void *mcache, size_t mcache_size)
 

Macro Definition Documentation

◆ CBFS_MCACHE_ALIGNMENT

#define CBFS_MCACHE_ALIGNMENT   sizeof(uint32_t) /* Largest data type used in CBFS */

Definition at line 101 of file cbfs_private.h.

Enumeration Type Documentation

◆ cbfs_walk_flags

Enumerator
CBFS_WALK_WRITEBACK_HASH 
CBFS_WALK_INCLUDE_EMPTY 

Definition at line 45 of file cbfs_private.h.

Function Documentation

◆ cbfs_copy_fill_metadata()

enum cb_err cbfs_copy_fill_metadata ( union cbfs_mdata dst,
const union cbfs_mdata src,
size_t  already_read,
cbfs_dev_t  dev,
size_t  offset 
)

Definition at line 1 of file cbfs_private.c.

References ALIGN_UP, buffer, CB_CBFS_IO, CB_CBFS_NOT_FOUND, CB_SUCCESS, CBFS_ALIGNMENT, cbfs_dev_read(), CBFS_FILE_MAGIC, DEBUG, memcmp(), and offset.

Here is the call graph for this function:

◆ cbfs_lookup()

enum cb_err cbfs_lookup ( cbfs_dev_t  dev,
const char *  name,
union cbfs_mdata mdata_out,
size_t data_offset_out,
struct vb2_hash *  metadata_hash 
)

Definition at line 1 of file cbfs_private.c.

Referenced by _cbfs_unverified_area_alloc().

Here is the caller graph for this function:

◆ cbfs_mcache_build()

enum cb_err cbfs_mcache_build ( cbfs_dev_t  dev,
void mcache,
size_t  mcache_size,
struct vb2_hash *  metadata_hash 
)

Definition at line 1 of file cbfs_mcache.c.

◆ cbfs_mcache_lookup()

enum cb_err cbfs_mcache_lookup ( const void mcache,
size_t  mcache_size,
const char *  name,
union cbfs_mdata mdata_out,
size_t data_offset_out 
)

Definition at line 1 of file cbfs_mcache.c.

◆ cbfs_mcache_real_size()

size_t cbfs_mcache_real_size ( const void mcache,
size_t  mcache_size 
)

Definition at line 125 of file cbfs_mcache.c.

Referenced by mcache_to_cbmem().

Here is the caller graph for this function:

◆ cbfs_walk()

enum cb_err cbfs_walk ( cbfs_dev_t  dev,
enum cb_err(*)(cbfs_dev_t dev, size_t offset, const union cbfs_mdata *mdata, size_t already_read, void *arg walker,
void arg,
struct vb2_hash *  metadata_hash,
enum  cbfs_walk_flags 
)

Definition at line 1 of file cbfs_private.c.