From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: APXvYqxJCn83RhaeMs9KpoNvCKtuVNcdsoOjtcoBZGAxYvFdYidw55WZTn4/Ehnxty3cyYMGn2tMWQ== 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 Cc: ard.biesheuvel@linaro.org, Jian J Wang , Hao Wu , Ray Ni , Star Zeng , Andrew Fish , Laszlo Ersek , Michael D Kinney 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: [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: , X-List-Received-Date: Mon, 18 Mar 2019 14:56:29 -0000 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(+) 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. -- 2.11.0