diff options
author | Star Zeng <star.zeng@intel.com> | 2015-06-01 06:40:38 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@Edk2> | 2015-06-01 06:40:38 +0000 |
commit | d4848bb9df060fec042db4d216642f7c3e963d1b (patch) | |
tree | 3575b7d4fcc73f6198462d15a2182363ae9092af /MdeModulePkg/Core | |
parent | f096950dc7a25adbbaf688b20a1e4bed603ccdbb (diff) | |
download | edk2-d4848bb9df060fec042db4d216642f7c3e963d1b.zip edk2-d4848bb9df060fec042db4d216642f7c3e963d1b.tar.gz edk2-d4848bb9df060fec042db4d216642f7c3e963d1b.tar.bz2 |
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 <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
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Event/Tpl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/MdeModulePkg/Core/Dxe/Event/Tpl.c b/MdeModulePkg/Core/Dxe/Event/Tpl.c index 240e8e4..8ad0a33 100644 --- a/MdeModulePkg/Core/Dxe/Event/Tpl.c +++ b/MdeModulePkg/Core/Dxe/Event/Tpl.c @@ -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 @@ CoreRaiseTpl ( 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 @@ CoreRestoreTpl ( 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));
//
|