Resolve SmmRebaseMode klocwork issue

Need to set an initial value for SmmRebaseMode in
order to resolve a klocwork issue regarding
unitialized usage.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
This commit is contained in:
James Gutbub 2021-04-14 07:13:19 -07:00 committed by Maurice Ma
parent d14b67caff
commit e21afb2368
1 changed files with 2 additions and 1 deletions

View File

@ -447,7 +447,8 @@ SecStartup (
}
// Skip SMM rebase if booting UEFI payload when AUTO mode is used
if (PcdGet8 (PcdSmmRebaseMode) == SMM_REBASE_AUTO) {
SmmRebaseMode = PcdGet8 (PcdSmmRebaseMode);
if (SmmRebaseMode == SMM_REBASE_AUTO) {
if (GetPayloadId () == UEFI_PAYLOAD_ID_SIGNATURE) {
SmmRebaseMode = SMM_REBASE_DISABLE;
} else {