From e748e4b780057872b4a7192db87476adaa8b501c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 Dec 2023 13:06:59 -0800 Subject: bloblist: Update the tag numbering Align bloblist tags with the FW handoff spec v0.9. The most common ones are from 0. TF related ones are from 0x100. All non-standard ones from 0xfff000. Added new defined tags: BLOBLISTT_OPTEE_PAGABLE_PART for TF. BLOBLISTT_TPM_EVLOG and BLOBLISTT_TPM_CRB_BASE for TPM. Signed-off-by: Simon Glass Co-developed-by: Raymond Mao Signed-off-by: Raymond Mao Reviewed-by: Ilias Apalodimas --- test/bloblist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/bloblist.c') diff --git a/test/bloblist.c b/test/bloblist.c index 720be7e244f..efa1e32afd7 100644 --- a/test/bloblist.c +++ b/test/bloblist.c @@ -291,9 +291,9 @@ static int bloblist_test_cmd_list(struct unit_test_state *uts) console_record_reset(); run_command("bloblist list", 0); ut_assert_nextline("Address Size Tag Name"); - ut_assert_nextline("%08lx %8x 8000 SPL hand-off", + ut_assert_nextline("%08lx %8x fff000 SPL hand-off", (ulong)map_to_sysmem(data), TEST_SIZE); - ut_assert_nextline("%08lx %8x 106 Chrome OS vboot context", + ut_assert_nextline("%08lx %8x 202 Chrome OS vboot context", (ulong)map_to_sysmem(data2), TEST_SIZE2); ut_assert_console_end(); ut_unsilence_console(uts); -- cgit v1.2.3 From 1a2e02f955f98395142415d7c6cc14e4df903969 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 Dec 2023 13:07:00 -0800 Subject: bloblist: Adjust API to align in powers of 2 The updated bloblist structure stores the alignment as a power-of-two value in its structures. Adjust the API to use this, to avoid needing to calling ilog2(). Update the bloblist alignment from 16 bytes to 8 bytes. Drop a stale comment while we are here. Signed-off-by: Simon Glass Co-developed-by: Raymond Mao Signed-off-by: Raymond Mao Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- test/bloblist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/bloblist.c') diff --git a/test/bloblist.c b/test/bloblist.c index efa1e32afd7..8b435e27ca3 100644 --- a/test/bloblist.c +++ b/test/bloblist.c @@ -336,7 +336,7 @@ static int bloblist_test_align(struct unit_test_state *uts) /* Check larger alignment */ for (i = 0; i < 3; i++) { - int align = 32 << i; + int align = 5 - i; data = bloblist_add(3 + i, i * 4, align); ut_assertnonnull(data); @@ -351,7 +351,7 @@ static int bloblist_test_align(struct unit_test_state *uts) ut_assertok(bloblist_new(TEST_ADDR + BLOBLIST_ALIGN, TEST_BLOBLIST_SIZE, 0)); - data = bloblist_add(1, 5, BLOBLIST_ALIGN * 2); + data = bloblist_add(1, 5, BLOBLIST_ALIGN_LOG2 + 1); ut_assertnonnull(data); addr = map_to_sysmem(data); ut_asserteq(0, addr & (BLOBLIST_ALIGN * 2 - 1)); -- cgit v1.2.3 From 997dac6edebe5b82f4d6f9b90753f0af6e9d04f0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 Dec 2023 13:07:05 -0800 Subject: bloblist: Checksum the entire bloblist Use a sinple 8-bit checksum for bloblist, as specified by the spec version 0.9. Spec v0.9 specifies that the entire bloblist area is checksummed, including unused portions. Update the code to follow this. Signed-off-by: Simon Glass Co-developed-by: Raymond Mao Signed-off-by: Raymond Mao Reviewed-by: Ilias Apalodimas --- test/bloblist.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/bloblist.c') diff --git a/test/bloblist.c b/test/bloblist.c index 8b435e27ca3..49ac4b92aee 100644 --- a/test/bloblist.c +++ b/test/bloblist.c @@ -237,12 +237,18 @@ static int bloblist_test_checksum(struct unit_test_state *uts) *data2 -= 1; /* - * Changing data outside the range of valid data should not affect - * the checksum. + * Changing data outside the range of valid data should affect the + * checksum. */ ut_assertok(bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); data[TEST_SIZE]++; + ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); + data[TEST_SIZE]--; + ut_assertok(bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); + data2[TEST_SIZE2]++; + ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); + data[TEST_SIZE]--; ut_assertok(bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); return 0; -- cgit v1.2.3 From b6e83826ef1f4d04d350e4d2c03e3b28ab1b0ae4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 Dec 2023 13:07:07 -0800 Subject: bloblist: Reduce blob-header size The v0.9 spec provides for an 8-byte header for each blob, with fewer fields. The blob data start address should be aligned to the alignment specified by the bloblist header. Update the implementation to match this. Signed-off-by: Simon Glass Co-developed-by: Raymond Mao Signed-off-by: Raymond Mao --- test/bloblist.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/bloblist.c') diff --git a/test/bloblist.c b/test/bloblist.c index 49ac4b92aee..e6070041d36 100644 --- a/test/bloblist.c +++ b/test/bloblist.c @@ -272,8 +272,8 @@ static int bloblist_test_cmd_info(struct unit_test_state *uts) run_command("bloblist info", 0); ut_assert_nextline("base: %lx", (ulong)map_to_sysmem(hdr)); ut_assert_nextline("size: 400 1 KiB"); - ut_assert_nextline("alloced: 70 112 Bytes"); - ut_assert_nextline("free: 390 912 Bytes"); + ut_assert_nextline("alloced: 58 88 Bytes"); + ut_assert_nextline("free: 3a8 936 Bytes"); ut_assert_console_end(); ut_unsilence_console(uts); @@ -331,12 +331,12 @@ static int bloblist_test_align(struct unit_test_state *uts) data = bloblist_add(i, size, 0); ut_assertnonnull(data); addr = map_to_sysmem(data); - ut_asserteq(0, addr & (BLOBLIST_ALIGN - 1)); + ut_asserteq(0, addr & (BLOBLIST_BLOB_ALIGN - 1)); /* Only the bytes in the blob data should be zeroed */ for (j = 0; j < size; j++) ut_asserteq(0, data[j]); - for (; j < BLOBLIST_ALIGN; j++) + for (; j < BLOBLIST_BLOB_ALIGN; j++) ut_asserteq(ERASE_BYTE, data[j]); } @@ -351,7 +351,7 @@ static int bloblist_test_align(struct unit_test_state *uts) } /* Check alignment with an bloblist starting on a smaller alignment */ - hdr = map_sysmem(TEST_ADDR + BLOBLIST_ALIGN, TEST_BLOBLIST_SIZE); + hdr = map_sysmem(TEST_ADDR + BLOBLIST_BLOB_ALIGN, TEST_BLOBLIST_SIZE); memset(hdr, ERASE_BYTE, TEST_BLOBLIST_SIZE); memset(hdr, '\0', sizeof(*hdr)); ut_assertok(bloblist_new(TEST_ADDR + BLOBLIST_ALIGN, TEST_BLOBLIST_SIZE, @@ -360,7 +360,7 @@ static int bloblist_test_align(struct unit_test_state *uts) data = bloblist_add(1, 5, BLOBLIST_ALIGN_LOG2 + 1); ut_assertnonnull(data); addr = map_to_sysmem(data); - ut_asserteq(0, addr & (BLOBLIST_ALIGN * 2 - 1)); + ut_asserteq(0, addr & (BLOBLIST_BLOB_ALIGN * 2 - 1)); return 0; } @@ -448,7 +448,7 @@ static int bloblist_test_grow(struct unit_test_state *uts) hdr = ptr; ut_asserteq(sizeof(struct bloblist_hdr) + sizeof(struct bloblist_rec) * 2 + small_size * 2 + - BLOBLIST_ALIGN, + BLOBLIST_BLOB_ALIGN, hdr->alloced); return 0; @@ -583,7 +583,7 @@ static int bloblist_test_resize_last(struct unit_test_state *uts) ut_asserteq((u8)ERASE_BYTE, *((u8 *)hdr + alloced_val + 4)); /* Check that the new top of the allocated blobs has not been touched */ - alloced_val += BLOBLIST_ALIGN; + alloced_val += BLOBLIST_BLOB_ALIGN; ut_asserteq(alloced_val, hdr->alloced); ut_asserteq((u8)ERASE_BYTE, *((u8 *)hdr + hdr->alloced)); -- cgit v1.2.3 From b86b2d940caf27aa80b7c657e48770349e15491b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 Dec 2023 13:07:08 -0800 Subject: bloblist: Adjust the bloblist header The v0.9 spec provides for a 24-byte header. Update the implementation to match this. Rename the fields of the bloblist header to align to the spec. Adds an alignment field into the bloblist header. Update the related bloblist APIs and UT testcases. Signed-off-by: Simon Glass Co-developed-by: Raymond Mao Signed-off-by: Raymond Mao Reviewed-by: Ilias Apalodimas --- test/bloblist.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'test/bloblist.c') diff --git a/test/bloblist.c b/test/bloblist.c index e6070041d36..2b06ce844f8 100644 --- a/test/bloblist.c +++ b/test/bloblist.c @@ -78,7 +78,7 @@ static int bloblist_test_init(struct unit_test_state *uts) ut_asserteq(-EPROTONOSUPPORT, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); - ut_asserteq(-ENOSPC, bloblist_new(TEST_ADDR, 0x10, 0)); + ut_asserteq(-ENOSPC, bloblist_new(TEST_ADDR, 0xc, 0)); ut_asserteq(-EFAULT, bloblist_new(1, TEST_BLOBLIST_SIZE, 0)); ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); @@ -107,7 +107,8 @@ static int bloblist_test_blob(struct unit_test_state *uts) hdr = clear_bloblist(); ut_assertnull(bloblist_find(TEST_TAG, TEST_BLOBLIST_SIZE)); ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); - ut_asserteq(TEST_BLOBLIST_SIZE, bloblist_get_size()); + ut_asserteq(sizeof(struct bloblist_hdr), bloblist_get_size()); + ut_asserteq(TEST_BLOBLIST_SIZE, bloblist_get_total_size()); ut_asserteq(TEST_ADDR, bloblist_get_base()); ut_asserteq(map_to_sysmem(hdr), TEST_ADDR); @@ -205,9 +206,9 @@ static int bloblist_test_checksum(struct unit_test_state *uts) ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); hdr->flags++; - hdr->size--; + hdr->total_size--; ut_asserteq(-EFBIG, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); - hdr->size++; + hdr->total_size++; hdr->spare++; ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); @@ -270,10 +271,10 @@ static int bloblist_test_cmd_info(struct unit_test_state *uts) ut_silence_console(uts); console_record_reset(); run_command("bloblist info", 0); - ut_assert_nextline("base: %lx", (ulong)map_to_sysmem(hdr)); - ut_assert_nextline("size: 400 1 KiB"); - ut_assert_nextline("alloced: 58 88 Bytes"); - ut_assert_nextline("free: 3a8 936 Bytes"); + ut_assert_nextline("base: %lx", (ulong)map_to_sysmem(hdr)); + ut_assert_nextline("total size: 400 1 KiB"); + ut_assert_nextline("used size: 50 80 Bytes"); + ut_assert_nextline("free: 3b0 944 Bytes"); ut_assert_console_end(); ut_unsilence_console(uts); @@ -427,7 +428,7 @@ static int bloblist_test_grow(struct unit_test_state *uts) ut_asserteq(sizeof(struct bloblist_hdr) + sizeof(struct bloblist_rec) * 2 + small_size * 2, - hdr->alloced); + hdr->used_size); /* Resize the first one */ ut_assertok(bloblist_resize(TEST_TAG, small_size + 4)); @@ -449,7 +450,7 @@ static int bloblist_test_grow(struct unit_test_state *uts) ut_asserteq(sizeof(struct bloblist_hdr) + sizeof(struct bloblist_rec) * 2 + small_size * 2 + BLOBLIST_BLOB_ALIGN, - hdr->alloced); + hdr->used_size); return 0; } @@ -479,7 +480,7 @@ static int bloblist_test_shrink(struct unit_test_state *uts) hdr = ptr; ut_asserteq(sizeof(struct bloblist_hdr) + sizeof(struct bloblist_rec) * 2 + small_size * 2, - hdr->alloced); + hdr->used_size); /* Resize the first one */ new_size = small_size - BLOBLIST_ALIGN - 4; @@ -499,7 +500,7 @@ static int bloblist_test_shrink(struct unit_test_state *uts) ut_asserteq(sizeof(struct bloblist_hdr) + sizeof(struct bloblist_rec) * 2 + small_size * 2 - BLOBLIST_ALIGN, - hdr->alloced); + hdr->used_size); return 0; } @@ -527,12 +528,12 @@ static int bloblist_test_resize_fail(struct unit_test_state *uts) hdr = ptr; ut_asserteq(sizeof(struct bloblist_hdr) + sizeof(struct bloblist_rec) * 2 + small_size * 2, - hdr->alloced); + hdr->used_size); /* Resize the first one, to check the boundary conditions */ ut_asserteq(-EINVAL, bloblist_resize(TEST_TAG, -1)); - new_size = small_size + (hdr->size - hdr->alloced); + new_size = small_size + (hdr->total_size - hdr->used_size); ut_asserteq(-ENOSPC, bloblist_resize(TEST_TAG, new_size + 1)); ut_assertok(bloblist_resize(TEST_TAG, new_size)); @@ -564,9 +565,9 @@ static int bloblist_test_resize_last(struct unit_test_state *uts) /* Check the byte after the last blob */ alloced_val = sizeof(struct bloblist_hdr) + sizeof(struct bloblist_rec) * 2 + small_size * 2; - ut_asserteq(alloced_val, hdr->alloced); + ut_asserteq(alloced_val, hdr->used_size); ut_asserteq_ptr((void *)hdr + alloced_val, blob2 + small_size); - ut_asserteq((u8)ERASE_BYTE, *((u8 *)hdr + hdr->alloced)); + ut_asserteq((u8)ERASE_BYTE, *((u8 *)hdr + hdr->used_size)); /* Resize the second one, checking nothing changes */ ut_asserteq(0, bloblist_resize(TEST_TAG2, small_size + 4)); @@ -584,8 +585,8 @@ static int bloblist_test_resize_last(struct unit_test_state *uts) /* Check that the new top of the allocated blobs has not been touched */ alloced_val += BLOBLIST_BLOB_ALIGN; - ut_asserteq(alloced_val, hdr->alloced); - ut_asserteq((u8)ERASE_BYTE, *((u8 *)hdr + hdr->alloced)); + ut_asserteq(alloced_val, hdr->used_size); + ut_asserteq((u8)ERASE_BYTE, *((u8 *)hdr + hdr->used_size)); return 0; } -- cgit v1.2.3 From 7d790a80b67958b49da591d32662c4b168737012 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 Dec 2023 13:07:09 -0800 Subject: bloblist: Add alignment to bloblist_new() Allow the alignment to be specified when creating a bloblist. Signed-off-by: Simon Glass Co-developed-by: Raymond Mao Signed-off-by: Raymond Mao Reviewed-by: Ilias Apalodimas --- test/bloblist.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'test/bloblist.c') diff --git a/test/bloblist.c b/test/bloblist.c index 2b06ce844f8..17d9dd03d07 100644 --- a/test/bloblist.c +++ b/test/bloblist.c @@ -72,15 +72,15 @@ static int bloblist_test_init(struct unit_test_state *uts) hdr = clear_bloblist(); ut_asserteq(-ENOENT, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); ut_asserteq_ptr(NULL, bloblist_check_magic(TEST_ADDR)); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); ut_asserteq_ptr(hdr, bloblist_check_magic(TEST_ADDR)); hdr->version++; ut_asserteq(-EPROTONOSUPPORT, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); - ut_asserteq(-ENOSPC, bloblist_new(TEST_ADDR, 0xc, 0)); - ut_asserteq(-EFAULT, bloblist_new(1, TEST_BLOBLIST_SIZE, 0)); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_asserteq(-ENOSPC, bloblist_new(TEST_ADDR, 0xc, 0, 0)); + ut_asserteq(-EFAULT, bloblist_new(1, TEST_BLOBLIST_SIZE, 0, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); ut_assertok(bloblist_finish()); @@ -106,7 +106,7 @@ static int bloblist_test_blob(struct unit_test_state *uts) /* At the start there should be no records */ hdr = clear_bloblist(); ut_assertnull(bloblist_find(TEST_TAG, TEST_BLOBLIST_SIZE)); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); ut_asserteq(sizeof(struct bloblist_hdr), bloblist_get_size()); ut_asserteq(TEST_BLOBLIST_SIZE, bloblist_get_total_size()); ut_asserteq(TEST_ADDR, bloblist_get_base()); @@ -145,7 +145,7 @@ static int bloblist_test_blob_ensure(struct unit_test_state *uts) /* At the start there should be no records */ clear_bloblist(); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); /* Test with an empty bloblist */ size = TEST_SIZE; @@ -177,7 +177,7 @@ static int bloblist_test_bad_blob(struct unit_test_state *uts) void *data; hdr = clear_bloblist(); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); data = hdr + 1; data += sizeof(struct bloblist_rec); ut_asserteq_addr(data, bloblist_ensure(TEST_TAG, TEST_SIZE)); @@ -193,7 +193,7 @@ static int bloblist_test_checksum(struct unit_test_state *uts) char *data, *data2; hdr = clear_bloblist(); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); ut_assertok(bloblist_finish()); ut_assertok(bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); @@ -218,6 +218,10 @@ static int bloblist_test_checksum(struct unit_test_state *uts) ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); hdr->chksum--; + hdr->align_log2++; + ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); + hdr->align_log2--; + /* Make sure the checksum changes when we add blobs */ data = bloblist_add(TEST_TAG, TEST_SIZE, 0); ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); @@ -263,7 +267,7 @@ static int bloblist_test_cmd_info(struct unit_test_state *uts) char *data, *data2; hdr = clear_bloblist(); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); data = bloblist_ensure(TEST_TAG, TEST_SIZE); data2 = bloblist_ensure(TEST_TAG2, TEST_SIZE2); @@ -289,7 +293,7 @@ static int bloblist_test_cmd_list(struct unit_test_state *uts) char *data, *data2; hdr = clear_bloblist(); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); data = bloblist_ensure(TEST_TAG, TEST_SIZE); data2 = bloblist_ensure(TEST_TAG2, TEST_SIZE2); @@ -319,7 +323,7 @@ static int bloblist_test_align(struct unit_test_state *uts) /* At the start there should be no records */ hdr = clear_bloblist(); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); ut_assertnull(bloblist_find(TEST_TAG, TEST_BLOBLIST_SIZE)); /* Check the default alignment */ @@ -356,7 +360,7 @@ static int bloblist_test_align(struct unit_test_state *uts) memset(hdr, ERASE_BYTE, TEST_BLOBLIST_SIZE); memset(hdr, '\0', sizeof(*hdr)); ut_assertok(bloblist_new(TEST_ADDR + BLOBLIST_ALIGN, TEST_BLOBLIST_SIZE, - 0)); + 0, 0)); data = bloblist_add(1, 5, BLOBLIST_ALIGN_LOG2 + 1); ut_assertnonnull(data); @@ -377,7 +381,7 @@ static int bloblist_test_reloc(struct unit_test_state *uts) ulong new_addr; ulong new_size; - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); old_ptr = map_sysmem(TEST_ADDR, TEST_BLOBLIST_SIZE); /* Add one blob and then one that won't fit */ @@ -416,7 +420,7 @@ static int bloblist_test_grow(struct unit_test_state *uts) memset(hdr, ERASE_BYTE, TEST_BLOBLIST_SIZE); /* Create two blobs */ - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); blob1 = bloblist_add(TEST_TAG, small_size, 0); ut_assertnonnull(blob1); ut_assertok(check_zero(blob1, small_size)); @@ -468,7 +472,7 @@ static int bloblist_test_shrink(struct unit_test_state *uts) ptr = map_sysmem(TEST_ADDR, TEST_BLOBLIST_SIZE); /* Create two blobs */ - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); blob1 = bloblist_add(TEST_TAG, small_size, 0); ut_assertnonnull(blob1); strcpy(blob1, test1_str); @@ -518,7 +522,7 @@ static int bloblist_test_resize_fail(struct unit_test_state *uts) ptr = map_sysmem(TEST_ADDR, TEST_BLOBLIST_SIZE); /* Create two blobs */ - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); blob1 = bloblist_add(TEST_TAG, small_size, 0); ut_assertnonnull(blob1); @@ -555,7 +559,7 @@ static int bloblist_test_resize_last(struct unit_test_state *uts) hdr = ptr; /* Create two blobs */ - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); blob1 = bloblist_add(TEST_TAG, small_size, 0); ut_assertnonnull(blob1); @@ -600,7 +604,7 @@ static int bloblist_test_blob_maxsize(struct unit_test_state *uts) /* At the start there should be no records */ clear_bloblist(); - ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0)); + ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0, 0)); /* Add a blob that takes up all space */ size = TEST_BLOBLIST_SIZE - sizeof(struct bloblist_hdr) - -- cgit v1.2.3