mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
SMI enable bit support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2190 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
93eac243d5
commit
47d02f6d5c
1 changed files with 2 additions and 13 deletions
15
hw/acpi.c
15
hw/acpi.c
|
@ -19,7 +19,6 @@
|
||||||
#include "vl.h"
|
#include "vl.h"
|
||||||
|
|
||||||
//#define DEBUG
|
//#define DEBUG
|
||||||
#define USE_SMM
|
|
||||||
|
|
||||||
/* i82731AB (PIIX4) compatible power management function */
|
/* i82731AB (PIIX4) compatible power management function */
|
||||||
#define PM_FREQ 3579545
|
#define PM_FREQ 3579545
|
||||||
|
@ -200,19 +199,9 @@ static void pm_smi_writeb(void *opaque, uint32_t addr, uint32_t val)
|
||||||
#endif
|
#endif
|
||||||
if (addr == 0) {
|
if (addr == 0) {
|
||||||
s->apmc = val;
|
s->apmc = val;
|
||||||
#ifdef USE_SMM
|
if (s->dev.config[0x5b] & (1 << 1)) {
|
||||||
cpu_interrupt(first_cpu, CPU_INTERRUPT_SMI);
|
cpu_interrupt(first_cpu, CPU_INTERRUPT_SMI);
|
||||||
#else
|
|
||||||
/* emulation of what the SMM BIOS should do */
|
|
||||||
switch(val) {
|
|
||||||
case 0xf0: /* ACPI disable */
|
|
||||||
s->pmcntrl &= ~SCI_EN;
|
|
||||||
break;
|
|
||||||
case 0xf1: /* ACPI enable */
|
|
||||||
s->pmcntrl |= SCI_EN;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
s->apms = val;
|
s->apms = val;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue