From be4e290b27e97f84626174055aa85f13f7f424d9 Mon Sep 17 00:00:00 2001 From: Gu_Peiyi Date: Wed, 2 Aug 2023 11:11:07 +0800 Subject: [PATCH] [VP] Add Assert Message in GenKrnBin Hex file may be not 28 bytes aligned. Add assert message if hex is not aligned. --- Tools/MediaDriverTools/GenKrnBin/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tools/MediaDriverTools/GenKrnBin/main.cpp b/Tools/MediaDriverTools/GenKrnBin/main.cpp index 30f0cfff47..575f4f19c4 100755 --- a/Tools/MediaDriverTools/GenKrnBin/main.cpp +++ b/Tools/MediaDriverTools/GenKrnBin/main.cpp @@ -434,11 +434,19 @@ void ConcatenateKernelBinary(char *pKernelName, bool bVerbose) // no data to read - EOF if (dwBytesRead == 0) { + if (iBuffLeft > 4) + { + fprintf(stderr, "Hex file %s is not 32 bytes aligned. Left %d bytes not processed. May have critical issue!!!\n", pKernelName, iBuffLeft); + } iBuffLeft = -1; } } else { + if (iBuffLeft > 4) + { + fprintf(stderr, "Hex file %s is not 32 bytes aligned. Left %d bytes not processed. May have critical issue!!!\n", pKernelName, iBuffLeft); + } iBuffLeft = -1; } }