]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c
UefiCpuPkg CpuExceptionHandlerLib: Enhance DumpModuleImageInfo()
authorStar Zeng <star.zeng@intel.com>
Wed, 27 Dec 2017 09:24:04 +0000 (17:24 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 2 Jan 2018 01:35:48 +0000 (09:35 +0800)
commitbb207f6cda96640d1df0fd573689ca6764e48db4
tree0f448907361c5d6becfd1ed640a1849f88cbcfc6
parent7dbc50bd244d95fdc1741b9cfc561f0bfd724de1
UefiCpuPkg CpuExceptionHandlerLib: Enhance DumpModuleImageInfo()

Enhance DumpModuleImageInfo() for page fault with I/D set.

If it is page fault with I/D set, the (E/R)IP in SystemContext
could not be used for DumpModuleImageInfo(), instead of, the next
IP of the IP triggering this page fault could be found from stack
by (E/R)SP in SystemContext.

IA32 SDM:
— I/D flag (bit 4).
This flag is 1 if the access causing the page-fault exception was
an instruction fetch. This flag describes the access causing the
page-fault exception, not the access rights specified by paging.

The idea comes from SmiPFHandler () in
UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c and
UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.c
UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c
UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c