From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) 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) 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) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org Cc: Ard Biesheuvel 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: [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: , X-List-Received-Date: Fri, 31 Mar 2017 14:16:10 -0000 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=1 !endif + DT_SUPPORT = FALSE !include OpenPlatformPkg/Platforms/ARM/VExpress/ArmVExpress.dsc.inc @@ -59,6 +60,8 @@ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !endif + DtPlatformDtbLoaderLib|OpenPlatformPkg/Platforms/ARM/VExpress/Library/ArmVExpressDtPlatformDtbLoaderLib/ArmVExpressDtPlatformDtbLoaderLib.inf + [LibraryClasses.common.SEC] ArmPlatformSecLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSecLibRTSM/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 -[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 paths - # 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) == TRUE + + NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf +!endif + } + MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf OpenPlatformPkg/Platforms/ARM/VExpress/AcpiTables/AcpiTables.inf @@ -316,10 +316,9 @@ NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf } +!if $(DT_SUPPORT) == 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 = 87940482-fc81-41c3-87e6-399cf85ac8a0 # FV Filesystem INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf +!if $(DT_SUPPORT) == TRUE # # FDT installation # - # The UEFI driver is at the end of the list of the driver to be dispatched - # 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 = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2) { - $(DTB_DIR)/fvp-base-gicv2-psci.dtb - } - FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy) { - $(DTB_DIR)/fvp-base-gicv2legacy-psci.dtb - } - FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3) { - $(DTB_DIR)/fvp-base-gicv3-psci.dtb - } - FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2) { - $(DTB_DIR)/fvp-foundation-gicv2-psci.dtb - } - FILE RAW = PCD (gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy) { - $(DTB_DIR)/fvp-foundation-gicv2legacy-psci.dtb - } - FILE RAW = 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 = 25462CDA-221F-47DF-AC1D-259CFAA4E326 { + SECTION RAW = OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-base-gicv2-psci.dtb + SECTION RAW = OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-base-gicv2legacy-psci.dtb + SECTION RAW = OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-base-gicv3-psci.dtb + SECTION RAW = OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-foundation-gicv2-psci.dtb + SECTION RAW = OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-foundation-gicv2legacy-psci.dtb + SECTION RAW = OpenPlatformPkg/Platforms/ARM/VExpress/DeviceTree/fvp-foundation-gicv3-psci.dtb } !endif -- 2.9.3