From 645152e849f232c706cad88635e3299dae07b6c1 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 28 Mar 2022 22:07:38 +0200 Subject: [PATCH] dart: Make dart translation error logs more informative Signed-off-by: Janne Grunau --- src/dart.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dart.c b/src/dart.c index d482f0c5..e2816e08 100644 --- a/src/dart.c +++ b/src/dart.c @@ -277,7 +277,8 @@ static void *dart_translate_internal(dart_dev_t *dart, uintptr_t iova, int silen u32 l1_index = (iova >> 25) & 0x7ff; if (!(dart->l1[ttbr][l1_index] & DART_PTE_VALID) && !silent) { - printf("dart: l1 translation failure %x %lx\n", l1_index, iova); + printf("dart[%lx %u]: l1 translation failure %x %lx\n", dart->regs, dart->device, l1_index, + iova); return NULL; } @@ -286,7 +287,8 @@ static void *dart_translate_internal(dart_dev_t *dart, uintptr_t iova, int silen (u64 *)(FIELD_GET(dart->offset_mask, dart->l1[ttbr][l1_index]) << DART_PTE_OFFSET_SHIFT); if (!(l2[l2_index] & DART_PTE_VALID) && !silent) { - printf("dart: l2 translation failure\n"); + printf("dart[%lx %u]: l2 translation failure %x:%x %lx\n", dart->regs, dart->device, + l1_index, l2_index, iova); return NULL; }