diff options
Diffstat (limited to 'dev/tsunami_pchip.cc')
-rw-r--r-- | dev/tsunami_pchip.cc | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/dev/tsunami_pchip.cc b/dev/tsunami_pchip.cc index 1323a0548..999278e37 100644 --- a/dev/tsunami_pchip.cc +++ b/dev/tsunami_pchip.cc @@ -65,76 +65,76 @@ TsunamiPChip::TsunamiPChip(Params *p) } Tick -TsunamiPChip::read(Packet &pkt) +TsunamiPChip::read(Packet *pkt) { - assert(pkt.result == Unknown); - assert(pkt.addr >= pioAddr && pkt.addr < pioAddr + pioSize); + assert(pkt->result == Unknown); + assert(pkt->addr >= pioAddr && pkt->addr < pioAddr + pioSize); - pkt.time += pioDelay; - pkt.allocate(); - Addr daddr = (pkt.addr - pioAddr) >> 6;; - assert(pkt.size == sizeof(uint64_t)); + pkt->time += pioDelay; + pkt->allocate(); + Addr daddr = (pkt->addr - pioAddr) >> 6;; + assert(pkt->size == sizeof(uint64_t)); - DPRINTF(Tsunami, "read va=%#x size=%d\n", pkt.addr, pkt.size); + DPRINTF(Tsunami, "read va=%#x size=%d\n", pkt->addr, pkt->size); switch(daddr) { case TSDEV_PC_WSBA0: - pkt.set(wsba[0]); + pkt->set(wsba[0]); break; case TSDEV_PC_WSBA1: - pkt.set(wsba[1]); + pkt->set(wsba[1]); break; case TSDEV_PC_WSBA2: - pkt.set(wsba[2]); + pkt->set(wsba[2]); break; case TSDEV_PC_WSBA3: - pkt.set(wsba[3]); + pkt->set(wsba[3]); break; case TSDEV_PC_WSM0: - pkt.set(wsm[0]); + pkt->set(wsm[0]); break; case TSDEV_PC_WSM1: - pkt.set(wsm[1]); + pkt->set(wsm[1]); break; case TSDEV_PC_WSM2: - pkt.set(wsm[2]); + pkt->set(wsm[2]); break; case TSDEV_PC_WSM3: - pkt.set(wsm[3]); + pkt->set(wsm[3]); break; case TSDEV_PC_TBA0: - pkt.set(tba[0]); + pkt->set(tba[0]); break; case TSDEV_PC_TBA1: - pkt.set(tba[1]); + pkt->set(tba[1]); break; case TSDEV_PC_TBA2: - pkt.set(tba[2]); + pkt->set(tba[2]); break; case TSDEV_PC_TBA3: - pkt.set(tba[3]); + pkt->set(tba[3]); break; case TSDEV_PC_PCTL: - pkt.set(pctl); + pkt->set(pctl); break; case TSDEV_PC_PLAT: panic("PC_PLAT not implemented\n"); case TSDEV_PC_RES: panic("PC_RES not implemented\n"); case TSDEV_PC_PERROR: - pkt.set((uint64_t)0x00); + pkt->set((uint64_t)0x00); break; case TSDEV_PC_PERRMASK: - pkt.set((uint64_t)0x00); + pkt->set((uint64_t)0x00); break; case TSDEV_PC_PERRSET: panic("PC_PERRSET not implemented\n"); case TSDEV_PC_TLBIV: panic("PC_TLBIV not implemented\n"); case TSDEV_PC_TLBIA: - pkt.set((uint64_t)0x00); // shouldn't be readable, but linux + pkt->set((uint64_t)0x00); // shouldn't be readable, but linux break; case TSDEV_PC_PMONCTL: panic("PC_PMONCTL not implemented\n"); @@ -143,63 +143,63 @@ TsunamiPChip::read(Packet &pkt) default: panic("Default in PChip Read reached reading 0x%x\n", daddr); } - pkt.result = Success; + pkt->result = Success; return pioDelay; } Tick -TsunamiPChip::write(Packet &pkt) +TsunamiPChip::write(Packet *pkt) { - pkt.time += pioDelay; + pkt->time += pioDelay; - assert(pkt.result == Unknown); - assert(pkt.addr >= pioAddr && pkt.addr < pioAddr + pioSize); - Addr daddr = (pkt.addr - pioAddr) >> 6; + assert(pkt->result == Unknown); + assert(pkt->addr >= pioAddr && pkt->addr < pioAddr + pioSize); + Addr daddr = (pkt->addr - pioAddr) >> 6; - assert(pkt.size == sizeof(uint64_t)); + assert(pkt->size == sizeof(uint64_t)); - DPRINTF(Tsunami, "write - va=%#x size=%d \n", pkt.addr, pkt.size); + DPRINTF(Tsunami, "write - va=%#x size=%d \n", pkt->addr, pkt->size); switch(daddr) { case TSDEV_PC_WSBA0: - wsba[0] = pkt.get<uint64_t>(); + wsba[0] = pkt->get<uint64_t>(); break; case TSDEV_PC_WSBA1: - wsba[1] = pkt.get<uint64_t>(); + wsba[1] = pkt->get<uint64_t>(); break; case TSDEV_PC_WSBA2: - wsba[2] = pkt.get<uint64_t>(); + wsba[2] = pkt->get<uint64_t>(); break; case TSDEV_PC_WSBA3: - wsba[3] = pkt.get<uint64_t>(); + wsba[3] = pkt->get<uint64_t>(); break; case TSDEV_PC_WSM0: - wsm[0] = pkt.get<uint64_t>(); + wsm[0] = pkt->get<uint64_t>(); break; case TSDEV_PC_WSM1: - wsm[1] = pkt.get<uint64_t>(); + wsm[1] = pkt->get<uint64_t>(); break; case TSDEV_PC_WSM2: - wsm[2] = pkt.get<uint64_t>(); + wsm[2] = pkt->get<uint64_t>(); break; case TSDEV_PC_WSM3: - wsm[3] = pkt.get<uint64_t>(); + wsm[3] = pkt->get<uint64_t>(); break; case TSDEV_PC_TBA0: - tba[0] = pkt.get<uint64_t>(); + tba[0] = pkt->get<uint64_t>(); break; case TSDEV_PC_TBA1: - tba[1] = pkt.get<uint64_t>(); + tba[1] = pkt->get<uint64_t>(); break; case TSDEV_PC_TBA2: - tba[2] = pkt.get<uint64_t>(); + tba[2] = pkt->get<uint64_t>(); break; case TSDEV_PC_TBA3: - tba[3] = pkt.get<uint64_t>(); + tba[3] = pkt->get<uint64_t>(); break; case TSDEV_PC_PCTL: - pctl = pkt.get<uint64_t>(); + pctl = pkt->get<uint64_t>(); break; case TSDEV_PC_PLAT: panic("PC_PLAT not implemented\n"); @@ -224,7 +224,7 @@ TsunamiPChip::write(Packet &pkt) } // uint64_t - pkt.result = Success; + pkt->result = Success; return pioDelay; } |