mirror of https://github.com/acidanthera/audk.git
890d9ee554
> v2: > Reduce the number of page to update/restore from 3 to 2 because DF > has no effect in this issue. The infinite loop is caused by the memory instruction, such as "rep mov", operating on memory block crossing boundary of NON-PRESENT pages. Because the address triggering page fault set in CR2 will be in the first page, SmmProfilePFHandler() will only change the first page into PRESENT. The page following will be still in NON-PRESENT status. Since SmmProfilePFHandler() will setup single-step trap for the instruction causing #PF, when the handler returns back to the instruction and re-execute it, both #DB and #PF will be triggered because the instruction wants to access both first and second page but only first page is PRESENT. Normally #DB exception will be handled first and its handler will change first page back to NON-PRESENT status. Then #PF is handled and its handler will change first page to PRESENT status again and setup another single-step for the instruction triggering #PF. Then the whole system falls into an infinite loop and the memory operation will never move on. This patch fix above situation by always changing 2 pages to PRESENT status instead of just 1 page. Those 2 pages include the page causing #PF and the page after it. Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> |
||
---|---|---|
.. | ||
Ia32 | ||
X64 | ||
CpuS3.c | ||
CpuService.c | ||
CpuService.h | ||
MpService.c | ||
PiSmmCpuDxeSmm.c | ||
PiSmmCpuDxeSmm.h | ||
PiSmmCpuDxeSmm.inf | ||
PiSmmCpuDxeSmm.uni | ||
PiSmmCpuDxeSmmExtra.uni | ||
SmmCpuMemoryManagement.c | ||
SmmProfile.c | ||
SmmProfile.h | ||
SmmProfileInternal.h | ||
SmramSaveState.c | ||
SyncTimer.c |