From nobody Thu Nov 6 10:13:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.intel.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540234844946409.6679115114954; Mon, 22 Oct 2018 12:00:44 -0700 (PDT) Received: from localhost ([::1]:36724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEfRT-0003Gg-6o for importer@patchew.org; Mon, 22 Oct 2018 15:00:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEf73-0001ZT-JX for qemu-devel@nongnu.org; Mon, 22 Oct 2018 14:39:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEf6y-0005an-B0 for qemu-devel@nongnu.org; Mon, 22 Oct 2018 14:39:37 -0400 Received: from mga01.intel.com ([192.55.52.88]:7887) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEf6u-0004fU-Jv for qemu-devel@nongnu.org; Mon, 22 Oct 2018 14:39:30 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2018 11:38:57 -0700 Received: from omccarth-mobl.ger.corp.intel.com (HELO localhost.localdomain) ([10.252.18.99]) by FMSMGA003.fm.intel.com with ESMTP; 22 Oct 2018 11:38:55 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,413,1534834800"; d="scan'208";a="90378083" From: Samuel Ortiz To: qemu-devel@nongnu.org Date: Mon, 22 Oct 2018 20:36:53 +0200 Message-Id: <20181022183656.4902-24-sameo@linux.intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181022183656.4902-1-sameo@linux.intel.com> References: <20181022183656.4902-1-sameo@linux.intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.88 Subject: [Qemu-devel] [PATCH 23/26] hw: acpi: reduced: Add reboot support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Jing Liu , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Jing Liu We only need to expose it through FADT. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Jing Liu --- hw/acpi/reduced.c | 7 ++++++- include/hw/acpi/reduced.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/acpi/reduced.c b/hw/acpi/reduced.c index 329d5112ca..3754258335 100644 --- a/hw/acpi/reduced.c +++ b/hw/acpi/reduced.c @@ -128,10 +128,15 @@ static void build_fadt_reduced(GArray *table_data, BI= OSLinker *linker, AcpiFadtData fadt =3D { .rev =3D 5, .minor_ver =3D 1, - .flags =3D 1 << ACPI_FADT_F_HW_REDUCED_ACPI, + .flags =3D (1 << ACPI_FADT_F_HW_REDUCED_ACPI) | + (1 << ACPI_FADT_F_RESET_REG_SUP), .dsdt_tbl_offset =3D &dsdt_tbl_offset, .xdsdt_tbl_offset =3D &dsdt_tbl_offset, .arm_boot_arch =3D 0, + .reset_reg =3D { .space_id =3D AML_AS_SYSTEM_IO, + .bit_width =3D 8, .bit_offset =3D 0, + .address =3D ACPI_REDUCED_RESET_IOPORT }, + .reset_val =3D ACPI_REDUCED_RESET_VALUE, .sleep_control_reg =3D { .space_id =3D AML_AS_SYSTEM_IO, .bit_width =3D 8, .bit_offset =3D 0, .address =3D ACPI_REDUCED_SLEEP_CONTROL_IOPO= RT }, diff --git a/include/hw/acpi/reduced.h b/include/hw/acpi/reduced.h index 3d3c003353..bcd266afd0 100644 --- a/include/hw/acpi/reduced.h +++ b/include/hw/acpi/reduced.h @@ -22,6 +22,8 @@ #define ACPI_REDUCED_SLEEP_LEVEL 5 #define ACPI_REDUCED_SLEEP_ENABLE (1 << 5) /* SLP_EN */ #define ACPI_REDUCED_SLEEP_CONTROL_IOPORT 0x3B0 +#define ACPI_REDUCED_RESET_IOPORT 0x3C0 +#define ACPI_REDUCED_RESET_VALUE 4 =20 typedef struct Aml Aml; =20 --=20 2.17.2