Revision: 17543
          http://sourceforge.net/p/edk2/code/17543
Author:   lzeng14
Date:     2015-06-01 06:40:38 +0000 (Mon, 01 Jun 2015)
Log Message:
-----------
MdeModulePkg DxeCore: Add debug message to assist TPL related issues.

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 <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c

Modified: trunk/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c
===================================================================
--- trunk/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c        2015-05-31 01:55:43 UTC 
(rev 17542)
+++ trunk/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c        2015-06-01 06:40:38 UTC 
(rev 17543)
@@ -1,7 +1,7 @@
 /** @file
   Task priority (TPL) functions.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
@@ -65,7 +65,10 @@
   EFI_TPL     OldTpl;
 
   OldTpl = gEfiCurrentTpl;
-  ASSERT (OldTpl <= NewTpl);
+  if (OldTpl > NewTpl) {
+    DEBUG ((EFI_D_ERROR, "FATAL ERROR - RaiseTpl with OldTpl(0x%x) > 
NewTpl(0x%x)\n", OldTpl, NewTpl));
+    ASSERT (FALSE);
+  }
   ASSERT (VALID_TPL (NewTpl));
 
   //
@@ -102,7 +105,10 @@
   EFI_TPL     OldTpl;
 
   OldTpl = gEfiCurrentTpl;
-  ASSERT (NewTpl <= OldTpl);
+  if (NewTpl > OldTpl) {
+    DEBUG ((EFI_D_ERROR, "FATAL ERROR - RestoreTpl with NewTpl(0x%x) > 
OldTpl(0x%x)\n", NewTpl, OldTpl));
+    ASSERT (FALSE);
+  }
   ASSERT (VALID_TPL (NewTpl));
 
   //


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to