Commit 47d02f6d5c25a3858bc9d895d14ccfb5e8e6c1b8

Authored by bellard
1 parent 93eac243

SMI enable bit support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2190 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 13 deletions
hw/acpi.c
... ... @@ -19,7 +19,6 @@
19 19 #include "vl.h"
20 20  
21 21 //#define DEBUG
22   -#define USE_SMM
23 22  
24 23 /* i82731AB (PIIX4) compatible power management function */
25 24 #define PM_FREQ 3579545
... ... @@ -200,19 +199,9 @@ static void pm_smi_writeb(void *opaque, uint32_t addr, uint32_t val)
200 199 #endif
201 200 if (addr == 0) {
202 201 s->apmc = val;
203   -#ifdef USE_SMM
204   - cpu_interrupt(first_cpu, CPU_INTERRUPT_SMI);
205   -#else
206   - /* emulation of what the SMM BIOS should do */
207   - switch(val) {
208   - case 0xf0: /* ACPI disable */
209   - s->pmcntrl &= ~SCI_EN;
210   - break;
211   - case 0xf1: /* ACPI enable */
212   - s->pmcntrl |= SCI_EN;
213   - break;
  202 + if (s->dev.config[0x5b] & (1 << 1)) {
  203 + cpu_interrupt(first_cpu, CPU_INTERRUPT_SMI);
214 204 }
215   -#endif
216 205 } else {
217 206 s->apms = val;
218 207 }
... ...