Skip to contentSkip to conversation

Implement ACPI specs 3.0, 4.7.2.5

PATCH In review Michael Hanselmann 1 participant 2 messages Jun 26, 2007 – Jul 18, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Implement ACPI specs 3.0, 4.7.2.5

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

Greets,
Michael

---
Index: hw/acpi.c
===================================================================
RCS file: /sources/qemu/qemu/hw/acpi.c,v
retrieving revision 1.12

acpi.c +11 -0
diff -u -b -B -r1.12 acpi.c
@@ -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);
         }
#1 lore raw
Quoted 2 lines · Michael Hanselmann

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

Has this patch been ignored by accident or is there something wrong with it?

Thanks,
Michael

Signature · 1 line
http://hansmi.ch/