public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Star Zeng <star.zeng@intel.com>, edk2-devel@lists.01.org
Cc: Jiewen Yao <jiewen.yao@intel.com>, Eric Dong <eric.dong@intel.com>
Subject: Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix memory protection crash
Date: Thu, 24 Aug 2017 12:21:29 +0200	[thread overview]
Message-ID: <820cfd94-d25e-214f-5555-92fc69951268@redhat.com> (raw)
In-Reply-To: <1503544809-166388-1-git-send-email-star.zeng@intel.com>

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 <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>
> ---
>  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


  parent reply	other threads:[~2017-08-24 10:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24  3:20 [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix memory protection crash Star Zeng
2017-08-24  8:51 ` Yao, Jiewen
2017-08-24  9:02   ` Zeng, Star
2017-08-24 10:21 ` Laszlo Ersek [this message]
2017-08-24 10:28   ` Zeng, Star
2017-08-25  9:49 ` Laszlo Ersek
2017-08-25  9:53   ` Zeng, Star
2017-08-25 11:52     ` Laszlo Ersek
2017-08-26  2:24       ` Zeng, Star
2017-08-27 17:10         ` Laszlo Ersek
2017-08-28  1:59           ` Zeng, Star

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=820cfd94-d25e-214f-5555-92fc69951268@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox