From patchwork Fri May 22 02:58:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 246220 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Thu, 21 May 2020 20:58:56 -0600 Subject: [PATCH v2 00/13] x86: cbfs: Various clean-ups to CBFS implementation Message-ID: <20200522025909.249740-1-sjg@chromium.org> This code is very old and has not had much of a clean-up since it was written. This series aims to tidy it up to use error codes, avoid using BSS when not necessary and to add a few more features. Changes in v2: - Fix incorrect function comments - Fix s/u8/void/ in find_uncached() - Fix setting of start in file_cbfs_find_uncached() - Add more comments on @node in file_cbfs_find_uncached() - Use void * instead of u8 * in file_cbfs_find_uncached_base() - Fix and expand comments in file_cbfs_find_uncached_base() - Rebase to master (with x86/master cherry-picked in too) Simon Glass (13): cbfs: Rename the result variable cbfs: Use ulong consistently cbfs: Use bool type for whether initialised cbfs: Adjust return value of file_cbfs_next_file() cbfs: Adjust file_cbfs_load_header() to use cbfs_priv cbfs: Adjust cbfs_load_header_ptr() to use cbfs_priv cbfs: Unify the two header loaders cbfs: Use void * for the position pointers cbfs: Record the start address in cbfs_priv cbfs: Return the error code from file_cbfs_init() cbfs: Change file_cbfs_find_uncached() to return an error cbfs: Allow reading a file from a CBFS given its base addr cbfs: Don't require the CBFS size with cbfs_init_mem() arch/x86/lib/fsp2/fsp_init.c | 3 +- cmd/cbfs.c | 3 +- fs/cbfs/cbfs.c | 260 ++++++++++++++++++++++------------- include/cbfs.h | 42 ++++-- 4 files changed, 193 insertions(+), 115 deletions(-)