mirror of https://github.com/acidanthera/audk.git
2a93cccc24
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1576 The root cause of this issue is that non-stop mode of Heap Guard and NULL Detection set TF bit (single-step) in EFLAG unconditionally in the common handler in CpuExceptionLib. If PcdCpuSmmStaticPageTable is FALSE, the SMM will only create page table for memory below 4G. If SMM tries to access memory beyond 4G, a page fault exception will be triggered and the memory to access will be added to page table so that SMM code can continue the access. Because of above issue, the TF bit is set after the page fault is handled and then fall into another DEBUG exception. Since non-stop mode of Heap Guard and NULL Detection are not enabled, no special DEBUG exception handler is registered. The default handler just prints exception context and go into dead loop. Actually EFLAGS can be changed in any standard exception handler. There's no need to do single-step setup in assembly code. So the fix is to move the logic to C code part of page fault exception handler so that we can fully validate the configuration and prevent TF bit from being set unexpectedly. Fixes: |
||
---|---|---|
.. | ||
Ia32 | ||
X64 | ||
CpuDxe.c | ||
CpuDxe.h | ||
CpuDxe.inf | ||
CpuDxe.uni | ||
CpuDxeExtra.uni | ||
CpuGdt.c | ||
CpuGdt.h | ||
CpuMp.c | ||
CpuMp.h | ||
CpuPageTable.c | ||
CpuPageTable.h |