Hi,

On 08/24/17 05:20, Star Zeng wrote:
> 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 <[email protected]>
> Cc: Laszlo Ersek <[email protected]>
> Cc: Eric Dong <[email protected]>
> Originally-suggested-by: Jiewen Yao <[email protected]>
> Reported-by: Laszlo Ersek <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <[email protected]>
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c           |  4 +++
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h         |  1 +
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 31 
> +++++++++++++++++-----
>  3 files changed, 30 insertions(+), 6 deletions(-)

I might need a few days before I can test this. Please continue
reviewing / discussing the patch (and if v2 is necessary, please CC me);
just please give me a chance to test it before merging it. I hope I can
test it beginning of next week at the latest.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to