diff options
author | Andrew Schultz <alschult@umich.edu> | 2004-02-10 00:19:43 -0500 |
---|---|---|
committer | Andrew Schultz <alschult@umich.edu> | 2004-02-10 00:19:43 -0500 |
commit | 81d5ffe7dea641402a5e1b92448646f515f46677 (patch) | |
tree | 9334b2fac9632e8bf6a5879ead536f6bf3f99f17 /dev/tsunami_pchip.cc | |
parent | eac2d6a66863dcd7d5129ee5112ea49248f9efa8 (diff) | |
download | gem5-81d5ffe7dea641402a5e1b92448646f515f46677.tar.xz |
Changed new linux stuff to work with new FunctionalMemory interface and
some sundry problems with new interface
dev/alpha_console.cc:
dev/alpha_console.hh:
dev/baddev.cc:
dev/baddev.hh:
dev/pciconfigall.cc:
dev/pciconfigall.hh:
dev/pcidev.cc:
dev/pcidev.hh:
dev/tsunami_cchip.cc:
dev/tsunami_cchip.hh:
dev/tsunami_io.cc:
dev/tsunami_io.hh:
dev/tsunami_pchip.cc:
dev/tsunami_pchip.hh:
dev/tsunami_uart.cc:
dev/tsunami_uart.hh:
Fixed to use new FunctionalMemory interface
--HG--
extra : convert_revision : bee98e6285d92f28fafacf919ab06eaf333a9b56
Diffstat (limited to 'dev/tsunami_pchip.cc')
-rw-r--r-- | dev/tsunami_pchip.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/dev/tsunami_pchip.cc b/dev/tsunami_pchip.cc index 61f126c8b..b67bd476d 100644 --- a/dev/tsunami_pchip.cc +++ b/dev/tsunami_pchip.cc @@ -23,10 +23,12 @@ using namespace std; -TsunamiPChip::TsunamiPChip(const string &name, Tsunami *t, - Addr addr, Addr mask, MemoryController *mmu) - : MmapDevice(name, addr, mask, mmu), tsunami(t) +TsunamiPChip::TsunamiPChip(const string &name, Tsunami *t, Addr a, + MemoryController *mmu) + : FunctionalMemory(name), addr(a), tsunami(t) { + mmu->add_child(this, Range<Addr>(addr, addr + size)); + wsba0 = 0; wsba1 = 0; wsba2 = 0; @@ -50,7 +52,7 @@ TsunamiPChip::read(MemReqPtr &req, uint8_t *data) DPRINTF(Tsunami, "read va=%#x size=%d\n", req->vaddr, req->size); - Addr daddr = (req->paddr & addr_mask) >> 6; + Addr daddr = (req->paddr & size) >> 6; // ExecContext *xc = req->xc; // int cpuid = xc->cpu_id; @@ -140,7 +142,7 @@ TsunamiPChip::write(MemReqPtr &req, const uint8_t *data) DPRINTF(Tsunami, "write - va=%#x size=%d \n", req->vaddr, req->size); - Addr daddr = (req->paddr & addr_mask) >> 6; + Addr daddr = (req->paddr & size) >> 6; switch (req->size) { @@ -239,7 +241,6 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiPChip) SimObjectParam<Tsunami *> tsunami; SimObjectParam<MemoryController *> mmu; Param<Addr> addr; - Param<Addr> mask; END_DECLARE_SIM_OBJECT_PARAMS(TsunamiPChip) @@ -247,14 +248,13 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(TsunamiPChip) INIT_PARAM(tsunami, "Tsunami"), INIT_PARAM(mmu, "Memory Controller"), - INIT_PARAM(addr, "Device Address"), - INIT_PARAM(mask, "Address Mask") + INIT_PARAM(addr, "Device Address") END_INIT_SIM_OBJECT_PARAMS(TsunamiPChip) CREATE_SIM_OBJECT(TsunamiPChip) { - return new TsunamiPChip(getInstanceName(), tsunami, addr, mask, mmu); + return new TsunamiPChip(getInstanceName(), tsunami, addr, mmu); } REGISTER_SIM_OBJECT("TsunamiPChip", TsunamiPChip) |