All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Shannon Zhao <shannon.zhao@linaro.org>, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, edk2-devel@ml01.01.org,
	zhaoshenglong@huawei.com, qemu-devel@nongnu.org,
	ard.biesheuvel@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2] ARM: Virt: Don't generate RTC ACPI device when using UEFI
Date: Wed, 13 Jan 2016 16:06:33 +0100	[thread overview]
Message-ID: <569667F9.4030800@redhat.com> (raw)
In-Reply-To: <1452696857-4091-1-git-send-email-shannon.zhao@linaro.org>

On 01/13/16 15:54, Shannon Zhao wrote:
> When booting the VM with UEFI, UEFI takes ownership of the RTC hardware.
> While UEFI can use libfdt to disable the RTC device node in the DTB that
> it passes to the OS, it cannot modify AML. Therefore, we won't generate
> the RTC ACPI device at all when using UEFI.
> 
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> v2: just totally don't generate the RTC ACPI device when using UEFI
> ---
>  hw/arm/virt-acpi-build.c | 19 -------------------
>  1 file changed, 19 deletions(-)
> 
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 0caf5ce..ac568a3 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -94,23 +94,6 @@ static void acpi_dsdt_add_uart(Aml *scope, const MemMapEntry *uart_memmap,
>      aml_append(scope, dev);
>  }
>  
> -static void acpi_dsdt_add_rtc(Aml *scope, const MemMapEntry *rtc_memmap,
> -                                          uint32_t rtc_irq)
> -{
> -    Aml *dev = aml_device("RTC0");
> -    aml_append(dev, aml_name_decl("_HID", aml_string("LNRO0013")));
> -    aml_append(dev, aml_name_decl("_UID", aml_int(0)));
> -
> -    Aml *crs = aml_resource_template();
> -    aml_append(crs, aml_memory32_fixed(rtc_memmap->base,
> -                                       rtc_memmap->size, AML_READ_WRITE));
> -    aml_append(crs,
> -               aml_interrupt(AML_CONSUMER, AML_LEVEL, AML_ACTIVE_HIGH,
> -                             AML_EXCLUSIVE, &rtc_irq, 1));
> -    aml_append(dev, aml_name_decl("_CRS", crs));
> -    aml_append(scope, dev);
> -}
> -
>  static void acpi_dsdt_add_flash(Aml *scope, const MemMapEntry *flash_memmap)
>  {
>      Aml *dev, *crs;
> @@ -575,8 +558,6 @@ build_dsdt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
>      acpi_dsdt_add_cpus(scope, guest_info->smp_cpus);
>      acpi_dsdt_add_uart(scope, &memmap[VIRT_UART],
>                         (irqmap[VIRT_UART] + ARM_SPI_BASE));
> -    acpi_dsdt_add_rtc(scope, &memmap[VIRT_RTC],
> -                      (irqmap[VIRT_RTC] + ARM_SPI_BASE));
>      acpi_dsdt_add_flash(scope, &memmap[VIRT_FLASH]);
>      acpi_dsdt_add_virtio(scope, &memmap[VIRT_MMIO],
>                      (irqmap[VIRT_MMIO] + ARM_SPI_BASE), NUM_VIRTIO_TRANSPORTS);
> 

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

  parent reply	other threads:[~2016-01-13 15:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 14:54 [Qemu-arm] [PATCH v2] ARM: Virt: Don't generate RTC ACPI device when using UEFI Shannon Zhao
2016-01-13 14:54 ` [Qemu-devel] " Shannon Zhao
2016-01-13 15:04 ` Ard Biesheuvel
2016-01-13 15:06 ` Laszlo Ersek [this message]
2016-01-13 16:16 ` [Qemu-arm] " Andrew Jones
2016-01-13 16:16   ` Andrew Jones
2016-01-13 16:26   ` [Qemu-arm] " Laszlo Ersek
2016-01-13 16:26     ` Laszlo Ersek
2016-01-15 14:34     ` [Qemu-arm] " Peter Maydell
2016-01-15 14:34       ` Peter Maydell
2016-01-15 14:37       ` [Qemu-arm] " Shannon Zhao
2016-01-15 14:37         ` Shannon Zhao

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-all 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=569667F9.4030800@redhat.com \
    --to=lersek@redhat.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=edk2-devel@ml01.01.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhao@linaro.org \
    --cc=zhaoshenglong@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.