From: Laszlo Ersek <lersek@redhat.com>
To: Shannon Zhao <zhaoshenglong@huawei.com>
Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, mst@redhat.com,
a.spyridakis@virtualopensystems.com, claudio.fontana@huawei.com,
qemu-devel@nongnu.org, wanghaibin.wang@huawei.com,
peter.huangpeng@huawei.com, hanjun.guo@linaro.org,
imammedo@redhat.com, pbonzini@redhat.com,
christoffer.dall@linaro.org
Subject: Re: [Qemu-devel] [RFC PATCH 07/11] hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers
Date: Sat, 24 Jan 2015 23:05:08 +0100 [thread overview]
Message-ID: <54C41714.7070809@redhat.com> (raw)
In-Reply-To: <1422091280-14532-8-git-send-email-zhaoshenglong@huawei.com>
comments below
On 01/24/15 10:21, Shannon Zhao wrote:
> FADT points to FACS and DSDT, in the case of mach virt, it is also used
> to set the Hardware Reduced bit and enable PSCI SMP booting through HVC.
>
> Update the header definitions for FADT taking into account the new
> additions of ACPI v5.1 in `include/hw/acpi/acpi-defs.h`
>
> Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
> ---
> hw/arm/virt-acpi-build.c | 26 ++++++++++
> include/hw/acpi/acpi-defs.h | 114 +++++++++++++++++++++++++++++--------------
> 2 files changed, 103 insertions(+), 37 deletions(-)
>
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 2872dff..e3c708d 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -218,6 +218,32 @@ build_gtdt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
> static void
> build_fadt(GArray *table_data, GArray *linker, uint64_t facs, uint64_t dsdt)
> {
> + AcpiFadtDescriptorRev5_1 *fadt = acpi_data_push(table_data, sizeof(*fadt));
> +
> + /* Hardware Reduced = 1 and use PSCI 0.2+ and with HVC */
You set "Hardware Reduced" here.
> + fadt->flags = cpu_to_le32(1 << ACPI_FADT_F_HW_REDUCED_ACPI);
> + fadt->arm_boot_flags = cpu_to_le16((1 << ACPI_FADT_ARM_USE_PSCI_G_0_2) |
> + (1 << ACPI_FADT_ARM_PSCI_USE_HVC));
> +
> + /* ACPI v5.1 (fadt->revision.fadt->minor_revision) */
> + fadt->minor_revision = 0x1;
> +
> + fadt->Xfacs = cpu_to_le64(facs);
But you also set up a FACS table.
Hardware Reduced mode makes Linux ignore the FACS table. Please see
upstream kernel commit
commit 22e5b40ab21fcac21db0ff25fbb844ffecc73a4a
Author: Bob Moore <robert.moore@intel.com>
Date: Wed Nov 16 10:57:28 2011 +0800
ACPI 5.0: Implement hardware-reduced option
You can probably drop the generation of the FACS, unless you intend to
disable HW reduced mode.
Thanks
Laszlo
next prev parent reply other threads:[~2015-01-24 22:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-24 9:21 [Qemu-devel] [RFC PATCH 00/11] Generate ACPI v5.1 tables and expose it to guest over fw_cfg on ARM Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 01/11] hw/i386: Move ACPI header definitions in an arch-independent location Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 02/11] hw/arm/virt-acpi-build: Basic framework for building ACPI tables Shannon Zhao
2015-01-24 16:22 ` Michael S. Tsirkin
2015-01-26 2:37 ` Shannon Zhao
2015-01-26 10:19 ` Igor Mammedov
2015-01-27 6:47 ` Shannon Zhao
2015-01-27 10:30 ` Igor Mammedov
2015-01-28 6:28 ` Shannon Zhao
2015-01-27 12:12 ` Hanjun Guo
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table Shannon Zhao
2015-01-26 10:22 ` Igor Mammedov
2015-01-27 6:50 ` Shannon Zhao
2015-01-27 9:36 ` Shannon Zhao
2015-01-27 9:42 ` Igor Mammedov
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 04/11] hw/arm/virt-acpi-build: Generate XSDT table and add a build_header function Shannon Zhao
2015-01-24 22:04 ` Laszlo Ersek
2015-01-26 1:45 ` Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 05/11] hw/arm/virt-acpi-build: Generate MADT table Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 06/11] hw/arm/virt-acpi-build: Generate GTDT table Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 07/11] hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers Shannon Zhao
2015-01-24 22:05 ` Laszlo Ersek [this message]
2015-01-26 1:48 ` Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 08/11] hw/arm/virt-acpi-build: Generate FACS " Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 09/11] hw/acpi/acpi-build-utils: Add acpi_fixed_memory32() and acpi_extended_irq() Shannon Zhao
2015-01-25 8:39 ` Michael S. Tsirkin
2015-01-26 1:58 ` Shannon Zhao
2015-01-26 10:46 ` Igor Mammedov
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 10/11] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices Shannon Zhao
2015-01-26 10:40 ` Igor Mammedov
2015-01-27 7:19 ` Shannon Zhao
2015-01-24 9:21 ` [Qemu-devel] [RFC PATCH 11/11] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables Shannon Zhao
2015-01-24 18:56 ` Laszlo Ersek
2015-01-26 1:59 ` Shannon Zhao
2015-01-24 23:31 ` [Qemu-devel] [RFC PATCH 00/11] Generate ACPI v5.1 tables and expose it to guest over fw_cfg on ARM Laszlo Ersek
2015-01-26 2:34 ` 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=54C41714.7070809@redhat.com \
--to=lersek@redhat.com \
--cc=a.spyridakis@virtualopensystems.com \
--cc=christoffer.dall@linaro.org \
--cc=claudio.fontana@huawei.com \
--cc=hangaohuai@huawei.com \
--cc=hanjun.guo@linaro.org \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=wanghaibin.wang@huawei.com \
--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.