public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Fu Siyuan <siyuan.fu@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Feng Tian <feng.tian@intel.com>, Star Zeng <star.zeng@intel.com>
Subject: Re: [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error.
Date: Wed, 1 Mar 2017 07:34:57 +0000	[thread overview]
Message-ID: <CAKv+Gu9fNcUCBZyfdpFuvnWkA=pANT05sn7+n4Y0ScZ0A_Jv0A@mail.gmail.com> (raw)
In-Reply-To: <1488341087-233076-1-git-send-email-siyuan.fu@intel.com>

On 1 March 2017 at 04:04, Fu Siyuan <siyuan.fu@intel.com> wrote:
> Cc: Feng Tian <feng.tian@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  MdeModulePkg/Core/Dxe/Mem/Page.c              | 2 +-
>  MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
> index d596db7..7e8fa94 100644
> --- a/MdeModulePkg/Core/Dxe/Mem/Page.c
> +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
> @@ -554,7 +554,7 @@ CoreAddMemoryDescriptor (
>    CoreReleaseMemoryLock ();
>
>    ApplyMemoryProtectionPolicy (EfiMaxMemoryType, Type, Start,
> -    EFI_PAGES_TO_SIZE (NumberOfPages));
> +    LShiftU64 (NumberOfPages, EFI_PAGE_SHIFT));
>
>    //
>    // If Loading Module At Fixed Address feature is enabled. try to allocate memory with Runtime code & Boot time code type
> diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> index 172d667..45f360c 100644
> --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
> @@ -851,7 +851,7 @@ InitializeDxeNxMemoryProtectionPolicy (
>      if (Attributes != 0) {
>        SetUefiImageMemoryAttributes (
>          MemoryMapEntry->PhysicalStart,
> -        EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages),
> +        LShiftU64 (MemoryMapEntry->NumberOfPages, EFI_PAGE_SHIFT),
>          Attributes);
>      }
>      MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);
> --
> 2.7.4.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


      parent reply	other threads:[~2017-03-01  7:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01  4:04 [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error Fu Siyuan
2017-03-01  4:13 ` Zeng, Star
2017-03-01  4:15   ` Tian, Feng
2017-03-01  7:34 ` Ard Biesheuvel [this message]

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='CAKv+Gu9fNcUCBZyfdpFuvnWkA=pANT05sn7+n4Y0ScZ0A_Jv0A@mail.gmail.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