From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2CAFA821B9 for ; Tue, 28 Feb 2017 23:34:58 -0800 (PST) Received: by mail-io0-x22e.google.com with SMTP id l7so25550747ioe.3 for ; Tue, 28 Feb 2017 23:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zJXC+pcMFz7VbQaRGli+YLqxTuuiU49ihLYNUCXOC0M=; b=a9t+hCscE96Lz2bMF4W6FdB14UEnvaF5kSBHP3QiYy3ikag+mAyUvMiW3Jgl+pyCLQ klWM/wEi/zxoeR/mnf/40m1fRW7RPmM8oGvav9oJBHj8SM6/SE6ZmZdWOM4N5arkkllk a/NX4SLAeCcK79q2R81JJbxSzwcocqtTChTRc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zJXC+pcMFz7VbQaRGli+YLqxTuuiU49ihLYNUCXOC0M=; b=ZgWVFwoz5DcpKIHmLb2Pq+RdtFW+SK4c1D6N4HtG+l8YwxkJ3+vyUET6MtIpSpsbiv nCpYI+KFFpocwVlCKIlKqAvqXvugja6W4F4oCI5Kqn44UqmkdXTnum+7Llbo3HomfJJz itwsV0xJklKQYzwMZeXHjbO+Dl1kEp2XFzkRdwzrOJQ3fIxpL5tH3H9NgS0Rr8IKKX1e h9IJ+tWcYY5lnJVowN0z9Buc1W5vVRqbuT4Hf1LXgMHT6ngJxqjM044+fiY4Qk1bWiR3 zUNar/UvyebcOVB2RH74T/1/Qb6zVh+1ikG2lq9KyhzJymfpTyx2PiyYXstHUn+8z0so P5jA== X-Gm-Message-State: AMke39ljkprpx1/zMPmRCU/QwQwnsvR842dksN9aWfb1vSO2c4xODGEPvBNZZ9u3lXfiUzBJy/D1j+NnPORh/vrT X-Received: by 10.107.13.130 with SMTP id 124mr6548381ion.83.1488353697518; Tue, 28 Feb 2017 23:34:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.10.27 with HTTP; Tue, 28 Feb 2017 23:34:57 -0800 (PST) In-Reply-To: <1488341087-233076-1-git-send-email-siyuan.fu@intel.com> References: <1488341087-233076-1-git-send-email-siyuan.fu@intel.com> From: Ard Biesheuvel Date: Wed, 1 Mar 2017 07:34:57 +0000 Message-ID: To: Fu Siyuan Cc: "edk2-devel@lists.01.org" , Feng Tian , Star Zeng Subject: Re: [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 07:34:58 -0000 Content-Type: text/plain; charset=UTF-8 On 1 March 2017 at 04:04, Fu Siyuan wrote: > Cc: Feng Tian > Cc: Star Zeng > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Fu Siyuan Reviewed-by: Ard Biesheuvel > --- > 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