[CHERRY-PICK] MdeModulePkg: Improved error handling in RuntimeDxe Variable drivers [Rebase & FF] - #1898
Conversation
|
Please amend the commit to contain [Cherry-Pick] in the commit message title. |
Also, same additional request mentioned in #1899 (review). |
…iable drivers Replace ASSERT_EFI_ERROR with proper error handling that returns failure status codes. This ensures platforms with ASSERT_DEADLOOP_ENABLED disabled handle errors gracefully. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com> (cherry picked from commit 8bf75267f9311a8a66a3864ee71426c70bb288bb)
bd7a9f0 to
2c1425a
Compare
|
Hi Michael Kubacki (@makubacki) and Aaron (@apop5) , Thanks for reviewing this draft. I created this first because the original edk2 PR was merged after stable tag 202608. But it seems MU_BASECORE's 202608 branch is not ready for PR. |
PaddyDeng-v, this would naturally be cherry-picked onto the 202608 branch for the reason you mentioned. Unless there is a strong reason it's needed in 2511, I suggest sticking to that. |
|
Closing this PR since the change will cherry picked as part of 202611 |
|
PaddyDeng-v, sorry if there was a misunderstanding, but I believe you should leave this PR open because you want the change in 202608, right? What I meant in "naturally be cherry-picked onto the 202608 branch" in my previous message is that it would be cherry-picked into 2608 (as you've done here) and not 2511 (as you did in the other PR) since 2608 is the upcoming release branch. |
Description
Cherry-pick of tianocore/edk2 PR #12670 (commit 8bf75267f9311a8a66a3864ee71426c70bb288bb).
This PR improves error handling in the Variable SMM/DXE RuntimeDxe drivers by replacing
ASSERT_EFI_ERRORcalls with proper error-returning handling. This ensures platforms withASSERT_DEADLOOP_ENABLEDdisabled handle initialization errors gracefully instead ofsilently continuing.
Changes
ASSERT_EFI_ERRORwithif (EFI_ERROR(...))+DEBUG+goto ErrorExitpatternErrorExitcleanup paths inVariableServiceInitialize()andMmVariableServiceInitialize()VariableCommonInitialize()error paths (callers handle cleanup)gEfiVariableArchProtocolGuidinstallation to end ofVariableServiceInitialize()VariableClearNotifySmmReady()function for SMM notification cleanupConflict Resolution
VariableDxe.c: Preserved mu_basecore'sInitializeVariablePolicyLockingcall (MU_CHANGE)while wrapping it with proper error handling instead of
ASSERT_EFI_ERROR.How This Was Tested
Cherry-picked and conflict-resolved from upstream edk2 where it passed CI.
Integration Checklist