From patchwork Fri Apr 8 09:45:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65385 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp569540lbl; Fri, 8 Apr 2016 02:46:37 -0700 (PDT) X-Received: by 10.66.101.35 with SMTP id fd3mr11311923pab.7.1460108782544; Fri, 08 Apr 2016 02:46:22 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id vy4si22029pab.124.2016.04.08.02.46.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2016 02:46:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; 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 198.145.21.10 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 9747C1A1F4B; Fri, 8 Apr 2016 02:45:53 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 F37351A1FE7 for ; Fri, 8 Apr 2016 02:45:51 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id n3so15538042wmn.0 for ; Fri, 08 Apr 2016 02:45:51 -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=IB2oyZz32kp69c/CZY++jllV89BU7cwS4nCEJCHQv90=; b=IvBstFfChU0a6aqNVo/kbS6++eviQSHNSiszEbtgJzm223009/yFRmeqgnFYfCLMzm CG0MjatxMy0k6NyI9UhMEyOSD33xRQ9NNZu8rxdgPNdRIp3rlJS4iAeT0bNhk0h0y2NH 94X6mcmjWeNympBFxxIWC4JOgQPjuuNPcVsGc= 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=IB2oyZz32kp69c/CZY++jllV89BU7cwS4nCEJCHQv90=; b=YITxrFwsxtQlDmExyHCJQpYkdJf4Jkg0XKoanl+iGU8escDu2b2vwZ4xS3GKqnXtal pFzhUFKyJaC3/KZq0IT8YVdIrJL4we+cc1QNQen9QSGbmWRlqTLR0NBiWB0S2zFQQq6m izRrjBrES0JXCm9i6NpPzm+cVJfiVDhvYxkCoMwTZh5tR18Q78u20gYRAt6rllSxvdSb gRs7LLlbDMA6+EBuDQwS0eXcRX+U+c4MkwDjX3+kEMlm2mvGip8ZY3YXZ88KWv9XZztg 1POuBwaKaGCY5kjk2YEp6GULz2xhZKKvQq447FkMxskvV8x+liCevK5GeZbqVL8+j1NJ m6og== X-Gm-Message-State: AD7BkJI3eiphKmJLd8PoCtXpc1SbrS1JzLFMHMBAZnLnRvmbTIqQng/zSMVdJSQTaqnapbPs X-Received: by 10.28.158.202 with SMTP id h193mr2577684wme.35.1460108750705; Fri, 08 Apr 2016 02:45:50 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id s10sm9710681wjp.3.2016.04.08.02.45.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Apr 2016 02:45:50 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 8 Apr 2016 11:45:08 +0200 Message-Id: <1460108711-12122-22-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460108711-12122-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460108711-12122-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 21/24] ArmVirtPkg/VirtFdtDxe: move FDT config table installation to FdtClientDxe 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" Now that FdtClientDxe is the core driver that takes ownership of the host supplied FDT, it makes sense to put it in charge of installing the FDT configuration table as well. --- ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | 11 +++++++++++ ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf | 4 ++++ ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 10 ---------- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 4 ---- 4 files changed, 15 insertions(+), 14 deletions(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c index 9c589e620cb4..c336e2410033 100644 --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -234,6 +235,7 @@ InitializeFdtClientDxe ( { VOID *Hob; VOID *DeviceTreeBase; + EFI_STATUS Status; Hob = GetFirstGuidHob (&gFdtHobGuid); if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) { @@ -251,6 +253,15 @@ InitializeFdtClientDxe ( DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase)); + if (!FeaturePcdGet (PcdPureAcpiBoot)) { + // + // Only install the FDT as a configuration table if we want to leave it up + // to the OS to decide whether it prefers ACPI over DT. + // + Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase); + ASSERT_EFI_ERROR (Status); + } + return gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid, EFI_NATIVE_INTERFACE, &mFdtClientProtocol); } diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf index 3647d37b02d2..3a0cd37040eb 100644 --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf @@ -43,6 +43,10 @@ [Protocols] [Guids] gFdtHobGuid + gFdtTableGuid + +[FeaturePcd] + gArmVirtTokenSpaceGuid.PcdPureAcpiBoot [Depex] TRUE diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c index 8fe1277b6b49..cebd4aa91fd9 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c @@ -28,7 +28,6 @@ #include #include -#include #include #include @@ -215,14 +214,5 @@ InitializeVirtFdtDxe ( } } - if (!FeaturePcdGet (PcdPureAcpiBoot)) { - // - // Only install the FDT as a configuration table if we want to leave it up - // to the OS to decide whether it prefers ACPI over DT. - // - Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase); - ASSERT_EFI_ERROR (Status); - } - return EFI_SUCCESS; } diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf index 8c098e5885ae..4dd46cf87011 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -45,13 +45,9 @@ [LibraryClasses] XenIoMmioLib [Guids] - gFdtTableGuid gVirtioMmioTransportGuid gFdtHobGuid -[FeaturePcd] - gArmVirtTokenSpaceGuid.PcdPureAcpiBoot - [Protocols] gEfiDevicePathProtocolGuid