summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2014-12-10 07:59:20 +0100
committer Olivier Galibert <galibert@pobox.com>2014-12-10 19:28:04 +0100
commit7b2709ae759966fba869ed069c6bdfeafcaa5c94 (patch)
treed746bbcfb77ae0e1a56059d4ece292663472eef0
parentd009419dab5c4600d791227869b3cbdd09ca9411 (diff)
pci: Fix some initialisations, valgrind stops complaining [O. Galibert]
-rw-r--r--src/emu/machine/i6300esb.c1
-rw-r--r--src/emu/machine/i82875p.c15
-rw-r--r--src/emu/machine/i82875p.h2
-rw-r--r--src/emu/machine/pci.c6
4 files changed, 16 insertions, 8 deletions
diff --git a/src/emu/machine/i6300esb.c b/src/emu/machine/i6300esb.c
index 1d6442266a4..6b923cca5f2 100644
--- a/src/emu/machine/i6300esb.c
+++ b/src/emu/machine/i6300esb.c
@@ -121,6 +121,7 @@ void i6300esb_lpc_device::device_reset()
memset(mon_trp_rng, 0, sizeof(mon_trp_rng));
mon_trp_msk = 0;
nmi_sc = 0;
+ gen_sta = 0x00;
}
void i6300esb_lpc_device::reset_all_mappings()
diff --git a/src/emu/machine/i82875p.c b/src/emu/machine/i82875p.c
index a3985cc606c..98f53ac8126 100644
--- a/src/emu/machine/i82875p.c
+++ b/src/emu/machine/i82875p.c
@@ -309,21 +309,27 @@ READ8_MEMBER( i82875p_host_device::capreg2_r)
return 0x00;
}
+void i82875p_host_device::reset_all_mappings()
+{
+ pci_host_device::reset_all_mappings();
+
+ toud = 0x0400;
+ smram = 0x02;
+ esmramc = 0x38;
+ memset(pam, 0, sizeof(pam));
+}
+
void i82875p_host_device::device_reset()
{
pci_host_device::device_reset();
agpm = 0x00;
fpllcont = 0x00;
- memset(pam, 0, sizeof(pam));
- smram = 0x02;
- esmramc = 0x38;
agpctrl = 0x00000000;
apsize = 0x00;
attbase = 0x00000000;
amtt = 0x10;
lptt = 0x10;
- toud = 0x0400;
mchcfg = 0x0000;
errcmd = 0x0000;
smicmd = 0x0000;
@@ -406,7 +412,6 @@ void i82875p_host_device::map_extra(UINT64 memory_window_start, UINT64 memory_wi
if((esmramc & 0x40) && (smram & 0x08))
memory_space->install_ram (0xfeda0000, 0xfedbffff, &ram[0x000a0000/4]);
-
}
diff --git a/src/emu/machine/i82875p.h b/src/emu/machine/i82875p.h
index 998c1e51ed9..9ee8d8acfcf 100644
--- a/src/emu/machine/i82875p.h
+++ b/src/emu/machine/i82875p.h
@@ -20,6 +20,8 @@ public:
void set_cpu_tag(const char *tag);
void set_ram_size(int ram_size);
+ virtual void reset_all_mappings();
+
virtual void map_extra(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
diff --git a/src/emu/machine/pci.c b/src/emu/machine/pci.c
index c37be6c3d7b..a21490adbc5 100644
--- a/src/emu/machine/pci.c
+++ b/src/emu/machine/pci.c
@@ -449,6 +449,8 @@ void pci_bridge_device::device_reset()
void pci_bridge_device::reset_all_mappings()
{
+ pci_device::reset_all_mappings();
+
for(int i=0; i != all_devices.count(); i++)
if(all_devices[i] != this)
all_devices[i]->reset_all_mappings();
@@ -784,9 +786,7 @@ void pci_host_device::device_start()
memory_window_start = memory_window_end = memory_offset = 0;
io_window_start = io_window_end = io_offset = 0;
- for(int i=0; i != all_devices.count(); i++)
- if(all_devices[i] != this)
- all_devices[i]->reset_all_mappings();
+ reset_all_mappings();
}
void pci_host_device::device_reset()