Revision 5fafdf24 hw/acpi.c
b/hw/acpi.c | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
* ACPI implementation |
3 |
*
|
|
3 |
* |
|
4 | 4 |
* Copyright (c) 2006 Fabrice Bellard |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* This library is free software; you can redistribute it and/or |
7 | 7 |
* modify it under the terms of the GNU Lesser General Public |
8 | 8 |
* License version 2 as published by the Free Software Foundation. |
... | ... | |
87 | 87 |
{ |
88 | 88 |
int sci_level, pmsts; |
89 | 89 |
int64_t expire_time; |
90 |
|
|
90 |
|
|
91 | 91 |
pmsts = get_pmsts(s); |
92 |
sci_level = (((pmsts & s->pmen) &
|
|
92 |
sci_level = (((pmsts & s->pmen) & |
|
93 | 93 |
(RTC_EN | PWRBTN_EN | GBL_EN | TMROF_EN)) != 0); |
94 | 94 |
qemu_set_irq(s->dev.irq[0], sci_level); |
95 | 95 |
/* schedule a timer interruption if needed */ |
... | ... | |
239 | 239 |
{ |
240 | 240 |
PIIX4PMState *s = opaque; |
241 | 241 |
uint32_t val; |
242 |
|
|
242 |
|
|
243 | 243 |
addr &= 1; |
244 | 244 |
if (addr == 0) { |
245 | 245 |
val = s->apmc; |
... | ... | |
413 | 413 |
} |
414 | 414 |
} |
415 | 415 |
|
416 |
static void pm_write_config(PCIDevice *d,
|
|
416 |
static void pm_write_config(PCIDevice *d, |
|
417 | 417 |
uint32_t address, uint32_t val, int len) |
418 | 418 |
{ |
419 | 419 |
pci_default_write_config(d, address, val, len); |
... | ... | |
480 | 480 |
pci_conf[0x0b] = 0x06; // bridge device |
481 | 481 |
pci_conf[0x0e] = 0x00; // header_type |
482 | 482 |
pci_conf[0x3d] = 0x01; // interrupt pin 1 |
483 |
|
|
483 |
|
|
484 | 484 |
pci_conf[0x40] = 0x01; /* PM io base read only bit */ |
485 |
|
|
485 |
|
|
486 | 486 |
register_ioport_write(0xb2, 2, 1, pm_smi_writeb, s); |
487 | 487 |
register_ioport_read(0xb2, 2, 1, pm_smi_readb, s); |
488 | 488 |
|
Also available in: Unified diff