Deleted Added
sdiff udiff text old ( 2641:6d9d837e2032 ) new ( 2657:b119b774656b )
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;

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

100
101 friend class PioPort;
102 };
103
104 /** Schedule a sendTiming() event to be called in the future. */
105 void sendTiming(Packet *pkt, Tick time)
106 { new PioPort::SendEvent(this, pkt, time); }
107
108 /** This function pops the last element off the transmit list and sends it.*/
109 virtual Packet *recvRetry();
110
111 public:
112 PioPort(PioDevice *dev, Platform *p);
113
114 friend class PioPort::SendEvent;
115};
116
117

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

141 virtual Tick recvAtomic(Packet *pkt)
142 { panic("dma port shouldn't be used for pio access."); }
143 virtual void recvFunctional(Packet *pkt)
144 { panic("dma port shouldn't be used for pio access."); }
145
146 virtual void recvStatusChange(Status status)
147 { ; }
148
149 virtual Packet *recvRetry() ;
150
151 virtual void getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop)
152 { resp.clear(); snoop.clear(); }
153
154 class SendEvent : public Event
155 {
156 DmaPort *port;
157 Packet *packet;
158
159 SendEvent(PioPort *p, Packet *pkt, Tick t)
160 : Event(&mainEventQueue), packet(pkt)
161 { schedule(curTick + t); }
162
163 virtual void process();
164
165 virtual const char *description()
166 { return "Future scheduled sendTiming event"; }
167
168 friend class DmaPort;
169 };
170
171 void sendDma(Packet *pkt);
172
173 public:
174 DmaPort(DmaDevice *dev, Platform *p);
175
176 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
177 uint8_t *data = NULL);
178
179 bool dmaPending() { return pendingCount > 0; }
180
181 friend class DmaPort::SendEvent;
182
183};
184
185/**
186 * This device is the base class which all devices senstive to an address range
187 * inherit from. There are three pure virtual functions which all devices must
188 * implement addressRanges(), read(), and write(). The magic do choose which
189 * mode we are in, etc is handled by the PioPort so the device doesn't have to
190 * bother.

--- 145 unchanged lines hidden ---