Il 18/02/2013 13:53, David Woodhouse ha scritto:
diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 6c77e49..6dcf1c5 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -171,6 +171,23 @@ static int i440fx_load_old(QEMUFile* f, void *opaque, int version_id) return 0; }
+static void i440fx_reset(void *opaque) +{
- PCII440FXState *d = opaque;
- uint8_t *pci_conf = d->dev.config;
- pci_conf[0x59] = 0x00; // Reset PAM setup
- pci_conf[0x5a] = 0x00;
- pci_conf[0x5b] = 0x00;
- pci_conf[0x5c] = 0x00;
- pci_conf[0x5d] = 0x00;
- pci_conf[0x5e] = 0x00;
- pci_conf[0x5f] = 0x00;
- pci_conf[0x72] = 0x02; // And SMM
- i440fx_update_memory_mappings(d);
+}
static int i440fx_post_load(void *opaque, int version_id) { PCII440FXState *d = opaque; @@ -217,6 +234,8 @@ static int i440fx_initfn(PCIDevice *dev) d->dev.config[I440FX_SMRAM] = 0x02;
cpu_smm_register(&i440fx_set_smm, d);
- qemu_register_reset(i440fx_reset, d); return 0;
}
If you want to submit this patch for upstream QEMU (I agree it is a good idea), please set dc->reset instead in i440fx_class_init.
Paolo