public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, edk2-devel@ml01.01.org
Cc: drjones@redhat.com, leif.lindholm@linaro.org
Subject: Re: [PATCH 1/3] ArmVirtPkg/ArmVirtPL031FdtClientLib: unconditionally disable DT node
Date: Thu, 9 Mar 2017 17:51:47 +0100	[thread overview]
Message-ID: <f64886fa-4770-a03b-25dc-e5d7c74ff3b5@redhat.com> (raw)
In-Reply-To: <1489075441-23745-2-git-send-email-ard.biesheuvel@linaro.org>

On 03/09/17 17:03, 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 <ard.biesheuvel@linaro.org>
> ---
>  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
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


  parent reply	other threads:[~2017-03-09 16:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 16:03 [PATCH 0/3] ArmVirtQemu: make DT vs ACPI support mutually exclusive Ard Biesheuvel
2017-03-09 16:03 ` [PATCH 1/3] ArmVirtPkg/ArmVirtPL031FdtClientLib: unconditionally disable DT node Ard Biesheuvel
2017-03-09 16:25   ` Leif Lindholm
2017-03-09 16:51   ` Laszlo Ersek [this message]
2017-03-09 16:04 ` [PATCH 2/3] ArmVirtPkg/FdtClientDxe: install DT configuration table at ReadyToBoot Ard Biesheuvel
2017-03-09 16:31   ` Leif Lindholm
2017-03-09 16:55   ` Laszlo Ersek
2017-03-09 16:04 ` [PATCH 3/3] ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependent Ard Biesheuvel
2017-03-09 16:33   ` Leif Lindholm
2017-03-09 17:07   ` Laszlo Ersek
2017-03-11  5:55   ` Laszlo Ersek
2017-03-11  6:57     ` Ard Biesheuvel
2017-03-11  7:38       ` Laszlo Ersek
2017-03-11 10:26         ` Leif Lindholm
2017-03-13 10:23           ` Ard Biesheuvel
2017-03-13 14:53             ` Laszlo Ersek
2017-03-13 14:59               ` Ard Biesheuvel
2017-03-13 20:39                 ` Laszlo Ersek
2017-03-13 20:55                   ` Laszlo Ersek
2017-03-13 20:55                   ` Ard Biesheuvel
2017-03-11  7:21     ` Laszlo Ersek
2017-03-11  7:30       ` Ard Biesheuvel
2017-03-11  7:41         ` Laszlo Ersek
2017-03-11  9:19           ` Ard Biesheuvel
2017-03-11 10:06             ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f64886fa-4770-a03b-25dc-e5d7c74ff3b5@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox