Support debugger SLM write

Resolves: NEO-5998

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
This commit is contained in:
Matias Cabral
2022-09-27 12:10:18 +00:00
committed by Compute-Runtime-Automation
parent 6edbfa04a0
commit 56109b882f
6 changed files with 353 additions and 40 deletions

View File

@@ -1568,10 +1568,19 @@ ze_result_t DebugSessionLinux::writeMemory(ze_device_thread_t thread, const zet_
return status;
}
if (desc->type != ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
if (desc->type == ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT) {
status = writeDefaultMemory(thread, desc, size, buffer);
} else {
auto threadId = convertToThreadId(thread);
status = writeSLMMemory(threadId, desc, size, buffer);
}
return status;
}
ze_result_t DebugSessionLinux::writeDefaultMemory(ze_device_thread_t thread, const zet_debug_memory_space_desc_t *desc, size_t size, const void *buffer) {
ze_result_t status;
auto deviceBitfield = connectedDevice->getNEODevice()->getDeviceBitfield();
bool isa = tryWriteIsa(deviceBitfield, desc, size, buffer, status);