qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hanselmann <qemu@hansmi.ch>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Implement ACPI specs 3.0, 4.7.2.5
Date: Tue, 26 Jun 2007 22:32:23 +0200	[thread overview]
Message-ID: <20070626203223.GA10008@hansmi.ch> (raw)

The patch below implements ACPI_ENABLE and ACPI_DISABLE as described in
section 4.7.2.5 of the ACPI 3.0 specs.

Signed-off-by: Michael Hanselmann <qemu@hansmi.ch>

Greets,
Michael

---
Index: hw/acpi.c
===================================================================
RCS file: /sources/qemu/qemu/hw/acpi.c,v
retrieving revision 1.12
diff -u -b -B -r1.12 acpi.c
--- hw/acpi.c	28 May 2007 21:01:02 -0000	1.12
+++ hw/acpi.c	26 Jun 2007 20:29:19 -0000
@@ -54,6 +54,9 @@
 
 #define SUS_EN (1 << 13)
 
+#define ACPI_ENABLE 0xf1
+#define ACPI_DISABLE 0xf0
+
 #define SMBHSTSTS 0x00
 #define SMBHSTCNT 0x02
 #define SMBHSTCMD 0x03
@@ -216,6 +219,14 @@
 #endif
     if (addr == 0) {
         s->apmc = val;
+
+        /* ACPI specs 3.0, 4.7.2.5 */
+        if (val == ACPI_ENABLE) {
+            s->pmcntrl |= SCI_EN;
+        } else if (val == ACPI_DISABLE) {
+            s->pmcntrl &= ~SCI_EN;
+        }
+
         if (s->dev.config[0x5b] & (1 << 1)) {
             cpu_interrupt(first_cpu, CPU_INTERRUPT_SMI);
         }

             reply	other threads:[~2007-06-26 20:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-26 20:32 Michael Hanselmann [this message]
2007-07-18 21:32 ` [Qemu-devel] [PATCH] Implement ACPI specs 3.0, 4.7.2.5 Michael Hanselmann

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=20070626203223.GA10008@hansmi.ch \
    --to=qemu@hansmi.ch \
    --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).