]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg DxeCore: Add debug message to assist TPL related issues.
authorStar Zeng <star.zeng@intel.com>
Mon, 1 Jun 2015 06:40:38 +0000 (06:40 +0000)
committerlzeng14 <lzeng14@Edk2>
Mon, 1 Jun 2015 06:40:38 +0000 (06:40 +0000)
The debug message is to print the current TPL and requested TPL value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17543 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/Event/Tpl.c

index 240e8e453d0763359dd1fd568961950d137fa198..8ad0a337015600614492d0094b87ddfb36c05e0c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Task priority (TPL) functions.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -65,7 +65,10 @@ CoreRaiseTpl (
   EFI_TPL     OldTpl;\r
 \r
   OldTpl = gEfiCurrentTpl;\r
-  ASSERT (OldTpl <= NewTpl);\r
+  if (OldTpl > NewTpl) {\r
+    DEBUG ((EFI_D_ERROR, "FATAL ERROR - RaiseTpl with OldTpl(0x%x) > NewTpl(0x%x)\n", OldTpl, NewTpl));\r
+    ASSERT (FALSE);\r
+  }\r
   ASSERT (VALID_TPL (NewTpl));\r
 \r
   //\r
@@ -102,7 +105,10 @@ CoreRestoreTpl (
   EFI_TPL     OldTpl;\r
 \r
   OldTpl = gEfiCurrentTpl;\r
-  ASSERT (NewTpl <= OldTpl);\r
+  if (NewTpl > OldTpl) {\r
+    DEBUG ((EFI_D_ERROR, "FATAL ERROR - RestoreTpl with NewTpl(0x%x) > OldTpl(0x%x)\n", NewTpl, OldTpl));\r
+    ASSERT (FALSE);\r
+  }\r
   ASSERT (VALID_TPL (NewTpl));\r
 \r
   //\r