X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Facpi.c;h=6e3f69eac569b555b156fe85017dfe65fdb10260;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=add8cc838b7bd95801cb1fa6fb74fc0ece4ceaae;hpb=5fafdf24ef2c090c164d4dc89684b3f379dbdd87;p=qemu diff --git a/hw/acpi.c b/hw/acpi.c index add8cc8..6e3f69e 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -87,7 +87,7 @@ static void pm_update_sci(PIIX4PMState *s) { int sci_level, pmsts; int64_t expire_time; - + pmsts = get_pmsts(s); sci_level = (((pmsts & s->pmen) & (RTC_EN | PWRBTN_EN | GBL_EN | TMROF_EN)) != 0); @@ -239,7 +239,7 @@ static uint32_t pm_smi_readb(void *opaque, uint32_t addr) { PIIX4PMState *s = opaque; uint32_t val; - + addr &= 1; if (addr == 0) { val = s->apmc; @@ -400,7 +400,7 @@ static void pm_io_space_update(PIIX4PMState *s) if (s->dev.config[0x80] & 1) { pm_io_base = le32_to_cpu(*(uint32_t *)(s->dev.config + 0x40)); - pm_io_base &= 0xfffe; + pm_io_base &= 0xffc0; /* XXX: need to improve memory and ioport allocation */ #if defined(DEBUG) @@ -474,15 +474,17 @@ i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base) pci_conf[0x01] = 0x80; pci_conf[0x02] = 0x13; pci_conf[0x03] = 0x71; + pci_conf[0x06] = 0x80; + pci_conf[0x07] = 0x02; pci_conf[0x08] = 0x00; // revision number pci_conf[0x09] = 0x00; pci_conf[0x0a] = 0x80; // other bridge device pci_conf[0x0b] = 0x06; // bridge device pci_conf[0x0e] = 0x00; // header_type pci_conf[0x3d] = 0x01; // interrupt pin 1 - + pci_conf[0x40] = 0x01; /* PM io base read only bit */ - + register_ioport_write(0xb2, 2, 1, pm_smi_writeb, s); register_ioport_read(0xb2, 2, 1, pm_smi_readb, s);