1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 116 unchanged lines hidden (view full) --- 125 126 /** Maximum time that device should back off for after failed sendTiming */ 127 Tick maxBackoffDelay; 128 129 /** If the port is currently waiting for a retry before it can send whatever 130 * it is that it's sending. */ 131 bool inRetry; 132 |
133 /** Port accesses a cache which requires snooping */ 134 bool recvSnoops; 135 136 /** Records snoop response so we only reply once to a status change */ 137 bool snoopRangeSent; 138 |
139 virtual bool recvTiming(PacketPtr pkt); 140 virtual Tick recvAtomic(PacketPtr pkt) |
141 { 142 if (recvSnoops) return 0; 143 144 panic("dma port shouldn't be used for pio access."); M5_DUMMY_RETURN 145 } |
146 virtual void recvFunctional(PacketPtr pkt) |
147 { 148 if (recvSnoops) return; |
149 |
150 panic("dma port shouldn't be used for pio access."); 151 } 152 |
153 virtual void recvStatusChange(Status status) |
154 { 155 if (recvSnoops) { 156 if (status == RangeChange) { 157 if (!snoopRangeSent) { 158 snoopRangeSent = true; 159 sendStatusChange(Port::RangeChange); 160 } 161 return; 162 } 163 panic("Unexpected recvStatusChange\n"); 164 } 165 } |
166 167 virtual void recvRetry() ; 168 169 virtual void getDeviceAddressRanges(AddrRangeList &resp, 170 bool &snoop) |
171 { resp.clear(); snoop = recvSnoops; } |
172 173 void queueDma(PacketPtr pkt, bool front = false); 174 void sendDma(); 175 176 /** event to give us a kick every time we backoff time is reached. */ 177 EventWrapper<DmaPort, &DmaPort::sendDma> backoffEvent; 178 179 public: |
180 DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff, 181 bool recv_snoops = false); |
182 183 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event, 184 uint8_t *data, Tick delay, Request::Flags flag = 0); 185 186 bool dmaPending() { return pendingCount > 0; } 187 188 unsigned cacheBlockSize() const { return peerBlockSize(); } 189 unsigned int drain(Event *de); --- 128 unchanged lines hidden --- |