From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 4EB57802F2 for ; Thu, 9 Mar 2017 08:25:43 -0800 (PST) Received: by mail-wm0-x234.google.com with SMTP id t189so60169146wmt.1 for ; Thu, 09 Mar 2017 08:25:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wKq++jvefy0xyByWWNApC7x3l1ZRsGQjU/RuHU1bICM=; b=SE6vM4bobXCQhzQBUXHwg8mrMugxpif9T3cmXIfgvtGpA0ADN36VyIgmOSioC+DgK8 PxyX5plvBDfF6UoLsx6t+Fv7T67/od1BdcgNft/L3WSBNw+Hmrm7xB9woRqHF+gvQUhx PRoKjkDR12RDon7cjrPRtWCvcBSeHNIrfW+5o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wKq++jvefy0xyByWWNApC7x3l1ZRsGQjU/RuHU1bICM=; b=hxsYyq2o9N+7afMkS8AVfpwN1x0nMlOCHstQ/YEEk+VZ2vVZbXvL5nmfilwvat3PGZ 20diq9A1mQU6pd7v009bR9DkQO2fsBIHNsyXgzWaY1R1JGcue/SAcDP4pHps4fZu+kM0 Ye5LcMOV1jLI9n1Nl12qTnoyjvut52ZGNb0+L9cvGKbNiXqvzHP15ONP/eSk+wgIuI8y ELKlSGBRur7fHwyyzmqgv60GAtl4ru4/S4iX6ex2igeZTUFTtwqhOPU5fAejWXmeBzxf y606ZPhaP7FJulawAnQ6zYV9aYspLL30LIGj1nlr6KnyRaF2lh64eq198ky/h5EmvPen lDVQ== X-Gm-Message-State: AMke39mLJkU5PeBYBS2sU2x6KnPWP5vgaU1hUTe9wnZ8YhDpsCpIUDzuJlps5uBr/aAkQrpe X-Received: by 10.28.227.213 with SMTP id a204mr10541466wmh.120.1489076741785; Thu, 09 Mar 2017 08:25:41 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id l138sm27912900wmd.7.2017.03.09.08.25.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 08:25:41 -0800 (PST) Date: Thu, 9 Mar 2017 16:25:39 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, lersek@redhat.com, drjones@redhat.com Message-ID: <20170309162539.GF16034@bivouac.eciton.net> References: <1489075441-23745-1-git-send-email-ard.biesheuvel@linaro.org> <1489075441-23745-2-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1489075441-23745-2-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH 1/3] ArmVirtPkg/ArmVirtPL031FdtClientLib: unconditionally disable DT node X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2017 16:25:43 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 09, 2017 at 05:03:59PM +0100, Ard Biesheuvel wrote: > Disable the PL031 RTC DT node unconditionally rather than only when > the DT will be exposed to the OS. This allows us to defer the decision > whether to expose it to the OS to a later time without creating an > additional dependency on the FDT client code by the RTC driver. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel This seems like an improvement even without the rest of the series. Reviewed-by: Leif Lindholm > --- > ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c | 22 +++++++++----------- > ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf | 3 --- > 2 files changed, 10 insertions(+), 15 deletions(-) > > diff --git a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c > index 82de7a51b32e..d168424a52f5 100644 > --- a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c > +++ b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c > @@ -66,18 +66,16 @@ ArmVirtPL031FdtClientLibConstructor ( > > DEBUG ((EFI_D_INFO, "Found PL031 RTC @ 0x%Lx\n", RegBase)); > > - if (!FeaturePcdGet (PcdPureAcpiBoot)) { > - // > - // UEFI takes ownership of the RTC hardware, and exposes its functionality > - // through the UEFI Runtime Services GetTime, SetTime, etc. This means we > - // need to disable it in the device tree to prevent the OS from attaching > - // its device driver as well. > - // > - Status = FdtClient->SetNodeProperty (FdtClient, Node, "status", > - "disabled", sizeof ("disabled")); > - if (EFI_ERROR (Status)) { > - DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n")); > - } > + // > + // UEFI takes ownership of the RTC hardware, and exposes its functionality > + // through the UEFI Runtime Services GetTime, SetTime, etc. This means we > + // need to disable it in the device tree to prevent the OS from attaching > + // its device driver as well. > + // > + Status = FdtClient->SetNodeProperty (FdtClient, Node, "status", > + "disabled", sizeof ("disabled")); > + if (EFI_ERROR (Status)) { > + DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n")); > } > > return EFI_SUCCESS; > diff --git a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf > index 32dbff6f0852..342193651a86 100644 > --- a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf > +++ b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf > @@ -42,8 +42,5 @@ [Protocols] > [Pcd] > gArmPlatformTokenSpaceGuid.PcdPL031RtcBase > > -[FeaturePcd] > - gArmVirtTokenSpaceGuid.PcdPureAcpiBoot > - > [Depex] > gFdtClientProtocolGuid > -- > 2.7.4 >