From patchwork Tue Apr 12 13:47:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65619 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1930709qge; Tue, 12 Apr 2016 06:47:21 -0700 (PDT) X-Received: by 10.98.15.135 with SMTP id 7mr4730713pfp.142.1460468841289; Tue, 12 Apr 2016 06:47:21 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id th8si10429184pab.238.2016.04.12.06.47.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Apr 2016 06:47:21 -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; 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 dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4DAB11A2103; Tue, 12 Apr 2016 06:47:20 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 3FEF21A20FA for ; Tue, 12 Apr 2016 06:47:19 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id u206so28966040wme.1 for ; Tue, 12 Apr 2016 06:47:19 -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:in-reply-to:references; bh=9/mDHJLCs96TAfz3P0ivS+LVq+37Jarz1+yWyNYOvu0=; b=STILrjhOUdJoBUEiA5m9hJbltKfeCJR1UUF7SiZWfjJKughi1nbCpkV2y5oJaxSQoL WDfIxfxL7qn1MKo83nx0uM0qBi5dwqMbvM7JtAju4MdeUWLdJ0HRaC2GwVG2jd8SH7/S jhTF4K2MCukmhcnDPRqTG246yiy7uKjFk2jUk= 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=9/mDHJLCs96TAfz3P0ivS+LVq+37Jarz1+yWyNYOvu0=; b=H0KvjUmS56jaEfHvoX/UAKlr4MO1Ycb6mHlS7NrbHLYtAhWO761HITIV2hjpcDqcO9 DcKSn1a1DhR03xKGriDvyK1IoaK8hvXsSCm7E1N/pbHn36kkHqMpbbfYajS5AybkAOMl 1GF5D5rPFDzkcyAL+BS5lk3VHMQ4W0b+wSWxL9m0+iFMEP1kWp7BgUHMDEkCZGtPQIuI 7Xpm9bH9tDxZ+sIMhZRbdlEnzjk3xmYaryycY35OWQ+5V8JLjnpehGPzpSjmoau18djG 6/F18c80ESn2SiF4A0wGcp7p71+fxlAxkLP17VLHh7HD7i98DmI5Z+ExaWlBL6psTnaX hP9A== X-Gm-Message-State: AOPr4FUGAdGCRdUfr0JyYINGzrvIR7gjQAZ80tGha88B7BjX235QaQNwbPZtgwXU+16SHzQU X-Received: by 10.194.248.200 with SMTP id yo8mr3907115wjc.38.1460468837752; Tue, 12 Apr 2016 06:47:17 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id w75sm22970685wmw.4.2016.04.12.06.47.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Apr 2016 06:47:16 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Tue, 12 Apr 2016 15:47:07 +0200 Message-Id: <1460468829-13982-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460468829-13982-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460468829-13982-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 2/4] ArmVirtPkg/BaseCachingPciExpressLib: depend on PciPcdProducerLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Make BaseCachingPciExpressLib depend on PciPcdProducerLib, so that we have a chance to populate PcdPciExpressBaseAddress based on the contents of the device tree. Also update the platforms under ArmVirtPkg that support PCI to use this special MAX_UINT64 as the build time default for PcdPciExpressBaseAddress, and to specify a suitable resolution for PciPcdProducerLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 6 +++++- ArmVirtPkg/ArmVirtQemuKernel.dsc | 6 +++++- ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index bb994262268f..f2eccf8cca63 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -66,6 +66,7 @@ [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !endif + PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -219,7 +220,10 @@ [PcdsDynamicDefault.common] gArmPlatformTokenSpaceGuid.PcdPciIoTranslation|0x0 gArmPlatformTokenSpaceGuid.PcdPciMmio32Base|0x0 gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0 - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0 + + # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this + # PCD and PcdPciDisableBusEnumeration above have not been assigned yet + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF # # Set video resolution for boot options and for text setup. diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index d6c73d960805..107627e6a6f4 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -65,6 +65,7 @@ [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !endif + PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -204,7 +205,10 @@ [PcdsDynamicDefault.common] gArmPlatformTokenSpaceGuid.PcdPciIoTranslation|0x0 gArmPlatformTokenSpaceGuid.PcdPciMmio32Base|0x0 gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0 - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0 + + # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this + # PCD and PcdPciDisableBusEnumeration above have not been assigned yet + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF # # Set video resolution for boot options and for text setup. diff --git a/ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf b/ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf index f6a346d49f22..b32554a111e6 100644 --- a/ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf +++ b/ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf @@ -33,6 +33,7 @@ [Sources] PciExpressLib.c [Packages] + ArmVirtPkg/ArmVirtPkg.dec MdePkg/MdePkg.dec [LibraryClasses] @@ -40,6 +41,7 @@ [LibraryClasses] PcdLib DebugLib IoLib + PciPcdProducerLib [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES