From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::143; helo=mail-it1-x143.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x143.google.com (mail-it1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (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 96F902118F76A for ; Fri, 23 Nov 2018 10:28:32 -0800 (PST) Received: by mail-it1-x143.google.com with SMTP id h193so19089675ita.5 for ; Fri, 23 Nov 2018 10:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iUnGtBqRrYyx+tVsATNBe2xqrPLuyqQi4i+ewloCyL0=; b=C45OHT395FefO9AR6IabM7U7lqqRTFhcsBabvIt3U22NU6D6h1yZ7z/yzeeLTPBAKH ARF64qLr2Y3OOX7IT7ng27yk3y/bVpZhDnJJXgFSe3hWT/reWhsrdHqs4m+bcy6sxOl9 Dw5CANRVBNMCMRkA5b1a7GHoe+xGbL8i0fag4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iUnGtBqRrYyx+tVsATNBe2xqrPLuyqQi4i+ewloCyL0=; b=Y5l74WNyNFQxp6aUnMZcgQrO/DvK5AUozj97Oy+qTHw8IYhHk3HCHy9+K7yqJOws3g 0SZlnUeG7yeAXkEyWFeMOzDFqz6OAlq4gCAZvM2csP84sKWO2RbzEOCSpuGnRCWrOzzN sfBc4cEzXQczXZObjocWGIi3v/+wvm4l4u81XkRMldzBXhMlhO8t/T3YIQmMLxeJRuL2 f1GN5Nk6Nr25be0/MYuZExWs+pDwmk9I8Fm5NM6jDtFHGHztPzjPT4pcs7m/8yAvBgF+ 4GJEcStMiO73cRn38t1wgCWu7b5jiEebB3kauxeB1zjUT5Ekg4wMt6rflIZL9WK6Jkpu Te7g== X-Gm-Message-State: AGRZ1gIgxaOEA5fZH40zM727WaJeJiP5HEmfrFpOJG7tjgPy9Nj/CsXO hvE+DNHKux+s3IP5bMjwyOp4Dq9pMmkmUSxxz7zLGQ== X-Google-Smtp-Source: AJdET5cr4oLb9a3VDkzpMYCixzOH+ZY7/vGrRM6lElEVjitzomaE7ullykO7p0f1ImxpHUae4DzofwkrIeeEtomW6mQ= X-Received: by 2002:a05:660c:4b:: with SMTP id p11mr14640558itk.71.1542997711766; Fri, 23 Nov 2018 10:28:31 -0800 (PST) MIME-Version: 1.0 References: <1540452759-4875-1-git-send-email-sughosh.ganu@arm.com> <1540452759-4875-7-git-send-email-sughosh.ganu@arm.com> In-Reply-To: <1540452759-4875-7-git-send-email-sughosh.ganu@arm.com> From: Ard Biesheuvel Date: Fri, 23 Nov 2018 19:28:19 +0100 Message-ID: To: Sughosh Ganu Cc: "edk2-devel@lists.01.org" , Achin Gupta , Leif Lindholm Subject: Re: [PATCH v3 6/6] ArmPkg/ArmMmuLib: Add MMU library inf file suitable for use in S-EL0. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 18:28:32 -0000 Content-Type: text/plain; charset="UTF-8" On Thu, 25 Oct 2018 at 09:33, Sughosh Ganu wrote: > > From: Achin Gupta > > 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 > --- > 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 >