From patchwork Mon Mar 18 14:56:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 160493 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp2748933jad; Mon, 18 Mar 2019 07:56:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9IM1V+sbfI74jWHn89WYxutw/A9F/OSWbf/bISC59Xu/gJTdxB4f+Z3lQ044EqzlinAFf X-Received: by 2002:a17:902:45a5:: with SMTP id n34mr20511182pld.127.1552920991338; Mon, 18 Mar 2019 07:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552920991; cv=none; d=google.com; s=arc-20160816; b=shNnnGMbsyUTRcqVZDfy9dQyRapU2B/aurR2lJQUIhQlqmEUBY+y7t6ZVLmLPH7mcB pNXVMeNSzBf905lYOU3DIJmNq/CPGt6+7bZnRjh6sIA/LLCIx9r8a+gfX3OatI3/7Q8u G33l5sWuv37Z9AXrJzN3d2v91QyejTY6R2WUGjVAPSr9flP6WRGBT7yU1iL38LRxjIe+ rnezXQaKg6YvN89+ZkuNZ+sSAOurdmgimRJWrXPH4UjNfzKHsUGzxPELS+uvr5D2Beli UMJ7Fv960jRnrPYg5Xln6pJMaE4sJMlvqamZBwVBvCEZjURBEWBo5Og16E7ib+kvTuT2 tQDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=M4MdP27+kTE4w4aWGiW065kQ/I8SjbZe3ovnMCep+Ck=; b=VlloV/X5nlJ0iKJlafcILA8vmBeNIFssGnDE2qAJE85Afi++EYAbXA1zBGxWsQY/tJ PPb2xP86v6QMBc68dl0KulALFEhpPYe+6yqQ9QdHnJ3YKq5oOLdyelAjya/ONkWoqosX RudQWdM8pRUsr891lscicFF6cF8nyPFv9VGPyYp2Ax87GD8UQ3TmPrdIJ+7y/ysZ3PPp zqk3FdX9Pl9VwdFpDxX9tOLDYPg7d9yVtbLoKlsrNbjN+h5RruHefirHsNt1igbqveVD gW58wZONlatzXhE6d5/0ZHj2EzqXtizOofH2KP0Q7NwkE2tV5pLw/ct5F+XBWdrSXjk2 pA1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Bs8Dqanp; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id z8si9631471pfi.232.2019.03.18.07.56.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 07:56:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Bs8Dqanp; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AF0C021A07A82; Mon, 18 Mar 2019 07:56:30 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 D6821211D9405 for ; Mon, 18 Mar 2019 07:56:28 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id 33so17435101wrb.13 for ; Mon, 18 Mar 2019 07:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=uGYubMIuupIy1kG8LjbVjPtwQCOc8WM2i6F115uzAxc=; b=Bs8Dqanp61Qhm9fHUmZvG/qmm68nPHIRAsNoLBT8Fa2x5NxeR8QfogqDkfB4Ff8o7v SAOz+CNKqiqKNIh6oGzCFOSePq2WcySA/cwXgFkJX97YApKpd+PoYHygwMLgjcgGUzh9 SNEZy5791cfB18oIiBbXNEymFtwgWw/p9NVXWyQ3wRNYJOMgtVU86RFxj2B84f9GT6aN CLCCsE8oc6sCTKRtrWdt+dHAJ2wivfMhv1wMgqR19WyZKG0W/6fUJe+y54WNpHi01P9A 68Bq2EznR8CKAJaI0ViBrXQdIdEKPulok6fR5EeBYaUI5LnfzIPl0Al5ccsOmrt0YVkB SW/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uGYubMIuupIy1kG8LjbVjPtwQCOc8WM2i6F115uzAxc=; b=WnC/gtOoLWRjJ5nNed7uk9oG6fgZRwQYgc9CG8St1gX+MtRcDpxHxi6ZY5f15ucjpN TVQ2VyPrP4vzyWEPLuW4mFmBk//UzVvYPXE9QlY2C3IYPX41Rq6azQfv/uLiVNF28Ue1 3U7xlyG88mPnXvnb1yheSBj9eC39Cf8AJrXWKBKNR3cb9Py5zMbU+Pw1ElZTwxnqiDoS ToopCURhay00pC1TRF0+n88yHlLbPQntwVFymtg7jUYfetJhiipCqCpFc37wM+9wooG+ 6uSLi90OLnp2tnVhoh7u7fow9sxyOMTBw71KeD5oPCckvGkPSgoXgdevjJo6gBSiK+mr HcuQ== X-Gm-Message-State: APjAAAUAhZbqGSyDbe8mzK2kwpRTPSp8PZohWN0FaT9t/6UCYq6WC+ZD KGMDaQL1+Bf4Rb1YcnCvJkpL/0J0/OY= X-Received: by 2002:a5d:6292:: with SMTP id k18mr8152654wru.303.1552920987025; Mon, 18 Mar 2019 07:56:27 -0700 (PDT) Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id f7sm8826102wru.3.2019.03.18.07.56.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 07:56:26 -0700 (PDT) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Mon, 18 Mar 2019 14:56:25 +0000 Message-Id: <20190318145625.29000-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [RFC PATCH] MdeModulePkg: add LockBoxNullLib for !IA32/X64 in .dsc 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: , Cc: Hao Wu , Michael D Kinney , Laszlo Ersek , Star Zeng MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Commit 05fd2a926833 ("MdeModulePkg/NvmExpressPei: Consume S3StorageDeviceInitList LockBox") added a dependency on LockBoxLib to NvmExpressPei, causing builds using MdeModulePkg.dsc to fail on architectures other than IA32/X64 with missing reference to gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode. Add a resolution for LockBoxNullLib for ARM/AARCH64 to restore builds. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- Note: this patch hides the symptom, but this isn't really the fix I would like to see. The build error is caused by the chain of: 1) NvmExpressPei depending on LockBoxLib 2) LockBoxLib being mapped to SmmLockBoxPeiLib in [LibraryClasses.common.PEIM] 3) SmmLockBoxPeiLib depending on PcdDxeIplSwitchToLongMode 4) PcdDxeIplSwitchToLongMode being declared in [PcdsFeatureFlag.IA32, PcdsFeatureFlag.X64] in MdeModulePkg.dsc Now, an alternative quick-fix would be to move the PEIM LockBoxLib mapping into a [LibraryClasses.IA32.PEIM, LibraryClasses.X64.PEIM] section. But that would leave NvmExpressPei unbuildable on anything not IA32/X64. Another option would be to add default declaration (for all other architectures) of FALSE for PcdDxeIplSwitchToLongMode in MdeModulePkg.dec, but the current way this is expressed seems to treat this as an architecture-specific feature (which it is). What I believe would be the cleanest solution would be to abstract NvmExpressPei to the point where it can function without the LockBoxLib. But regardless, it does not look valid to me for something as architecture-specific as MdeModulePkg/Library/SmmLockBoxLib/ to live under .common sections in the .dsc. (And if this changes at some point, because we implement an ARM/AARCH64 equivalent based on StandaloneMmPkg, we will need a major refactoring of that library anyway.) / Leif MdeModulePkg/MdeModulePkg.dsc | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek Reviewed-by: Laszlo Ersek Reviewed-by: Hao Wu diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 6cd1727a0d..6e27e9cb68 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -178,6 +178,7 @@ [LibraryClasses.common.MM_STANDALONE] [LibraryClasses.ARM, LibraryClasses.AARCH64] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf + LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf # # It is not possible to prevent ARM compiler calls to generic intrinsic functions.