From 1d2e73c4af62cf7fe55a873558057e30249f4f4f Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Sat, 11 Jul 2026 09:47:32 -0700 Subject: [PATCH] MdeModulePkg/Core/Dxe: Refactor CoreSetInterruptState enable path Refactor the CoreSetInterruptState(TRUE) flow so EnableInterrupt() is invoked through a single call site. Behavior is unchanged: interrupts remain disabled in SMM and are enabled outside SMM. Signed-off-by: Michael D Kinney --- MdeModulePkg/Core/Dxe/Event/Tpl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Event/Tpl.c b/MdeModulePkg/Core/Dxe/Event/Tpl.c index b33f80573c..c4768290f4 100644 --- a/MdeModulePkg/Core/Dxe/Event/Tpl.c +++ b/MdeModulePkg/Core/Dxe/Event/Tpl.c @@ -32,15 +32,14 @@ CoreSetInterruptState ( return; } - if (gSmmBase2 == NULL) { - gCpu->EnableInterrupt (gCpu); - return; + if (gSmmBase2 != NULL) { + Status = gSmmBase2->InSmm (gSmmBase2, &InSmm); + if (EFI_ERROR (Status) || InSmm) { + return; + } } - Status = gSmmBase2->InSmm (gSmmBase2, &InSmm); - if (!EFI_ERROR (Status) && !InSmm) { - gCpu->EnableInterrupt (gCpu); - } + gCpu->EnableInterrupt (gCpu); } /**