From patchwork Wed Apr 13 08:02:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65687 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2362743qge; Wed, 13 Apr 2016 01:02:43 -0700 (PDT) X-Received: by 10.98.102.195 with SMTP id s64mr7178099pfj.89.1460534563243; Wed, 13 Apr 2016 01:02:43 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id i5si14866241pfj.121.2016.04.13.01.02.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2016 01:02:43 -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 3D40C1A21AD; Wed, 13 Apr 2016 01:02:37 -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 D3EC81A1F5D for ; Wed, 13 Apr 2016 01:02:35 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id n3so62089151wmn.0 for ; Wed, 13 Apr 2016 01:02:35 -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=fnHmoIM4X+h/ilY1tfIllohsrgSsaDxyA4VcTED+gNs=; b=NcF5pzxn2qWgL4ekA5kJWA3YQ6Gz0QcHDah3TCprIp+B9LVIEDXsPAVEdtVzIpm0WV 4Bd2I9YMtBO1cZ90mVlBoLFSLI/rUyOePbhc7DXOyUbEvqh6zmAXT6cSroZQWahv4GOC y08mYZIjNZzkAqdlCOIslVaZd+2d/o12V5//E= 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=fnHmoIM4X+h/ilY1tfIllohsrgSsaDxyA4VcTED+gNs=; b=NrwKIGMMBAy4tFRBi+Win2BLFXQ1FH6YM+cdh6iLSngDloyczWLKoVTxrMODPsdgyO HkvEamNh2lArqYWdpa3qqPdvZAQaQc/DAB+0EZ92jxtEBjMyAwSFSBYF4f7ny5xsPt1w Nbb9Zdu42i+wjNneH/5A6OcMw4LMOEX8FEJItMlM7q1r0Wx5k1XKeRQWFX1X9NJsLWuO ey0+H8q7OVk1WLCaI7pDFZ7+J7PpEa0bpKZminjoo16VTL4K64CHB14uBiKwj9LRlAyc KE1ZihhZ9K4m/3peX6l7mvHITZteq1FS05M/EiAodXNRvsRaYiY3ZFK6FOcVSL1hqOZ1 1Dbw== X-Gm-Message-State: AOPr4FWYJMw6GWmUIJpkEMGg1rzBGnp2x7CseoWgoEsWmG6VgeQfz7fEx2VFp0i4pjLTnrPf X-Received: by 10.194.104.202 with SMTP id gg10mr8965069wjb.103.1460534554501; Wed, 13 Apr 2016 01:02:34 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id i206sm26686549wmf.1.2016.04.13.01.02.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 01:02:33 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 13 Apr 2016 10:02:16 +0200 Message-Id: <1460534539-2169-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460534539-2169-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460534539-2169-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 6/9] 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.inf | 4 ++++ ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 4 ---- ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | 11 +++++++++++ ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 10 ---------- 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 Reviewed-by: Laszlo Ersek 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.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 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/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; }