hdr = clear_bloblist();
ut_assertnull(bloblist_find(TEST_TAG, TEST_BLOBLIST_SIZE));
ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0));
+ ut_asserteq(map_to_sysmem(hdr), TEST_ADDR);
/* Add a record and check that we can find it */
data = bloblist_add(TEST_TAG, TEST_SIZE);
rec = (void *)(hdr + 1);
- ut_asserteq_ptr(rec + 1, data);
+ ut_asserteq_addr(rec + 1, data);
data = bloblist_find(TEST_TAG, TEST_SIZE);
- ut_asserteq_ptr(rec + 1, data);
+ ut_asserteq_addr(rec + 1, data);
/* Check the data is zeroed */
ut_assertok(check_zero(data, TEST_SIZE));
/* Check the 'ensure' method */
- ut_asserteq_ptr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
+ ut_asserteq_addr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
ut_assertnull(bloblist_ensure(TEST_TAG, TEST_SIZE2));
rec2 = (struct bloblist_rec *)(data + ALIGN(TEST_SIZE, BLOBLIST_ALIGN));
ut_assertok(check_zero(data, TEST_SIZE));
/* Check for a non-existent record */
- ut_asserteq_ptr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
- ut_asserteq_ptr(rec2 + 1, bloblist_ensure(TEST_TAG2, TEST_SIZE2));
+ ut_asserteq_addr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
+ ut_asserteq_addr(rec2 + 1, bloblist_ensure(TEST_TAG2, TEST_SIZE2));
ut_assertnull(bloblist_find(TEST_TAG_MISSING, 0));
return 0;
/* Check that we get the same thing again */
ut_assertok(bloblist_ensure_size_ret(TEST_TAG, &size, &data2));
ut_asserteq(TEST_SIZE, size);
- ut_asserteq_ptr(data, data2);
+ ut_asserteq_addr(data, data2);
/* Check that the size remains the same */
size = TEST_SIZE2;
ut_assertok(bloblist_new(TEST_ADDR, TEST_BLOBLIST_SIZE, 0));
data = hdr + 1;
data += sizeof(struct bloblist_rec);
- ut_asserteq_ptr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
- ut_asserteq_ptr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
+ ut_asserteq_addr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
+ ut_asserteq_addr(data, bloblist_ensure(TEST_TAG, TEST_SIZE));
return 0;
}
gd->flags |= GD_FLG_SILENT;
console_record_reset();
run_command("bloblist info", 0);
- ut_assert_nextline("base: %x", map_to_sysmem(hdr));
+ ut_assert_nextline("base: %lx", (ulong)map_to_sysmem(hdr));
ut_assert_nextline("size: 100 256 Bytes");
ut_assert_nextline("alloced: 70 112 Bytes");
ut_assert_nextline("free: 90 144 Bytes");
console_record_reset();
run_command("bloblist list", 0);
ut_assert_nextline("Address Size Tag Name");
- ut_assert_nextline("%08x %8x 1 EC host event", map_to_sysmem(data),
- TEST_SIZE);
- ut_assert_nextline("%08x %8x 2 SPL hand-off", map_to_sysmem(data2),
- TEST_SIZE2);
+ ut_assert_nextline("%08lx %8x 1 EC host event",
+ (ulong)map_to_sysmem(data), TEST_SIZE);
+ ut_assert_nextline("%08lx %8x 2 SPL hand-off",
+ (ulong)map_to_sysmem(data2), TEST_SIZE2);
ut_assert_console_end();
gd->flags &= ~(GD_FLG_SILENT | GD_FLG_RECORD);