summaryrefslogtreecommitdiff
path: root/src/dev/pcidev.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-08-16 16:49:05 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-08-16 16:49:05 -0400
commitbba265ccd8f50376ac2f148c4dd85b9eca30e8da (patch)
treeb2110d2ab1bef719bc60b6cd473ae18c6b3c1a36 /src/dev/pcidev.hh
parent773cb77656174b221c1e51b92a8af7d8e268b733 (diff)
downloadgem5-bba265ccd8f50376ac2f148c4dd85b9eca30e8da.tar.xz
PCI: Move PCI Configuration data into devices now that we can inherit parameters.
--HG-- extra : convert_revision : bd2214b28fb46a9a9e9e204e0539be33acb548ad
Diffstat (limited to 'src/dev/pcidev.hh')
-rw-r--r--src/dev/pcidev.hh36
1 files changed, 4 insertions, 32 deletions
diff --git a/src/dev/pcidev.hh b/src/dev/pcidev.hh
index 6c72d1b15..a584a957d 100644
--- a/src/dev/pcidev.hh
+++ b/src/dev/pcidev.hh
@@ -52,30 +52,6 @@
#define BAR_NUMBER(x) (((x) - PCI0_BASE_ADDR0) >> 0x2);
-/**
- * This class encapulates the first 64 bytes of a singles PCI
- * devices config space that in configured by the configuration file.
- */
-class PciConfigData : public SimObject
-{
- public:
- /**
- * Constructor to initialize the devices config space to 0.
- */
- PciConfigData(const std::string &name)
- : SimObject(name)
- {
- std::memset(config.data, 0, sizeof(config.data));
- std::memset(BARSize, 0, sizeof(BARSize));
- }
-
- /** The first 64 bytes */
- PCIConfig config;
-
- /** The size of the BARs */
- uint32_t BARSize[6];
-};
-
/**
* PCI device, base implementation is only config space.
@@ -114,10 +90,7 @@ class PciDev : public DmaDevice
}
protected:
- /** The current config space. Unlike the PciConfigData this is
- * updated during simulation while continues to reflect what was
- * in the config file.
- */
+ /** The current config space. */
PCIConfig config;
/** The size of the BARs */
@@ -174,7 +147,6 @@ class PciDev : public DmaDevice
protected:
Platform *plat;
- PciConfigData *configData;
Tick pioDelay;
Tick configDelay;
PciConfigPort *configPort;
@@ -202,15 +174,15 @@ class PciDev : public DmaDevice
void
intrPost()
- { plat->postPciInt(letoh(configData->config.interruptLine)); }
+ { plat->postPciInt(letoh(config.interruptLine)); }
void
intrClear()
- { plat->clearPciInt(letoh(configData->config.interruptLine)); }
+ { plat->clearPciInt(letoh(config.interruptLine)); }
uint8_t
interruptLine()
- { return letoh(configData->config.interruptLine); }
+ { return letoh(config.interruptLine); }
/** return the address ranges that this device responds to.
* @params range_list range list to populate with ranges