From da1577b24a4964dfbfcf35f65631cbaa8b7b8ded Mon Sep 17 00:00:00 2001 From: vit9696 Date: Thu, 23 Apr 2020 18:46:25 +0300 Subject: [PATCH] OcDebugLogLib: Do not attempt file logging at high TPL --- Library/OcDebugLogLib/OcLog.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Library/OcDebugLogLib/OcLog.c b/Library/OcDebugLogLib/OcLog.c index 5a3320c8..dbbffba7 100755 --- a/Library/OcDebugLogLib/OcLog.c +++ b/Library/OcDebugLogLib/OcLog.c @@ -291,12 +291,14 @@ OcLogAddEntry ( // I know it is slow, but fixed size write is more reliable with broken FAT32 driver. // if ((OcLog->Options & OC_LOG_FILE) != 0 && OcLog->FileSystem != NULL) { - SetFileData ( - OcLog->FileSystem, - OcLog->FilePath, - Private->AsciiBuffer, - (UINT32) Private->AsciiBufferSize - ); + if (EfiGetCurrentTpl () <= TPL_CALLBACK) { + SetFileData ( + OcLog->FileSystem, + OcLog->FilePath, + Private->AsciiBuffer, + (UINT32) Private->AsciiBufferSize + ); + } } //