summaryrefslogtreecommitdiff
path: root/dev/pcidev.cc
diff options
context:
space:
mode:
authorAndrew Schultz <alschult@umich.edu>2004-06-04 15:13:04 -0400
committerAndrew Schultz <alschult@umich.edu>2004-06-04 15:13:04 -0400
commit0379a27896bf43bfbc2e6f7f6921f22bd41a3209 (patch)
tree1ecf71e5c4b6dd531c094daa9c372de92ac3f5a2 /dev/pcidev.cc
parentdf45c7b404edf00ec76da655dd5b7c77ea21fc62 (diff)
parentd270ea851a92e98d3efe30774f31f935d846dcd3 (diff)
downloadgem5-0379a27896bf43bfbc2e6f7f6921f22bd41a3209.tar.xz
Merge zizzer:/bk/linux
into zower.eecs.umich.edu:/z/alschult/DiskModel/linux --HG-- extra : convert_revision : b23a1d1a79ac5c593150d269d0523c474cf6a4a0
Diffstat (limited to 'dev/pcidev.cc')
-rw-r--r--dev/pcidev.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/dev/pcidev.cc b/dev/pcidev.cc
index 191233348..01f336ff8 100644
--- a/dev/pcidev.cc
+++ b/dev/pcidev.cc
@@ -256,13 +256,26 @@ PciDev::WriteConfig(int offset, int size, uint32_t data)
void
PciDev::serialize(ostream &os)
{
+ SERIALIZE_ARRAY(BARSize, 6);
+ SERIALIZE_ARRAY(BARAddrs, 6);
SERIALIZE_ARRAY(config.data, 64);
}
void
PciDev::unserialize(Checkpoint *cp, const std::string &section)
{
+ UNSERIALIZE_ARRAY(BARSize, 6);
+ UNSERIALIZE_ARRAY(BARAddrs, 6);
UNSERIALIZE_ARRAY(config.data, 64);
+
+ // Add the MMU mappings for the BARs
+ for (int i=0; i < 6; i++) {
+ if (BARAddrs[i] != 0)
+ mmu->add_child((FunctionalMemory *)this,
+ Range<Addr>(BARAddrs[i],
+ BARAddrs[i] +
+ BARSize[i] - 1));
+ }
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS