summaryrefslogtreecommitdiff
path: root/src/dev/pcidev.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-07-26 23:15:49 -0700
committerNathan Binkert <nate@binkert.org>2007-07-26 23:15:49 -0700
commitf0fef8f850b0c5aa73337ca11b26169163b2b2e1 (patch)
treed49d3492618ee85717554cddbe62cba1b5e7fb9c /src/dev/pcidev.hh
parent6b73ff43ff58502c80050c7aeff5a08a4ce61f87 (diff)
parentcda354b07035f73a3b220f89014721300d36a815 (diff)
downloadgem5-f0fef8f850b0c5aa73337ca11b26169163b2b2e1.tar.xz
Merge python and x86 changes with cache branch
--HG-- extra : convert_revision : e06a950964286604274fba81dcca362d75847233
Diffstat (limited to 'src/dev/pcidev.hh')
-rw-r--r--src/dev/pcidev.hh35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/dev/pcidev.hh b/src/dev/pcidev.hh
index 5ddbe84a0..a08092689 100644
--- a/src/dev/pcidev.hh
+++ b/src/dev/pcidev.hh
@@ -42,6 +42,7 @@
#include "dev/io_device.hh"
#include "dev/pcireg.h"
#include "dev/platform.hh"
+#include "params/PciDevice.hh"
#include "sim/byteswap.hh"
#define BAR_IO_MASK 0x3
@@ -105,32 +106,12 @@ class PciDev : public DmaDevice
};
public:
- struct Params : public DmaDevice::Params
+ typedef PciDeviceParams Params;
+ const Params *
+ params() const
{
- /**
- * A pointer to the object that contains the first 64 bytes of
- * config space
- */
- PciConfigData *configData;
-
- /** The bus number we are on */
- uint32_t busNum;
-
- /** The device number we have */
- uint32_t deviceNum;
-
- /** The function number */
- uint32_t functionNum;
-
- /** The latency for pio accesses. */
- Tick pio_delay;
-
- /** The latency for a config access. */
- Tick config_delay;
- };
-
- public:
- const Params *params() const { return (const Params *)_params; }
+ return dynamic_cast<const Params *>(_params);
+ }
protected:
/** The current config space. Unlike the PciConfigData this is
@@ -266,8 +247,8 @@ class PciDev : public DmaDevice
if (if_name == "config") {
if (configPort != NULL)
panic("pciconfig port already connected to.");
- configPort = new PciConfigPort(this, params()->busNum,
- params()->deviceNum, params()->functionNum,
+ configPort = new PciConfigPort(this, params()->pci_bus,
+ params()->pci_dev, params()->pci_func,
params()->platform);
return configPort;
}