summaryrefslogtreecommitdiff
path: root/dev/platform.hh
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-11-13 15:45:22 -0500
committerNathan Binkert <binkertn@umich.edu>2004-11-13 15:45:22 -0500
commitb031888038a905e1572bbd3ed42ee4e4a7f599a6 (patch)
tree10cdccb5372ed7618edbcf275988f60528478e37 /dev/platform.hh
parente9f3279334f714de7bbd1415377715cd00a763d5 (diff)
downloadgem5-b031888038a905e1572bbd3ed42ee4e4a7f599a6.tar.xz
Use parameter structs for initialization so it's easier
to add new devices. Abstract the Platform more so that it is unnecessary to know know platform specifics for interrupting or translating PCI DMA addresses. dev/ide_ctrl.cc: convert to parameter struct for initialization use the interrupt functions in the PciDev base class convert from tsunami to using platform We don't need an interrupt controller here. dev/ide_ctrl.hh: don't use Tsunami, use Platform make the IdeDisk a friend so that it can access my plaform convert to parameter struct for construction dev/ide_disk.cc: don't use tsunami references, but platform references dev/ns_gige.cc: Convert to parameter struct for initialzation. Use code in base class for interrupts so we don't need to know anything about the platform. Don't need an IntrControl *. dev/ns_gige.hh: We don't need a Tsunami * anymore convert to a parameter struct for construction dev/pcidev.cc: deal with new parameter struct dev/pcidev.hh: - Move all of the configuration parameters into a param struct that we can pass into the constructor. - Add a Platform * for accessing new generic interrupt post/clear and dma address translation fuctions - Create functions for posting/clearing interrupts and translating dma addresses dev/platform.cc: have default functions that panic on pci calls dev/platform.hh: don't make the pci stuff pure virtual, but rather provide default implementations that panic. Also, add dma address translation. dev/tsunami.cc: this-> isn't necessary here. add pci address translation dev/tsunami.hh: implement the pciToDma address translation --HG-- extra : convert_revision : 7db27a2fa1f1bd84704921ec7ca0280b5653c43e
Diffstat (limited to 'dev/platform.hh')
-rw-r--r--dev/platform.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/dev/platform.hh b/dev/platform.hh
index 0c90e06ba..717e49411 100644
--- a/dev/platform.hh
+++ b/dev/platform.hh
@@ -35,6 +35,7 @@
#define __PLATFORM_HH_
#include "sim/sim_object.hh"
+#include "targetarch/isa_traits.hh"
class PciConfigAll;
class IntrControl;
@@ -65,8 +66,9 @@ class Platform : public SimObject
virtual void postConsoleInt() = 0;
virtual void clearConsoleInt() = 0;
virtual Tick intrFrequency() = 0;
- virtual void postPciInt(int line) = 0;
- virtual void clearPciInt(int line) = 0;
+ virtual void postPciInt(int line);
+ virtual void clearPciInt(int line);
+ virtual Addr pciToDma(Addr pciAddr) const;
};
#endif // __PLATFORM_HH_