From 43787ad8639f6ed32d99acb7b1347e58797fde6c Mon Sep 17 00:00:00 2001 From: Andrew Schultz Date: Sat, 21 Feb 2004 20:29:38 -0500 Subject: Added initial (hackish) support for translating between a PCI bus address and a physical memory address for DMA dev/tsunami_pchip.cc: dev/tsunami_pchip.hh: Changed registers to array and added mapping function to translate between PCI bus space and physical address space --HG-- extra : convert_revision : e9dc4de4e7effe8e8e2365298843d6f767b5a289 --- dev/tsunami_pchip.hh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'dev/tsunami_pchip.hh') diff --git a/dev/tsunami_pchip.hh b/dev/tsunami_pchip.hh index 99530ddc0..3ed66c54c 100644 --- a/dev/tsunami_pchip.hh +++ b/dev/tsunami_pchip.hh @@ -48,24 +48,18 @@ class TsunamiPChip : public FunctionalMemory protected: Tsunami *tsunami; - uint64_t wsba0; - uint64_t wsba1; - uint64_t wsba2; - uint64_t wsba3; - uint64_t wsm0; - uint64_t wsm1; - uint64_t wsm2; - uint64_t wsm3; - uint64_t tba0; - uint64_t tba1; - uint64_t tba2; - uint64_t tba3; - + uint64_t wsba[4]; + uint64_t wsm[4]; + uint64_t tba[4]; public: TsunamiPChip(const std::string &name, Tsunami *t, Addr a, MemoryController *mmu); + // @todo This hack does a quick and dirty translation of the PCI bus address to + // a valid DMA address. This is described in 10-10 of the Tsunami book, should be fixed + Addr translatePciToDma(Addr busAddr); + virtual Fault read(MemReqPtr &req, uint8_t *data); virtual Fault write(MemReqPtr &req, const uint8_t *data); -- cgit v1.2.3