aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass2023-12-27 13:07:09 -0800
committerSimon Glass2023-12-31 07:21:02 -0700
commit7d790a80b67958b49da591d32662c4b168737012 (patch)
tree6c108428cebedc5b31a8436d18c9b47bf2263456 /common
parentb86b2d940caf27aa80b7c657e48770349e15491b (diff)
bloblist: Add alignment to bloblist_new()
Allow the alignment to be specified when creating a bloblist. Signed-off-by: Simon Glass <sjg@chromium.org> Co-developed-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'common')
-rw-r--r--common/bloblist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/bloblist.c b/common/bloblist.c
index 6e019087ff9..2d373910b6d 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -351,7 +351,7 @@ static u32 bloblist_calc_chksum(struct bloblist_hdr *hdr)
return chksum;
}
-int bloblist_new(ulong addr, uint size, uint flags)
+int bloblist_new(ulong addr, uint size, uint flags, uint align_log2)
{
struct bloblist_hdr *hdr;
@@ -367,6 +367,7 @@ int bloblist_new(ulong addr, uint size, uint flags)
hdr->magic = BLOBLIST_MAGIC;
hdr->used_size = hdr->hdr_size;
hdr->total_size = size;
+ hdr->align_log2 = align_log2 ? align_log2 : BLOBLIST_BLOB_ALIGN_LOG2;
hdr->chksum = 0;
gd->bloblist = hdr;
@@ -522,7 +523,7 @@ int bloblist_init(void)
}
log_debug("Creating new bloblist size %lx at %lx\n", size,
addr);
- ret = bloblist_new(addr, size, 0);
+ ret = bloblist_new(addr, size, 0, 0);
} else {
log_debug("Found existing bloblist size %lx at %lx\n", size,
addr);