Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/shim/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ use_to_fw_debug_type(uint8_t use)
switch (use) {
case XRT_BO_USE_DEBUG:
return AMDXDNA_FW_BUF_DEBUG;
case XRT_BO_USE_UC_DEBUG:
return AMDXDNA_FW_BUF_DEBUG;
Comment on lines +26 to +27
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new XRT_BO_USE_UC_DEBUG case returns the same firmware buffer type as XRT_BO_USE_DEBUG. Add a comment explaining why both buffer use types map to the same firmware type, or if they should have different behaviors.

Copilot uses AI. Check for mistakes.
case XRT_BO_USE_DTRACE:
return AMDXDNA_FW_BUF_TRACE;
case XRT_BO_USE_DEBUG_QUEUE:
Expand Down
10 changes: 5 additions & 5 deletions test/shim_test/shim_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ TEST_create_free_debug_bo(device::id_type id, std::shared_ptr<device>& sdev, arg
{
auto dev = sdev.get();
auto boflags = XRT_BO_FLAGS_CACHEABLE;
auto ext_boflags = XRT_BO_USE_DEBUG << 4;
auto ext_boflags = dev_filter_is_aie4(id, dev) ? (XRT_BO_USE_UC_DEBUG << 4) : (XRT_BO_USE_DEBUG << 4);
auto size = static_cast<size_t>(arg[0]);

// Create ctx -> create bo -> destroy bo -> destroy ctx
Expand Down Expand Up @@ -765,7 +765,7 @@ std::vector<test_case> test_list {
TEST_POSITIVE, dev_filter_is_aie2, TEST_open_close_cu_context, {}
},
test_case{ "create_destroy_hw_queue", {},
TEST_POSITIVE, dev_filter_is_aie2, TEST_create_destroy_hw_queue, {}
TEST_POSITIVE, dev_filter_is_aie, TEST_create_destroy_hw_queue, {}
},
// Keep bad run before normal run to test recovery of hw ctx
test_case{ "io test async error", {},
Expand All @@ -784,10 +784,10 @@ std::vector<test_case> test_list {
TEST_POSITIVE, dev_filter_is_aie2, TEST_io_latency, { IO_TEST_NORMAL_RUN, IO_TEST_IOCTL_WAIT, 32000 }
},
test_case{ "create and free debug bo", {-1, -1},
TEST_POSITIVE, dev_filter_is_aie2, TEST_create_free_debug_bo, { 0x1000 }
TEST_POSITIVE, dev_filter_is_aie, TEST_create_free_debug_bo, { 0x1000 }
},
test_case{ "create and free large debug bo", {-1, -1},
TEST_POSITIVE, dev_filter_is_aie2, TEST_create_free_debug_bo, { 0x100000 }
TEST_POSITIVE, dev_filter_is_aie, TEST_create_free_debug_bo, { 0x100000 }
},
test_case{ "multi-command io test real kernel good run", {},
TEST_POSITIVE, dev_filter_is_aie2, TEST_io, { IO_TEST_NORMAL_RUN, 3 }
Expand All @@ -805,7 +805,7 @@ std::vector<test_case> test_list {
TEST_POSITIVE, dev_filter_is_aie2, TEST_elf_io, { IO_TEST_NORMAL_RUN, 1 }
},
test_case{ "Cmd fencing (user space side)", {},
TEST_POSITIVE, dev_filter_is_aie2, TEST_cmd_fence_host, {}
TEST_POSITIVE, dev_filter_is_aie, TEST_cmd_fence_host, {}
},
test_case{ "npu3 shim move memory tiles", {},
TEST_POSITIVE, dev_filter_is_aie4, TEST_shim_umq_memtiles, {}
Expand Down