From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::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 E4CCE803B1 for ; Wed, 22 Mar 2017 07:12:50 -0700 (PDT) Received: by mail-it0-x22f.google.com with SMTP id w124so24847017itb.1 for ; Wed, 22 Mar 2017 07:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RsYyOkUJC925aap71RBuLBqWjLydXzW7F70N9KhocjA=; b=I32AOMiJMxmK8uW7Wr5iHgDAuBJQFsHEynbootsZzJGuQdq6iJ4tmIlargMaitZT6v uhyxewwuynJ4qpqQn43L/UXyITkJhH4rvn0kqqdEPtNH3WrqcFHVtGjYNs3Qm3m27dUX OdkCOmEQzZr36L+IRtirkwXgWbYGgrkJUh5mk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RsYyOkUJC925aap71RBuLBqWjLydXzW7F70N9KhocjA=; b=ocDEDYaBH4EdvtYqi+lUy/GoUnHoQb7Li1/KApY/gPqGfTHHma541TprsWnVfnJTNp 5GS6MRBXAis7VhgNpAP8bckD3CsQKloFLIRoo1Cl40CWUwsN+Mq2uoEs7Vof+QcWfwgw miW2bbBNYlskT/Y9FbOsu68QjguPPiUoS1hySkppFgBN5TfNmFnuI9NcKogqeOhD5cHq 3Eh6AYhB21ClN+UUt4oVFJmfUI3TZoNPexeahHtQU+7VRMr9mvSTHVneIkheMz1R3vQW qlhZKlfYs1RYAknuT4UjiJ1Z724MmLCdwCB+hZg6nKxupZ+FUOfYoeN4/BgZpNPA9o4k 3vcg== X-Gm-Message-State: AFeK/H2p04Mdlh+Px/k/eycFw6I6sNGsPd7mmoAMJJiF+PxXC2hjntGuFqrXs8G2BjzCIUH8IFAj8roYjMN/WrU+ X-Received: by 10.36.137.4 with SMTP id s4mr7730191itd.63.1490191970237; Wed, 22 Mar 2017 07:12:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.10.27 with HTTP; Wed, 22 Mar 2017 07:12:49 -0700 (PDT) In-Reply-To: <20170317204731.31488-3-lersek@redhat.com> References: <20170317204731.31488-1-lersek@redhat.com> <20170317204731.31488-3-lersek@redhat.com> From: Ard Biesheuvel Date: Wed, 22 Mar 2017 14:12:49 +0000 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 , Leif Lindholm Subject: Re: [PATCH v2 02/12] Revert "ArmVirtPkg/FdtClientDxe: install DT configuration table at ReadyToBoot" 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: Wed, 22 Mar 2017 14:12:51 -0000 Content-Type: text/plain; charset=UTF-8 On 17 March 2017 at 20:47, Laszlo Ersek wrote: > This reverts commit 18f6d4df9ece8b91b86511bcdd1cf7da478c3627. > > We realized that DXE drivers that are independent of AcpiPlatformDxe (that > is, independent of QEMU's ACPI generation), such as RamDiskDxe and > BootGraphicsResourceTableDxe, may produce and/or manipulate ACPI tables, > at driver dispatch or even at Ready To Boot. > > This makes it unsafe for us to check for ACPI presence in the UEFI system > config table in a Ready To Boot callback, in order to decide about > exposing the DT. > > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel > --- > ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf | 1 - > ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | 49 ++++---------------- > 2 files changed, 9 insertions(+), 41 deletions(-) > > diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf > index 00017727c32c..3a0cd37040eb 100644 > --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf > +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf > @@ -42,7 +42,6 @@ [Protocols] > gFdtClientProtocolGuid ## PRODUCES > > [Guids] > - gEfiEventReadyToBootGuid > gFdtHobGuid > gFdtTableGuid > > diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c > index 4cf79f70cb2a..547a29fce62c 100644 > --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c > +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c > @@ -20,7 +20,6 @@ > #include > #include > > -#include > #include > #include > > @@ -307,30 +306,6 @@ STATIC FDT_CLIENT_PROTOCOL mFdtClientProtocol = { > GetOrInsertChosenNode, > }; > > -STATIC > -VOID > -EFIAPI > -OnReadyToBoot ( > - EFI_EVENT Event, > - VOID *Context > - ) > -{ > - EFI_STATUS Status; > - > - 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, mDeviceTreeBase); > - ASSERT_EFI_ERROR (Status); > - } > - > - gBS->CloseEvent (Event); > -} > - > -STATIC EFI_EVENT mReadyToBootEvent; > - > EFI_STATUS > EFIAPI > InitializeFdtClientDxe ( > @@ -358,21 +333,15 @@ InitializeFdtClientDxe ( > > DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase)); > > - Status = gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid, > - EFI_NATIVE_INTERFACE, &mFdtClientProtocol); > - if (EFI_ERROR (Status)) { > - return Status; > + 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); > } > > - Status = gBS->CreateEventEx ( > - EVT_NOTIFY_SIGNAL, > - TPL_CALLBACK, > - OnReadyToBoot, > - NULL, > - &gEfiEventReadyToBootGuid, > - &mReadyToBootEvent > - ); > - ASSERT_EFI_ERROR (Status); > - > - return EFI_SUCCESS; > + return gBS->InstallProtocolInterface (&ImageHandle, &gFdtClientProtocolGuid, > + EFI_NATIVE_INTERFACE, &mFdtClientProtocol); > } > -- > 2.9.3 > >