From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5846E1A1E45 for ; Tue, 13 Sep 2016 11:06:06 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BBBBD1556C; Tue, 13 Sep 2016 18:06:05 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-142.phx2.redhat.com [10.3.116.142]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8DI64sK002638; Tue, 13 Sep 2016 14:06:05 -0400 To: Ard Biesheuvel , edk2-devel@ml01.01.org References: <1473787681-27142-1-git-send-email-ard.biesheuvel@linaro.org> From: Laszlo Ersek Message-ID: Date: Tue, 13 Sep 2016 20:06:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1473787681-27142-1-git-send-email-ard.biesheuvel@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 13 Sep 2016 18:06:05 +0000 (UTC) Subject: Re: [PATCH] ArmVirtPkg: move all platforms to MdePkg/ BaseMemoryLib implementations 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: Tue, 13 Sep 2016 18:06:06 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 09/13/16 19:28, Ard Biesheuvel wrote: > The BaseMemoryLibStm implementation under ArmPkg/ is being deprecated, > in favor of the generic versions under MdePkg, now that ARM and AARCH64 > support has been added to both the generic C version (BaseMemoryLib) and > the accelerated version (BaseMemoryLibOptDxe). The latter uses unaligned > accesses and special cache maintenance instructions, and can therefore > not be used when the MMU is off. > > So move to BaseMemoryLibOptDxe for the DXE phase and later, and to the > generic BaseMemoryLib before that. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmVirtPkg/ArmVirt.dsc.inc | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc > index 6c6a52b5e6fb..c624b3cdbecd 100644 > --- a/ArmVirtPkg/ArmVirt.dsc.inc > +++ b/ArmVirtPkg/ArmVirt.dsc.inc > @@ -67,9 +67,8 @@ [LibraryClasses.common] > # > PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf > > - # 1/123 faster than Stm or Vstm version > - #BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > - BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf > + # use the accelerated BaseMemoryLibOptDxe by default, overrides for SEC/PEI below > + BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf > > # Networking Requirements > NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf > @@ -154,6 +153,7 @@ [LibraryClasses.common] > > [LibraryClasses.common.SEC] > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > > DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf > DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf > @@ -165,6 +165,7 @@ [LibraryClasses.common.SEC] > > [LibraryClasses.common.PEI_CORE] > PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > @@ -181,6 +182,7 @@ [LibraryClasses.common.PEI_CORE] > > [LibraryClasses.common.PEIM] > PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > Reviewed-by: Laszlo Ersek