Skip to contentSkip to conversation

ACPI suspend type field is 3 bits long

PATCH Applied Gleb Natapov 2 participants 2 messages Jun 26, 2008 – Aug 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI suspend type field is 3 bits long

According to ACPI spec table 4-13 suspend type field should be 3 bits long.

hw/acpi.c +1 -1
index 1f83dc6..8f08a7e 100644
@@ -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.

#1 lore raw
Quoted 8 lines · Gleb Natapov

According to ACPI spec table 4-13 suspend type field should be 3 bits long.

hw/acpi.c +0 -0
index 1f83dc6..8f08a7e 100644

hw/acpi.c static void pm_ioport_writew(void *opaque, uint32_t addr, uint32_t val) · line 158

Quoted 8 lines
hw/acpi.c +1 -1
@@ -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();

Thanks, applied.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net