From nobody Sat Nov 2 14:37:17 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1489075457324876.0956430218072; Thu, 9 Mar 2017 08:04:17 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4377C80391; Thu, 9 Mar 2017 08:04:13 -0800 (PST) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 7772E80379 for ; Thu, 9 Mar 2017 08:04:10 -0800 (PST) Received: by mail-wm0-x236.google.com with SMTP id t189so59652407wmt.1 for ; Thu, 09 Mar 2017 08:04:10 -0800 (PST) Received: from ards-macbook-pro.c.hoisthospitality.com ([109.74.48.129]) by smtp.gmail.com with ESMTPSA id t194sm27830872wmd.13.2017.03.09.08.04.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 08:04:08 -0800 (PST) X-Original-To: edk2-devel@lists.01.org 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=GZeue2ibMhZMSeO6B/Qsd6NFK+6WAejA824v62mSVA4=; b=i6YHU+QwYGQ5gNaNtw9d+wV6IJJkMVsRsNpgJRxi+5i+9FTOMKmN+XDT8xLjrLIETX QKs6J+nb/Zk0lAKU9ORXIIpaJVe8NdjYLP6sMW6Jf69bOTYIKR26aK2duQAvY1Fz3UrP mAysamcgo2pW4opF5hud3k1tFa2c8MTO2sPqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GZeue2ibMhZMSeO6B/Qsd6NFK+6WAejA824v62mSVA4=; b=RurT7AHtXLBcaRKJwHaPm5tEXxwWfAvGjavJR2Gt9e/kzu4hTavWAJEgZxvwKgHPrA X5dWdhMVYYtjbc89l6xGlitKOuF/RgMt4f7NjrcSDKPnhWytxFURO67X8JobGN4SSSem 5iGwcKb+kTjd60GUbCnLH8GUVRPpI2HOhNPAQcH5AT5v9MJpEHsIJSqND7i0OdthNE1I byQT1XOk09gaG6BURxdQYofDukwxNuJpvvH1DDPjI6VMh1S0UPCmOqePyY4/I8LE8rlj CbYD6fkVtuKPg+hMq2gYF+YnqK5gUfjFnTYILVQXusDD12jHg4HhifVHvZb9/OrHiP5x s+yQ== X-Gm-Message-State: AMke39nZjT82T5mDPUuFs/d7sdXAsfjwGcPD/qVdB7IQn7FbdaxFqE5w9oM/9I+YEKvvZool X-Received: by 10.28.57.84 with SMTP id g81mr27637444wma.41.1489075449093; Thu, 09 Mar 2017 08:04:09 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Thu, 9 Mar 2017 17:03:59 +0100 Message-Id: <1489075441-23745-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489075441-23745-1-git-send-email-ard.biesheuvel@linaro.org> References: <1489075441-23745-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [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: , Cc: drjones@redhat.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Laszlo Ersek 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/ArmVirtPL031FdtCli= entLib.c b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClien= tLib.c index 82de7a51b32e..d168424a52f5 100644 --- a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c +++ b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c @@ -66,18 +66,16 @@ ArmVirtPL031FdtClientLibConstructor ( =20 DEBUG ((EFI_D_INFO, "Found PL031 RTC @ 0x%Lx\n", RegBase)); =20 - if (!FeaturePcdGet (PcdPureAcpiBoot)) { - // - // UEFI takes ownership of the RTC hardware, and exposes its functiona= lity - // through the UEFI Runtime Services GetTime, SetTime, etc. This means= we - // need to disable it in the device tree to prevent the OS from attach= ing - // its device driver as well. - // - Status =3D 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 functionali= ty + // 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 =3D FdtClient->SetNodeProperty (FdtClient, Node, "status", + "disabled", sizeof ("disabled")); + if (EFI_ERROR (Status)) { + DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n")); } =20 return EFI_SUCCESS; diff --git a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtCli= entLib.inf b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtCli= entLib.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 =20 -[FeaturePcd] - gArmVirtTokenSpaceGuid.PcdPureAcpiBoot - [Depex] gFdtClientProtocolGuid --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel