audk/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32
Star Zeng 714c260301 UefiCpuPkg/PiSmmCpuDxeSmm: Fix memory protection crash
https://bugzilla.tianocore.org/show_bug.cgi?id=624 reports
memory protection crash in PiSmmCpuDxeSmm, Ia32 build with
RAM above 4GB (of which 2GB are placed in 64-bit address).
It is because UEFI builds identity mapping page tables,
>4G address is not supported at Ia32 build.

This patch is to get the PhysicalAddressBits that is used
to build in PageTbl.c(Ia32/X64), and use it to check whether
the address is supported or not in ConvertMemoryPageAttributes().

With this patch, the debug messages will be like below.
UefiMemory protection: 0x0 - 0x9F000 Success
UefiMemory protection: 0x100000 - 0x807000 Success
UefiMemory protection: 0x808000 - 0x810000 Success
UefiMemory protection: 0x818000 - 0x820000 Success
UefiMemory protection: 0x1510000 - 0x7B798000 Success
UefiMemory protection: 0x7B79B000 - 0x7E538000 Success
UefiMemory protection: 0x7E539000 - 0x7E545000 Success
UefiMemory protection: 0x7E55A000 - 0x7E61F000 Success
UefiMemory protection: 0x7E62B000 - 0x7F6AB000 Success
UefiMemory protection: 0x7F703000 - 0x7F70B000 Success
UefiMemory protection: 0x7F70F000 - 0x7F778000 Success
UefiMemory protection: 0x100000000 - 0x180000000 Unsupported

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Dong <eric.dong@intel.com>
Originally-suggested-by: Jiewen Yao <jiewen.yao@intel.com>
Reported-by: 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>
Tested-by: Laszlo Ersek <lersek@redhat.com>
2017-08-28 09:35:16 +08:00
..
MpFuncs.S UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
MpFuncs.asm UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
MpFuncs.nasm UefiCpuPkg PiSmmCpuDxeSmm: Update Ia32/MpFuncs.nasm 2016-06-28 09:52:13 +08:00
PageTbl.c UefiCpuPkg/PiSmmCpuDxeSmm: Fix memory protection crash 2017-08-28 09:35:16 +08:00
Semaphore.c UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
SmiEntry.S UefiCpuPkg/PiSmmCpuDxeSmm: Add missing JMP instruction 2017-05-19 13:59:27 -07:00
SmiEntry.asm UefiCpuPkg/PiSmmCpuDxeSmm: Fix .S & .asm build failure 2016-12-16 08:27:59 +08:00
SmiEntry.nasm UefiCpuPkg/PiSmmCpuDxeSmm: Remove PSD layout assumptions 2016-12-01 11:07:13 -08:00
SmiException.S UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD 2016-12-06 23:34:16 -08:00
SmiException.asm UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD 2016-12-06 23:34:16 -08:00
SmiException.nasm UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD 2016-12-06 23:34:16 -08:00
SmmFuncsArch.c UefiCpuPkg/PiSmmCpu: Fixed #double fault on #page fault. 2016-12-07 13:13:55 +08:00
SmmInit.S UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
SmmInit.asm UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00
SmmInit.nasm UefiCpuPkg/PiSmmCpuDxeSmm: remove superfluous ENDs from NASM source 2016-07-18 19:23:01 +02:00
SmmProfileArch.c UefiCpuPkg/PiSmmCpuDxeSmm: Add paging protection. 2016-11-17 16:30:07 +08:00
SmmProfileArch.h UefiCpuPkg: Add PiSmmCpuDxeSmm module IA32 files 2015-10-19 19:13:13 +00:00