On Thu, 25 Oct 2018 at 09:33, Sughosh Ganu <sughosh.g...@arm.com> wrote: > > From: Achin Gupta <achin.gu...@arm.com> > > This patch adds the definitions, sources, packages and library classes > needed to compile and link MMU Library suitable for use in S-EL0. > > Currently, this is used only during the Standalone MM Core > initialization and hence defined as MM_CORE_STANDALONE Module. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Sughosh Ganu <sughosh.g...@arm.com> > --- > ArmPkg/Library/ArmMmuLib/{ArmMmuPeiLib.inf => ArmMmuStandaloneMmCoreLib.inf} > | 23 +++++++++-----------
The code in the previous patch looks fine, but I'd prefer it if we expose this as a separate library class, not ArmMmuLib So please just add a new file, say, ArmPkg/include/Library/StandaloneMmMmuLib.h, add only the functions you need, and add it to the LibraryClasses section of ArmPkg.dec as a new library class. Then, you can modify the previous patch to include an updated .inf that describes it as being an implementation of StandaloneMmMmuLib. You can then also drop the unimplemented ArmConfigureMmu etc. > 1 file changed, 10 insertions(+), 13 deletions(-) > > diff --git a/ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf > b/ArmPkg/Library/ArmMmuLib/ArmMmuStandaloneMmCoreLib.inf > similarity index 51% > copy from ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf > copy to ArmPkg/Library/ArmMmuLib/ArmMmuStandaloneMmCoreLib.inf > index ecf13f790734..9f5593d3f6c8 100644 > --- a/ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf > +++ b/ArmPkg/Library/ArmMmuLib/ArmMmuStandaloneMmCoreLib.inf > @@ -1,6 +1,6 @@ > #/** @file > # > -# Copyright (c) 2016 Linaro Ltd. All rights reserved. > +# Copyright (c) 2017 - 2018, ARM Limited. All rights reserved. > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD > License > @@ -13,22 +13,20 @@ > #**/ > > [Defines] > - INF_VERSION = 0x00010005 > - BASE_NAME = ArmMmuPeiLib > - FILE_GUID = b50d8d53-1ad1-44ea-9e69-8c89d4a6d08b > - MODULE_TYPE = PEIM > + INF_VERSION = 0x0001001A > + BASE_NAME = ArmMmuStandaloneMmCoreLib > + FILE_GUID = da8f0232-fb14-42f0-922c-63104d2c70bd > + MODULE_TYPE = MM_CORE_STANDALONE > VERSION_STRING = 1.0 > - LIBRARY_CLASS = ArmMmuLib|PEIM > - CONSTRUCTOR = ArmMmuPeiLibConstructor > + LIBRARY_CLASS = > ArmMmuStandaloneMmCoreLib|MM_CORE_STANDALONE > + PI_SPECIFICATION_VERSION = 0x00010032 > + CONSTRUCTOR = ArmMmuStandaloneMmCoreLibConstructor > > [Sources.AARCH64] > - AArch64/ArmMmuLibCore.c > - AArch64/ArmMmuPeiLibConstructor.c > - AArch64/ArmMmuLibReplaceEntry.S > + AArch64/ArmMmuStandaloneMmCoreLib.c > > [Packages] > ArmPkg/ArmPkg.dec > - EmbeddedPkg/EmbeddedPkg.dec > MdePkg/MdePkg.dec > > [LibraryClasses] > @@ -36,5 +34,4 @@ [LibraryClasses] > CacheMaintenanceLib > MemoryAllocationLib > > -[Pcd.AARCH64] > - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize > + > -- > 2.7.4 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel