* 'COREBOOT' (CBFS, size 1814528, offset 2117632).
*/
ulong cbfs_base = 0x205000;
- ulong cbfs_size = 0x1bb000;
struct cbfs_priv *cbfs;
int ret;
- ret = cbfs_init_mem(map_base + cbfs_base, cbfs_size, &cbfs);
+ ret = cbfs_init_mem(map_base + cbfs_base, &cbfs);
if (ret)
return ret;
if (!ret) {
#include <common.h>
#include <cbfs.h>
+#include <log.h>
#include <malloc.h>
#include <asm/byteorder.h>
return cbfs_init(&cbfs_s, end_of_rom);
}
-int cbfs_init_mem(ulong base, ulong size, struct cbfs_priv **privp)
+int cbfs_init_mem(ulong base, struct cbfs_priv **privp)
{
struct cbfs_priv priv_s, *priv = &priv_s;
int ret;
if (ret)
return ret;
- file_cbfs_fill_cache(priv, priv->header.rom_size, priv->header.align);
- if (priv->result != CBFS_SUCCESS)
- return -EINVAL;
+ ret = file_cbfs_fill_cache(priv, priv->header.rom_size,
+ priv->header.align);
+ if (ret)
+ return log_msg_ret("fill", ret);
priv->initialized = true;
priv = malloc(sizeof(priv_s));
* cbfs_init_mem() - Set up a new CBFS
*
* @base: Base address of CBFS
- * @size: Size of CBFS in bytes
* @cbfsp: Returns a pointer to CBFS on success
* @return 0 if OK, -ve on error
*/
-int cbfs_init_mem(ulong base, ulong size, struct cbfs_priv **privp);
+int cbfs_init_mem(ulong base, struct cbfs_priv **privp);
/***************************************************************************/