Deleted Added
sdiff udiff text old ( 8795:0909f8ed7aa0 ) new ( 8796:a2ae5c378d0a )
full compact
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;

--- 115 unchanged lines hidden (view full) ---

124
125 /** Maximum time that device should back off for after failed sendTiming */
126 Tick maxBackoffDelay;
127
128 /** If the port is currently waiting for a retry before it can send whatever
129 * it is that it's sending. */
130 bool inRetry;
131
132 /** Port accesses a cache which requires snooping */
133 bool recvSnoops;
134
135 /** Records snoop response so we only reply once to a status change */
136 bool snoopRangeSent;
137
138 virtual bool recvTiming(PacketPtr pkt);
139 virtual Tick recvAtomic(PacketPtr pkt)
140 {
141 if (recvSnoops) return 0;
142
143 panic("dma port shouldn't be used for pio access."); M5_DUMMY_RETURN
144 }
145 virtual void recvFunctional(PacketPtr pkt)
146 {
147 if (recvSnoops) return;
148
149 panic("dma port shouldn't be used for pio access.");
150 }
151
152 virtual void recvStatusChange(Status status)
153 {
154 if (recvSnoops) {
155 if (status == RangeChange) {
156 if (!snoopRangeSent) {
157 snoopRangeSent = true;
158 sendStatusChange(Port::RangeChange);
159 }
160 return;
161 }
162 panic("Unexpected recvStatusChange\n");
163 }
164 }
165
166 virtual void recvRetry() ;
167
168 virtual void getDeviceAddressRanges(AddrRangeList &resp,
169 bool &snoop)
170 { resp.clear(); snoop = recvSnoops; }
171
172 void queueDma(PacketPtr pkt, bool front = false);
173 void sendDma();
174
175 /** event to give us a kick every time we backoff time is reached. */
176 EventWrapper<DmaPort, &DmaPort::sendDma> backoffEvent;
177
178 public:
179 DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff,
180 bool recv_snoops = false);
181
182 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
183 uint8_t *data, Tick delay, Request::Flags flag = 0);
184
185 bool dmaPending() { return pendingCount > 0; }
186
187 unsigned cacheBlockSize() const { return peerBlockSize(); }
188 unsigned int drain(Event *de);

--- 123 unchanged lines hidden ---