diff options
author | Julius Werner <jwerner@chromium.org> | 2021-01-05 18:54:19 -0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2021-03-08 22:31:43 +0000 |
commit | 7778cf2d30f780fc5bf867af8171a5cd6c47b835 (patch) | |
tree | 3adab3eedb175e7013f7bb8bbe537b1524cd8d65 /LICENSES/GPL-2.0-or-later.txt | |
parent | 9b1f3cc6fb129789f1dd28160a83a1ea59dd123a (diff) |
cbfs: Add cbfs_alloc() primitive and combine cbfs_load() and cbfs_map()
This patchs adds a new CBFS primitive that allows callers to pass in an
allocator function that will be called once the size of the file to load
is known, to decide on its final location. This can be useful for
loading a CBFS file straight into CBMEM, for example. The new primitive
is combined with cbfs_map() and cbfs_load() into a single underlying
function that can handle all operations, to reduce the amount of code
that needs to be duplicated (especially later when file verification is
added). Also add a new variation that allows restraining or querying the
CBFS type of a file as it is being loaded, and reorganize the
documentation/definition of all these accessors and variations in the
header file a little.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I5fe0645387c0e9053ad5c15744437940fc904392
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49334
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'LICENSES/GPL-2.0-or-later.txt')
0 files changed, 0 insertions, 0 deletions