MdeModulePkg: Fix redundant call to RestoreTpl()

Comments out a redundant call to RestoreTpl(). While this does not
technically violate spec on raise/restore TPL, TPL should already be at
the specified level. This extra call introduces an asymmetry between
RaiseTpl and RestoreTpl calls, which makes analysis of TPL correctness
more difficult and hampers certain non-standard TPL usages that some
platforms require.  Additionally, the two TPL variables were renamed to
provide context for each of them.

Signed-off-by: Kenneth Lautner <kenlautner3@gmail.com>
This commit is contained in:
Ken Lautner
2024-08-23 15:39:53 -07:00
committed by mergify[bot]
parent b17ac09cc4
commit 559affab2e
2 changed files with 9 additions and 7 deletions

View File

@@ -1725,7 +1725,9 @@ CoreStartImage (
// Image has completed. Verify the tpl is the same
//
ASSERT (Image->Tpl == gEfiCurrentTpl);
CoreRestoreTpl (Image->Tpl);
if (Image->Tpl != gEfiCurrentTpl) {
CoreRestoreTpl (Image->Tpl);
}
CoreFreePool (Image->JumpBuffer);