Commit 24bc1cbc7b1c774ba09b3517fba4a37293498a00

Authored by ths
1 parent 6ada7453

Implement ACPI specs 3.0, 4.7.2.5, by Michael Hanselmann.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3103 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 11 additions and 0 deletions
hw/acpi.c
... ... @@ -54,6 +54,9 @@ typedef struct PIIX4PMState {
54 54  
55 55 #define SUS_EN (1 << 13)
56 56  
  57 +#define ACPI_ENABLE 0xf1
  58 +#define ACPI_DISABLE 0xf0
  59 +
57 60 #define SMBHSTSTS 0x00
58 61 #define SMBHSTCNT 0x02
59 62 #define SMBHSTCMD 0x03
... ... @@ -216,6 +219,14 @@ static void pm_smi_writeb(void *opaque, uint32_t addr, uint32_t val)
216 219 #endif
217 220 if (addr == 0) {
218 221 s->apmc = val;
  222 +
  223 + /* ACPI specs 3.0, 4.7.2.5 */
  224 + if (val == ACPI_ENABLE) {
  225 + s->pmcntrl |= SCI_EN;
  226 + } else if (val == ACPI_DISABLE) {
  227 + s->pmcntrl &= ~SCI_EN;
  228 + }
  229 +
219 230 if (s->dev.config[0x5b] & (1 << 1)) {
220 231 cpu_interrupt(first_cpu, CPU_INTERRUPT_SMI);
221 232 }
... ...