From patchwork Thu Apr 9 11:28:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 46939 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1611421416 for ; Thu, 9 Apr 2015 11:29:29 +0000 (UTC) Received: by lbcne10 with SMTP id ne10sf26058832lbc.1 for ; Thu, 09 Apr 2015 04:29:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=wzgfW01s3IogK8qtphB1RtEZhudpVpfPPbefKTwI+RY=; b=YEjpVL1DnoSx8ZGenk7V5ZJMSBqLfWblClCVjHckLVn3sW1IDraIKVb/jsNrHYZgby c2uYOcqIVhEZKRQblbl5DN0kekzbr8bqdiVkwlLSs7AHF/WlNv1gIbQAq/hY/mPdbiMs 8RKCJ2vH7yTNMzp6KdGYAxmwGEdmVAnICH5dJgoBApkiUrqdkYrdUWhp5FOVBDF43Ed9 p5HfKQDi+U6IEorC8KXgu7TV1iNRSJlB8B8lLes9zEg2kdsgUMl5UIvr8L2ijwTzxT93 S7KarUX5R7TcKi1FKRsIEu9XFwSdblu5GmyCL8KOHv2L6avGET1OyygKLh0+2mO6Rq9v zRUQ== X-Gm-Message-State: ALoCoQlwO8cuKZleXwu9PPz9EUgpAAZI90GmFwr4bN4UXNttjwzHmdX7mWgNf+9VT4vVpMKOgAdm X-Received: by 10.112.28.111 with SMTP id a15mr1960410lbh.21.1428578967941; Thu, 09 Apr 2015 04:29:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.195 with SMTP id da3ls307605lac.30.gmail; Thu, 09 Apr 2015 04:29:27 -0700 (PDT) X-Received: by 10.152.234.42 with SMTP id ub10mr3961035lac.60.1428578967797; Thu, 09 Apr 2015 04:29:27 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id da4si11226463lac.31.2015.04.09.04.29.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2015 04:29:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbcga7 with SMTP id ga7so38991187lbc.1 for ; Thu, 09 Apr 2015 04:29:27 -0700 (PDT) X-Received: by 10.112.162.167 with SMTP id yb7mr27060950lbb.76.1428578967639; Thu, 09 Apr 2015 04:29:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp411738lbt; Thu, 9 Apr 2015 04:29:26 -0700 (PDT) X-Received: by 10.43.55.12 with SMTP id vw12mr38619414icb.30.1428578963767; Thu, 09 Apr 2015 04:29:23 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id ah8si12352048icc.59.2015.04.09.04.29.23 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 09 Apr 2015 04:29:23 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YgAe3-0007hd-L1; Thu, 09 Apr 2015 11:29:15 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YgAe2-0007hY-4j for edk2-devel@lists.sourceforge.net; Thu, 09 Apr 2015 11:29:14 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.174 as permitted sender) client-ip=209.85.212.174; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f174.google.com; Received: from mail-wi0-f174.google.com ([209.85.212.174]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YgAe0-0002bk-Sx for edk2-devel@lists.sourceforge.net; Thu, 09 Apr 2015 11:29:14 +0000 Received: by widdi4 with SMTP id di4so88399752wid.0 for ; Thu, 09 Apr 2015 04:29:06 -0700 (PDT) X-Received: by 10.194.60.43 with SMTP id e11mr50367004wjr.36.1428578946891; Thu, 09 Apr 2015 04:29:06 -0700 (PDT) Received: from ards-macbook-pro.local ([90.174.5.113]) by mx.google.com with ESMTPSA id l10sm19692348wje.15.2015.04.09.04.29.04 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Apr 2015 04:29:05 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com Date: Thu, 9 Apr 2015 13:28:49 +0200 Message-Id: <1428578932-24079-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1428578932-24079-1-git-send-email-ard.biesheuvel@linaro.org> References: <1428578932-24079-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1YgAe0-0002bk-Sx Subject: [edk2] [PATCH v4 2/5] ArmPlatformPkg: do not fulfil MemoryInitPeiLib dependency directly via .c file X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 MemoryInitPeim short-circuits its MemoryInitPeiLib dependency by including the .c file directly. This prevents us from having a special implementation for ArmVirtualizationPkg that performs additional cache maintenance before enabling the MMU. So instead, make it depend on the library class. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc | 2 ++ ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc | 2 ++ ArmPlatformPkg/ArmPlatformPkg.dsc | 3 +++ ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc | 4 +++- ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 4 +++- ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf | 4 ++-- ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf | 2 +- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc index a260286eae44..8da387895c9b 100644 --- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc +++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc @@ -57,6 +57,8 @@ PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf + +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER] diff --git a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc index 9d14a3e7577d..75712cb0e4ee 100644 --- a/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc @@ -137,6 +137,8 @@ PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf + +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf [LibraryClasses.common.DXE_CORE] diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc index ada59bdeb869..28178d0b1f6c 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc @@ -133,6 +133,9 @@ DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf + [LibraryClasses.ARM.SEC] ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc index be58e6bfc399..fcd4d11e2d2e 100644 --- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc +++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc @@ -125,9 +125,11 @@ MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf - MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf !endif +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf + [LibraryClasses.common.PEI_CORE] HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc index 483e8698356d..e6637d8488d0 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc @@ -138,7 +138,6 @@ HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf - MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf !endif # Trustzone Support @@ -175,6 +174,9 @@ ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Pei/PeiArmPlatformGlobalVariableLib.inf PeiServicesTablePointerLib|ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf +[LibraryClasses.common.SEC, LibraryClasses.common.PEIM] + MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf + [LibraryClasses.common.DXE_CORE] HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf index 1e5b93e8a507..6d22b7c03441 100755 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf @@ -15,9 +15,9 @@ INF_VERSION = 0x00010005 BASE_NAME = ArmMemoryInitPeiLib FILE_GUID = 55ddb6e0-70b5-11e0-b33e-0002a5d5c51b - MODULE_TYPE = SEC + MODULE_TYPE = BASE VERSION_STRING = 1.0 - LIBRARY_CLASS = PlatformPeiLib + LIBRARY_CLASS = MemoryInitPeiLib|SEC PEIM [Sources] MemoryInitPeiLib.c diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf index 6374b63f8524..2c14a9c826ff 100755 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf @@ -28,7 +28,6 @@ [Sources] MemoryInitPeim.c - MemoryInitPeiLib.c [Packages] MdePkg/MdePkg.dec @@ -43,6 +42,7 @@ HobLib ArmLib ArmPlatformLib + MemoryInitPeiLib [Guids] gEfiMemoryTypeInformationGuid