From patchwork Wed Apr 13 14:32:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65732 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp45055qge; Wed, 13 Apr 2016 07:32:38 -0700 (PDT) X-Received: by 10.66.136.10 with SMTP id pw10mr13262486pab.113.1460557958686; Wed, 13 Apr 2016 07:32:38 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id uz7si1670845pab.179.2016.04.13.07.32.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2016 07:32:38 -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 99DA21A21ED; Wed, 13 Apr 2016 07:32:34 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 E3C261A2223 for ; Wed, 13 Apr 2016 07:32:32 -0700 (PDT) Received: by mail-wm0-x22f.google.com with SMTP id a140so105178829wma.0 for ; Wed, 13 Apr 2016 07:32:32 -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=y6U6sl7QU01bsraeoxbWhfpGkF1ePuuKPiOrjbeUi/M=; b=iZ4uB620sTG/deD8gEdxMW5wY0EaWoODtKbBiL8J0AX2H2gXvb5x7ZkUrrNYTV4KOV FzyTta6ArkHDBFD458Q2iOfiXIhnCGJYPgM88Z1O7OgGBi/Q4oARqxKPJLEj8asGgYS5 LqeTrdJauZCIUpzGBzH6FhSM7UCq9XE0pRxeA= 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=y6U6sl7QU01bsraeoxbWhfpGkF1ePuuKPiOrjbeUi/M=; b=macKCDlUShITFegE4l7o+vqqueNACUA2DFE34FI2uEOqwFKtKL1IZELGidaJVgFsO8 zT5VPfybmlzAxaN/FZAm2BsospSNU/MAbk9zl+yx3Bvd/O2C8hGXQ39zka9DL/NdZs32 gv3quN7WO+vFitWm/Mi3rjhUjPiWFMBnavLl2b0B0iuOn0kmiZFkX1ZPim4iQMBFd6Pv n2HkLvTwTmXGpMEjlBZuAZp02w3ckzgXc0fuFPdS/ssPOAO9cLkJGW3mA78n7PGPiy/r phQ9ZX+cwXIS9CUQoBZlrMA63xzP13zxVGTgIOlA4IqoPjXC/Q/mRZE27HLyXiUf2bll E8EQ== X-Gm-Message-State: AOPr4FVLL0Rz3BUJJmSY5gX2WPVAvq3vd167bC+IIXzmRO57j7eEFFZSjgS6RgjARmGFF2d7 X-Received: by 10.28.210.73 with SMTP id j70mr10577224wmg.8.1460557951568; Wed, 13 Apr 2016 07:32:31 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id 188sm1589444wmk.6.2016.04.13.07.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 07:32:30 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 13 Apr 2016 16:32:10 +0200 Message-Id: <1460557933-23346-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460557933-23346-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460557933-23346-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v4 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- 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 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; }