UefiCpuPkg:CpuDeadLoop in SmiPFHandler if SMM profile is disabled

Always call CpuDeadLoop() in SmiPFHandler if SMM
profile is disabled.

Previously, when PcdCpuSmmRestrictedMemoryAccess is
FALSE, SMM page table only covers [0, 4g]. When code
access to range above 4g happens, SmiPFHandler will map
the accessed not-present range to present. After we
always create full mapping page table, the dynamic page
table creation logic is only needed when SMM profile is
enabled. So we use CpuDeadLoop() in SmiPFHandler to cover
the all the PF exception when SMM profile is disabled

Considering that [0, 4g] is always mapped in SMM page
table, we also modify the IA32 SmiPFHandler code to be
aligned with X64 code.

Signed-off-by: Dun Tan <dun.tan@intel.com>
This commit is contained in:
Dun Tan 2024-07-25 13:56:37 +08:00 committed by mergify[bot]
parent b3631ca944
commit b5c9bbff8e
2 changed files with 4 additions and 3 deletions

View File

@ -212,7 +212,7 @@ SmiPFHandler (
);
} else {
DumpCpuContext (InterruptType, SystemContext);
SmiDefaultPFHandler ();
CpuDeadLoop ();
}
Exit:

View File

@ -1,7 +1,7 @@
/** @file
Page Fault (#PF) handler for X64 processors
Copyright (c) 2009 - 2023, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@ -982,7 +982,8 @@ SmiPFHandler (
SystemContext.SystemContextX64->ExceptionData
);
} else {
SmiDefaultPFHandler ();
DumpCpuContext (InterruptType, SystemContext);
CpuDeadLoop ();
}
Exit: