From nobody Sat Nov 2 12:19:10 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490969780549509.2481485165183; Fri, 31 Mar 2017 07:16:20 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5DA562008031E; Fri, 31 Mar 2017 07:16:11 -0700 (PDT) Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com [IPv6:2a00:1450:400c:c0c::22a]) (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 6B8EB20080322 for ; Fri, 31 Mar 2017 07:16:10 -0700 (PDT) Received: by mail-wr0-x22a.google.com with SMTP id w43so107870816wrb.0 for ; Fri, 31 Mar 2017 07:16:10 -0700 (PDT) Received: from localhost.localdomain ([160.171.180.74]) by smtp.gmail.com with ESMTPSA id h187sm3057561wma.32.2017.03.31.07.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 07:16:08 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org 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=/9rHoFcMdJMlQ7/ybKAgq2h08leN6pY56V3d2W/Qr5o=; b=OzaKCFXb3enMXYCvJQOcXQA4yvqt1YC94xt9A3nSR9yYWWiQDLCGB0Pw/MyBSo8laY 2Fi1lLUU1PH1OFTbO2Us6imjH/8uhOfCcAWOboWz+Sx4A+MadYfxSsClOYpKJ+lLc6/q /uoKHtz0OUeCD9+TCItKI6iwV5wNDo5dWrTXk= 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:in-reply-to :references; bh=/9rHoFcMdJMlQ7/ybKAgq2h08leN6pY56V3d2W/Qr5o=; b=PUbnwVsHfYYbHx4NNDS6MQOg7o6BNi7DkTyLCPy8s0Sb4LQNBW8FOSTiCBNN+oVzzR 854VStBhZx/bl1vuidEH/n4+ovu5jMQLxicd5M/9Mjc1n3CjwUNeVOlG/lh/tn0DpXaS msvtsjYLxh3GJAIhUyTOqOOR9z1m6kggvhzIRZBw++zttLufMMin5VKAVXey1FW4BESS 9sUvetbm/TaQ+WIS+WzM53IL8EIRz6jppUqDl0kN/a0lu0I7S87cq+9fohiis321Zkwf c+WES9NTn1jXQj7ohvAlyxYVC1utWwPzqlcHqoafr0JVX6KG+QezCrTdXWgdnJS2UYB9 z9KA== X-Gm-Message-State: AFeK/H2WDxtQ7vgZTPUIj0fZrXQvS08K8ZViR2ulpdLvozs2SrEsqovJP0rCQra8pQJKmwAg X-Received: by 10.223.154.199 with SMTP id a65mr3071921wrc.78.1490969768651; Fri, 31 Mar 2017 07:16:08 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org Date: Fri, 31 Mar 2017 15:15:45 +0100 Message-Id: <20170331141547.20987-8-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170331141547.20987-1-ard.biesheuvel@linaro.org> References: <20170331141547.20987-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 07/13] Platforms/FVP-AArch64: switch to simpler DT platform driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Replace the elaborate but awkward FdtPlatformDxe with the new DtPlatformDxe, which supports embedded DTBs only. This is sufficient for virtually all use cases, and if it is not, there are various way to override the device tree binary presented to the OS. As a bonus, this driver makes ACPI and DT mutually exclusive - this can be configured via the setup screen. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc | 27 +++++++------- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 37 ++++++------------= -- 2 files changed, 24 insertions(+), 40 deletions(-) diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms= /ARM/VExpress/ArmVExpress-FVP-AArch64.dsc index e6778aafe8c6..1125f22f9172 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc @@ -35,6 +35,7 @@ DEFINE EDK2_SKIP_PEICORE=3D1 !endif =20 + DT_SUPPORT =3D FALSE =20 !include OpenPlatformPkg/Platforms/ARM/VExpress/ArmVExpress.dsc.inc =20 @@ -59,6 +60,8 @@ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !endif =20 + DtPlatformDtbLoaderLib|OpenPlatformPkg/Platforms/ARM/VExpress/Library/Ar= mVExpressDtPlatformDtbLoaderLib/ArmVExpressDtPlatformDtbLoaderLib.inf + [LibraryClasses.common.SEC] ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLi= bRTSM/ArmVExpressSecLib.inf ArmPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/= ArmVExpressLibSec.inf @@ -173,15 +176,6 @@ # the entire FVP address space can be covered by 36 bit VAs gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|36 =20 -[PcdsDynamicDefault.common] - # - # The size of a dynamic PCD of the (VOID*) type can not be increased at = run - # time from its size at build time. Set the "PcdFdtDevicePaths" PCD to a= 128 - # character "empty" string, to allow to be able to set FDT text device p= aths - # up to 128 characters long. - # - gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L" = = " - ##########################################################################= ###### # # Components Section - list of all EDK II Modules needed by this Platform @@ -262,7 +256,13 @@ # # ACPI Support # - MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf { +!if $(DT_SUPPORT) =3D=3D TRUE + + NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf +!endif + } + MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf OpenPlatformPkg/Platforms/ARM/VExpress/AcpiTables/AcpiTables.inf =20 @@ -316,10 +316,9 @@ NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf } =20 +!if $(DT_SUPPORT) =3D=3D TRUE # # FDT installation # - EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf { - - BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf - } + EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf +!endif diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms= /ARM/VExpress/ArmVExpress-FVP-AArch64.fdf index 262515150dd9..7b2397417534 100644 --- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf +++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf @@ -170,35 +170,20 @@ FvNameGuid =3D 87940482-fc81-41c3-87e6-399cf8= 5ac8a0 # FV Filesystem INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.i= nf =20 +!if $(DT_SUPPORT) =3D=3D TRUE # # FDT installation # - # The UEFI driver is at the end of the list of the driver to be dispatch= ed - # after the device drivers (eg: Ethernet) to ensure we have support for = them. - INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf - -!ifdef $(DTB_DIR) - # - # Embed flattened device tree (FDT) images for all known - # variants of this platform - # - FILE RAW =3D PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2) { - $(DTB_DIR)/fvp-base-gicv2-psci.dtb - } - FILE RAW =3D PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Le= gacy) { - $(DTB_DIR)/fvp-base-gicv2legacy-psci.dtb - } - FILE RAW =3D PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3) { - $(DTB_DIR)/fvp-base-gicv3-psci.dtb - } - FILE RAW =3D PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2) { - $(DTB_DIR)/fvp-foundation-gicv2-psci.dtb - } - FILE RAW =3D PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Leg= acy) { - $(DTB_DIR)/fvp-foundation-gicv2legacy-psci.dtb - } - FILE RAW =3D PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3) { - $(DTB_DIR)/fvp-foundation-gicv3-psci.dtb + INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf + + # builtin device tree binaries -- order matches ARM_VEXPRESS_PLATFORM_ID + FILE FREEFORM =3D 25462CDA-221F-47DF-AC1D-259CFAA4E326 { + SECTION RAW =3D OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-= base-gicv2-psci.dtb + SECTION RAW =3D OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-= base-gicv2legacy-psci.dtb + SECTION RAW =3D OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-= base-gicv3-psci.dtb + SECTION RAW =3D OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-= foundation-gicv2-psci.dtb + SECTION RAW =3D OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-= foundation-gicv2legacy-psci.dtb + SECTION RAW =3D OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-= foundation-gicv3-psci.dtb } !endif =20 --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel