qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Reza Jelveh <fishman@saucelabs.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] acpi: add reset register to fadt
Date: Sun, 29 Mar 2015 20:38:47 +0300	[thread overview]
Message-ID: <551838A7.1080002@gmail.com> (raw)
In-Reply-To: <1427554013-3535-1-git-send-email-fishman@saucelabs.com>

On 03/28/2015 05:46 PM, Reza Jelveh wrote:
> Some operating systems such as FreeBSD and Mac OSX need the reset_register
> section of the FADT filled to know which port to write to for a system reset.
>
> What is the right way to set the reset_val and the reset addr in this case?
> ---
>   hw/i386/acpi-build.c | 5 +++++
>   hw/i386/acpi-defs.h  | 2 ++
>   2 files changed, 7 insertions(+)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index d0a5c85..21c1453 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -361,6 +361,11 @@ static void fadt_setup(AcpiFadtDescriptorRev1 *fadt, AcpiPmInfo *pm)
>                                 (1 << ACPI_FADT_F_SLP_BUTTON) |
>                                 (1 << ACPI_FADT_F_RTC_S4));
>       fadt->flags |= cpu_to_le32(1 << ACPI_FADT_F_USE_PLATFORM_CLOCK);
> +    fadt->flags |= cpu_to_le32(1 << ACPI_FADT_F_RESET_REG_SUP);
> +    fadt->reset_val = 0xf;
> +    fadt->reset_reg.address_space_id   = aml_system_io;
> +    fadt->reset_reg.register_bit_width = 8;
> +    fadt->reset_reg.address            = ICH9_RST_CNT_IOPORT;
Hi,

Is this for both PC and Q35? Because I don't think PC has ICH9_RST_CNT_IOPORT.

Thanks,
Marcel

>       /* APIC destination mode ("Flat Logical") has an upper limit of 8 CPUs
>        * For more than 8 CPUs, "Clustered Logical" mode has to be used
>        */
> diff --git a/hw/i386/acpi-defs.h b/hw/i386/acpi-defs.h
> index c4468f8..960c833 100644
> --- a/hw/i386/acpi-defs.h
> +++ b/hw/i386/acpi-defs.h
> @@ -132,6 +132,8 @@ struct AcpiFadtDescriptorRev1
>       uint8_t  reserved4a;             /* Reserved */
>       uint8_t  reserved4b;             /* Reserved */
>       uint32_t flags;
> +    Acpi20GenericAddress reset_reg;
> +    uint8_t reset_val;
>   } QEMU_PACKED;
>   typedef struct AcpiFadtDescriptorRev1 AcpiFadtDescriptorRev1;
>
>

  reply	other threads:[~2015-03-29 17:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28 14:46 [Qemu-devel] [RFC] acpi: add reset register to fadt Reza Jelveh
2015-03-29 17:38 ` Marcel Apfelbaum [this message]
2015-03-30 13:56   ` Paolo Bonzini
2015-03-30 12:36 ` Igor Mammedov
2015-03-30 13:27   ` Reza Jelveh
2015-03-30 13:49     ` Igor Mammedov
2015-03-30 13:59     ` Paolo Bonzini

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=551838A7.1080002@gmail.com \
    --to=marcel.apfelbaum@gmail.com \
    --cc=fishman@saucelabs.com \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).