cbfs: Hook up to new CBFS implementation
This patch hooks coreboot up to the new commonlib/bsd CBFS implementation. This is intended as the "minimum viable patch" that makes the new implementation useable with the smallest amount of changes -- that is why some of this may look a bit roundabout (returning the whole metadata for a file but then just using that to fill out the rdevs of the existing struct cbfsf). Future changes will migrate the higher level CBFS APIs one-by-one to use the new implementation directly (rather than translated into the results of the old one), at which point this will become more efficient. Change-Id: I4d112d1239475920de2d872dac179c245275038d Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38422 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Philipp Deppenwiese
parent
0655f78041
commit
1cd013bec5
@@ -30,6 +30,13 @@ ramstage-y += cbfs.c
|
||||
smm-y += cbfs.c
|
||||
postcar-y += cbfs.c
|
||||
|
||||
bootblock-y += bsd/cbfs_private.c
|
||||
verstage-y += bsd/cbfs_private.c
|
||||
romstage-y += bsd/cbfs_private.c
|
||||
postcar-y += bsd/cbfs_private.c
|
||||
ramstage-y += bsd/cbfs_private.c
|
||||
smm-y += bsd/cbfs_private.c
|
||||
|
||||
decompressor-y += bsd/lz4_wrapper.c
|
||||
bootblock-y += bsd/lz4_wrapper.c
|
||||
verstage-y += bsd/lz4_wrapper.c
|
||||
|
@@ -7,21 +7,6 @@
|
||||
#include <string.h>
|
||||
#include <vb2_sha.h>
|
||||
|
||||
#if !defined(LOG)
|
||||
#define LOG(x...) printk(BIOS_INFO, "CBFS: " x)
|
||||
#endif
|
||||
#if defined(CONFIG)
|
||||
|
||||
#if CONFIG(DEBUG_CBFS)
|
||||
#define DEBUG(x...) printk(BIOS_SPEW, "CBFS: " x)
|
||||
#else
|
||||
#define DEBUG(x...)
|
||||
#endif
|
||||
|
||||
#elif !defined(DEBUG)
|
||||
#define DEBUG(x...)
|
||||
#endif
|
||||
|
||||
static size_t cbfs_next_offset(const struct region_device *cbfs,
|
||||
const struct cbfsf *f)
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#ifndef _COMMONLIB_CBFS_H_
|
||||
#define _COMMONLIB_CBFS_H_
|
||||
|
||||
#include <commonlib/bsd/cbfs_serialized.h>
|
||||
#include <commonlib/bsd/cbfs_private.h>
|
||||
#include <commonlib/region.h>
|
||||
#include <vb2_api.h>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
struct cbfsf {
|
||||
struct region_device metadata;
|
||||
struct region_device data;
|
||||
union cbfs_mdata mdata;
|
||||
};
|
||||
|
||||
/* Locate file by name and optional type. Returns 0 on success else < 0 on
|
||||
|
Reference in New Issue
Block a user