coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cbfs_mcache.c File Reference
#include <assert.h>
#include <commonlib/bsd/cbfs_private.h>
Include dependency graph for cbfs_mcache.c:

Go to the source code of this file.

Data Structures

union  mcache_entry
 
struct  cbfs_mcache_build_args
 

Macros

#define MCACHE_MAGIC_FILE   0x454c4946 /* 'FILE' */
 
#define MCACHE_MAGIC_FULL   0x4c4c5546 /* 'FULL' */
 
#define MCACHE_MAGIC_END   0x444e4524 /* '$END' */
 

Functions

static enum cb_err build_walker (cbfs_dev_t dev, size_t offset, const union cbfs_mdata *mdata, size_t already_read, void *arg)
 
enum cb_err cbfs_mcache_build (cbfs_dev_t dev, void *mcache, size_t 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

◆ MCACHE_MAGIC_END

#define MCACHE_MAGIC_END   0x444e4524 /* '$END' */

Definition at line 27 of file cbfs_mcache.c.

◆ MCACHE_MAGIC_FILE

#define MCACHE_MAGIC_FILE   0x454c4946 /* 'FILE' */

Definition at line 25 of file cbfs_mcache.c.

◆ MCACHE_MAGIC_FULL

#define MCACHE_MAGIC_FULL   0x4c4c5546 /* 'FULL' */

Definition at line 26 of file cbfs_mcache.c.

Function Documentation

◆ build_walker()

static enum cb_err build_walker ( cbfs_dev_t  dev,
size_t  offset,
const union cbfs_mdata mdata,
size_t  already_read,
void arg 
)
static

Definition at line 1 of file cbfs_mcache.c.

◆ cbfs_mcache_build()

enum cb_err cbfs_mcache_build ( cbfs_dev_t  dev,
void mcache,
size_t  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: