summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2015-10-16 15:46:32 +0000
committerlersek <lersek@Edk2>2015-10-16 15:46:32 +0000
commit8a4b243578e565d97939b79d88ba348832e37d15 (patch)
tree01983f3b965273f015a6c5a8c289ab8becb797d0
parent582085eb1fb85649d961d2b9a443e91d0faa85bf (diff)
downloadedk2-platforms-8a4b243578e565d97939b79d88ba348832e37d15.tar.xz
MdeModulePkg: FaultTolerantWriteDxe: mellow DEBUGs about workspace reinit
The IsValidWorkSpace() function checks if the working block header of the workspace is valid. A mismatch detected by this function is not necessarily an error; it can happen with an as-yet unwritten flash chip, which is e.g. common and normal when a new ArmVirtQemu virtual machine is booted. Therefore downgrade the message emitted by IsValidWorkSpace() from EFI_D_ERROR to EFI_D_INFO, and change the wording from "error" to "mismatch". The only caller of IsValidWorkSpace(), InitFtwProtocol(), handles all of the following cases: (1) IsValidWorkSpace() succeeds for the working block -- this is normal operation, (2) IsValidWorkSpace() fails for the working block, but succeeds for the spare block -- InitFtwProtocol() then restores the working block from the spare block, (3) IsValidWorkSpace() fails for both the working and spare blocks -- InitFtwProtocol() reinitializes the full workspace. In cases (2) and (3), InitFtwProtocol() logs additional messages about the branch taken. Their current level is EFI_D_ERROR, but the messages are arguably informative, not necessarily error reports. Downgrade these messages from EFI_D_ERROR to EFI_D_INFO, so that they don't clutter the debug output when the PcdDebugPrintErrorLevel mask only enables EFI_D_ERROR (i.e., in a "silent" build). These messages have annoyed / confused users; see for example: - https://bugzilla.redhat.com/show_bug.cgi?id=1270279 Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Drew Jones <drjones@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18619 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c6
-rw-r--r--MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
index 09223217e4..96044693cc 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
@@ -1280,7 +1280,8 @@ InitFtwProtocol (
//
if (IsValidWorkSpace (FtwDevice->FtwWorkSpaceHeader)) {
Status = FlushSpareBlockToWorkingBlock (FtwDevice);
- DEBUG ((EFI_D_ERROR, "Ftw: Restart working block update in InitFtwProtocol() - %r\n", Status));
+ DEBUG ((EFI_D_INFO, "Ftw: Restart working block update in %a() - %r\n",
+ __FUNCTION__, Status));
FtwAbort (&FtwDevice->FtwInstance);
//
// Refresh work space.
@@ -1288,7 +1289,8 @@ InitFtwProtocol (
Status = WorkSpaceRefresh (FtwDevice);
ASSERT_EFI_ERROR (Status);
} else {
- DEBUG ((EFI_D_ERROR, "Ftw: Both are invalid, init workspace\n"));
+ DEBUG ((EFI_D_INFO,
+ "Ftw: Both working and spare blocks are invalid, init workspace\n"));
//
// If both are invalid, then initialize work space.
//
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c
index 31f1e0bda6..d46a37fde3 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c
@@ -98,7 +98,7 @@ IsValidWorkSpace (
return TRUE;
}
- DEBUG ((EFI_D_ERROR, "Ftw: Work block header check error\n"));
+ DEBUG ((EFI_D_INFO, "Ftw: Work block header check mismatch\n"));
return FALSE;
}