mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 21:54:27 +02:00
UefiCpuPkg: Remove duplicate code in SmiPfHandler
In this commit, we remove duplicate CpuDeadLoop in SmiPfHandler where mCpuSmmRestrictedMemoryAccess is TRUE. With last commit, we always call CpuDeadLoop if SMM profile is disabled. Then the CpuDeadLoop calling for the condition (mCpuSmmRestrictedMemoryAccess && IsSmmCommBufferForbiddenAddress (PFAddress)) is not needed anymore. We also modify the IA32 related code to be aligned with X64. Signed-off-by: Dun Tan <dun.tan@intel.com>
This commit is contained in:
parent
b5c9bbff8e
commit
cae90a8390
@ -195,13 +195,7 @@ SmiPFHandler (
|
||||
}
|
||||
|
||||
if (IsSmmCommBufferForbiddenAddress (PFAddress)) {
|
||||
DumpCpuContext (InterruptType, SystemContext);
|
||||
DEBUG ((DEBUG_ERROR, "Access SMM communication forbidden address (0x%x)!\n", PFAddress));
|
||||
DEBUG_CODE (
|
||||
DumpModuleInfoByIp ((UINTN)SystemContext.SystemContextIa32->Eip);
|
||||
);
|
||||
CpuDeadLoop ();
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,6 +206,9 @@ SmiPFHandler (
|
||||
);
|
||||
} else {
|
||||
DumpCpuContext (InterruptType, SystemContext);
|
||||
DEBUG_CODE (
|
||||
DumpModuleInfoByIp ((UINTN)SystemContext.SystemContextIa32->Eip);
|
||||
);
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
|
||||
|
@ -966,13 +966,7 @@ SmiPFHandler (
|
||||
}
|
||||
|
||||
if (mCpuSmmRestrictedMemoryAccess && IsSmmCommBufferForbiddenAddress (PFAddress)) {
|
||||
DumpCpuContext (InterruptType, SystemContext);
|
||||
DEBUG ((DEBUG_ERROR, "Access SMM communication forbidden address (0x%lx)!\n", PFAddress));
|
||||
DEBUG_CODE (
|
||||
DumpModuleInfoByIp ((UINTN)SystemContext.SystemContextX64->Rip);
|
||||
);
|
||||
CpuDeadLoop ();
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -983,6 +977,9 @@ SmiPFHandler (
|
||||
);
|
||||
} else {
|
||||
DumpCpuContext (InterruptType, SystemContext);
|
||||
DEBUG_CODE (
|
||||
DumpModuleInfoByIp ((UINTN)SystemContext.SystemContextX64->Rip);
|
||||
);
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user