From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBmat-0008Ar-W9 for qemu-devel@nongnu.org; Thu, 26 Jun 2008 04:12:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBmas-0008Af-GO for qemu-devel@nongnu.org; Thu, 26 Jun 2008 04:12:39 -0400 Received: from [199.232.76.173] (port=45150 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBmas-0008Ac-D6 for qemu-devel@nongnu.org; Thu, 26 Jun 2008 04:12:38 -0400 Received: from mx20.gnu.org ([199.232.41.8]:11264) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KBmas-0008Qr-EA for qemu-devel@nongnu.org; Thu, 26 Jun 2008 04:12:38 -0400 Received: from il.qumranet.com ([212.179.150.194]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KBmaq-0000aF-Ca for qemu-devel@nongnu.org; Thu, 26 Jun 2008 04:12:36 -0400 Received: from gleb-debian.qumranet.com (unknown [172.16.15.143]) by il.qumranet.com (Postfix) with ESMTP id 953C1250310 for ; Thu, 26 Jun 2008 11:12:31 +0300 (IDT) Date: Thu, 26 Jun 2008 11:12:31 +0300 From: Gleb Natapov Message-ID: <20080626081231.GA31298@minantech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] ACPI suspend type field is 3 bits long Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org According to ACPI spec table 4-13 suspend type field should be 3 bits long. diff --git a/hw/acpi.c b/hw/acpi.c index 1f83dc6..8f08a7e 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -152,7 +152,7 @@ static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val) s->pmcntrl = val & ~(SUS_EN); if (val & SUS_EN) { /* change suspend type */ - sus_typ = (val >> 10) & 3; + sus_typ = (val >> 10) & 7; switch(sus_typ) { case 0: /* soft power off */ qemu_system_shutdown_request(); -- Gleb.