From patchwork Mon Sep 5 14:33:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75433 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp103300qgf; Mon, 5 Sep 2016 07:34:43 -0700 (PDT) X-Received: by 10.200.48.134 with SMTP id v6mr5159610qta.8.1473086083683; Mon, 05 Sep 2016 07:34:43 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t2si17766264qkf.161.2016.09.05.07.34.43; Mon, 05 Sep 2016 07:34:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6093060C20; Mon, 5 Sep 2016 14:34:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 62AAD60C18; Mon, 5 Sep 2016 14:34:06 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9061960A40; Mon, 5 Sep 2016 14:34:00 +0000 (UTC) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by lists.linaro.org (Postfix) with ESMTPS id 4625D60C1A for ; Mon, 5 Sep 2016 14:33:32 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id w12so5977292wmf.0 for ; Mon, 05 Sep 2016 07:33:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VUVPBpfmClQtl3+/MjtrGEJ/X1IiD8lD/I0ovbKG4NQ=; b=hr+SqZRxpabfQzk08h0FEnxck9x12etTrqU/EOI/HhAZ6O4QOX6SVVmujM0jvVy36B mOhktfCNiO0HOIBUB4oL8mWjuYuTgTxyCxvj0oVuvuez4B11ASmzZVe5uoF6/v9uYmkz w4/ME84JwJhIptxYOjmqE7GVuGPyl3Y83tf5tuU9ZQtgSuHDSrZIptkosK8+xQo4fiOv WxAl7lwxFZnMCTQtc+XBE9Qh9IEYAR7PJA8RAJQ79/7MAqMxzm12ikHrfc9HuMfDvaGx 3WD5catw78lIOt5IhcmwvF81o0jf1SH/5IHi2j2UCfFSy/BlceCWuzXFbpFT8NP6YFAm oWOw== X-Gm-Message-State: AE9vXwMS0meJL7UB39IIsJ2jrCcZvcef+mg9/aKIxBTC6yOd0yb+Q/d/BM3g3yFffrGc5NiQXRM= X-Received: by 10.28.6.202 with SMTP id 193mr15199589wmg.53.1473086011338; Mon, 05 Sep 2016 07:33:31 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id v203sm21186640wmv.2.2016.09.05.07.33.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Sep 2016 07:33:30 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org, heyi.guo@linaro.org Date: Mon, 5 Sep 2016 15:33:09 +0100 Message-Id: <1473085995-13742-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473085995-13742-1-git-send-email-ard.biesheuvel@linaro.org> References: <1473085995-13742-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [Linaro-uefi] [PATCH 3/9] Hisilicon/D0x: get rid of APRIORI declarations X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" APRIORI declarations completely bypass the ordinary dependency based dynamic dispatch of PEIMs and DXE_DRIVERs, and so should be avoided if possible. The reason Pcd.inf requires it in this case is because it has a circular dependency on itself due to its dependency on PcdLib, which resolves to a library class resolution that introduces a dependency on a protocol Pcd.inf produces itself (or a PPI in case of the PEIM version). So override the PcdLib resolution for Pcd.inf to the Null PcdLib version, which does not introduce this protocol dependency. This allows us to simply remove the APRIOR PEI|DXE declarations. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Platforms/Hisilicon/D02/Pv660D02.dsc | 10 ++++++++-- Platforms/Hisilicon/D02/Pv660D02.fdf | 7 ------- Platforms/Hisilicon/D03/D03.dsc | 10 ++++++++-- Platforms/Hisilicon/D03/D03.fdf | 7 ------- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Platforms/Hisilicon/D02/Pv660D02.dsc b/Platforms/Hisilicon/D02/Pv660D02.dsc index 1252d87d0a63..2a66796c8de1 100644 --- a/Platforms/Hisilicon/D02/Pv660D02.dsc +++ b/Platforms/Hisilicon/D02/Pv660D02.dsc @@ -268,7 +268,10 @@ # ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf MdeModulePkg/Core/Pei/PeiMain.inf - MdeModulePkg/Universal/PCD/Pei/Pcd.inf + MdeModulePkg/Universal/PCD/Pei/Pcd.inf { + + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + } ArmPlatformPkg/PlatformPei/PlatformPeim.inf OpenPlatformPkg/Platforms/Hisilicon/Binary/D02/MemoryInitPei/MemoryInitPeim.inf ArmPkg/Drivers/CpuPei/CpuPei.inf @@ -290,7 +293,10 @@ NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf } - MdeModulePkg/Universal/PCD/Dxe/Pcd.inf + MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { + + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + } OpenPlatformPkg/Chips/Hisilicon/Pv660/Drivers/IoInitDxe/IoInitDxe.inf diff --git a/Platforms/Hisilicon/D02/Pv660D02.fdf b/Platforms/Hisilicon/D02/Pv660D02.fdf index ff1e2e743e59..69be1f1bbc25 100644 --- a/Platforms/Hisilicon/D02/Pv660D02.fdf +++ b/Platforms/Hisilicon/D02/Pv660D02.fdf @@ -144,10 +144,6 @@ READ_STATUS = TRUE READ_LOCK_CAP = TRUE READ_LOCK_STATUS = TRUE - APRIORI DXE { - INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf - } - INF MdeModulePkg/Core/Dxe/DxeMain.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf @@ -305,9 +301,6 @@ READ_STATUS = TRUE READ_LOCK_CAP = TRUE READ_LOCK_STATUS = TRUE - APRIORI PEI { - INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf - } INF ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf INF MdeModulePkg/Core/Pei/PeiMain.inf INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf diff --git a/Platforms/Hisilicon/D03/D03.dsc b/Platforms/Hisilicon/D03/D03.dsc index e028432e2221..e60b99d30505 100644 --- a/Platforms/Hisilicon/D03/D03.dsc +++ b/Platforms/Hisilicon/D03/D03.dsc @@ -319,7 +319,10 @@ # ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf MdeModulePkg/Core/Pei/PeiMain.inf - MdeModulePkg/Universal/PCD/Pei/Pcd.inf + MdeModulePkg/Universal/PCD/Pei/Pcd.inf { + + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + } OpenPlatformPkg/Platforms/Hisilicon/Binary/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.inf ArmPlatformPkg/PlatformPei/PlatformPeim.inf @@ -345,7 +348,10 @@ NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf } - MdeModulePkg/Universal/PCD/Dxe/Pcd.inf + MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { + + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + } OpenPlatformPkg/Chips/Hisilicon/Hi1610/Drivers/IoInitDxe/IoInitDxe.inf diff --git a/Platforms/Hisilicon/D03/D03.fdf b/Platforms/Hisilicon/D03/D03.fdf index 7aba0aa850f5..8144151195ae 100644 --- a/Platforms/Hisilicon/D03/D03.fdf +++ b/Platforms/Hisilicon/D03/D03.fdf @@ -146,10 +146,6 @@ READ_STATUS = TRUE READ_LOCK_CAP = TRUE READ_LOCK_STATUS = TRUE - APRIORI DXE { - INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf - } - INF MdeModulePkg/Core/Dxe/DxeMain.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf @@ -317,9 +313,6 @@ READ_STATUS = TRUE READ_LOCK_CAP = TRUE READ_LOCK_STATUS = TRUE - APRIORI PEI { - INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf - } INF ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf INF MdeModulePkg/Core/Pei/PeiMain.inf INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf