From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcaAw-0006Lf-PK for qemu-devel@nongnu.org; Mon, 30 Mar 2015 09:56:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcaAu-0004eX-3i for qemu-devel@nongnu.org; Mon, 30 Mar 2015 09:56:22 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:38437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcaAt-0004eG-SD for qemu-devel@nongnu.org; Mon, 30 Mar 2015 09:56:20 -0400 Received: by wibgn9 with SMTP id gn9so131186528wib.1 for ; Mon, 30 Mar 2015 06:56:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <551955FF.9010507@redhat.com> Date: Mon, 30 Mar 2015 15:56:15 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1427554013-3535-1-git-send-email-fishman@saucelabs.com> <551838A7.1080002@gmail.com> In-Reply-To: <551838A7.1080002@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] acpi: add reset register to fadt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcel@redhat.com, Reza Jelveh , qemu-devel@nongnu.org On 29/03/2015 19:38, Marcel Apfelbaum wrote: > 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. It does (see RCR_IOPORT). Paolo > 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; >> >> > > >