gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
i8254xGBe.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006 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;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 /* @file
30  * Device model for Intel's 8254x line of gigabit ethernet controllers.
31  */
32 
33 #ifndef __DEV_NET_I8254XGBE_HH__
34 #define __DEV_NET_I8254XGBE_HH__
35 
36 #include <cstdint>
37 #include <deque>
38 #include <string>
39 
40 #include "base/inet.hh"
41 #include "base/trace.hh"
42 #include "base/types.hh"
43 #include "debug/EthernetDesc.hh"
44 #include "debug/EthernetIntr.hh"
45 #include "dev/net/etherdevice.hh"
46 #include "dev/net/etherint.hh"
47 #include "dev/net/etherpkt.hh"
49 #include "dev/net/pktfifo.hh"
50 #include "dev/pci/device.hh"
51 #include "params/IGbE.hh"
52 #include "sim/eventq.hh"
53 #include "sim/serialize.hh"
54 
55 class IGbEInt;
56 
57 class IGbE : public EtherDevice
58 {
59  private:
61 
62  // device registers
64 
65  // eeprom data, status and control bits
67  uint8_t eeOpcode, eeAddr;
69 
70  // packet fifos
73 
74  // Packet that we are currently putting into the txFifo
76 
77  // Should to Rx/Tx State machine tick?
78  bool inTick;
79  bool rxTick;
80  bool txTick;
81  bool txFifoTick;
82 
84 
85  // Number of bytes copied from current RX packet
86  unsigned pktOffset;
87 
88  // Delays in managaging descriptors
92 
93  // Event and function to deal with RDTR timer expiring
94  void rdtrProcess() {
96  DPRINTF(EthernetIntr,
97  "Posting RXT interrupt because RDTR timer expired\n");
99  }
100 
102 
103  // Event and function to deal with RADV timer expiring
104  void radvProcess() {
106  DPRINTF(EthernetIntr,
107  "Posting RXT interrupt because RADV timer expired\n");
109  }
110 
112 
113  // Event and function to deal with TADV timer expiring
114  void tadvProcess() {
116  DPRINTF(EthernetIntr,
117  "Posting TXDW interrupt because TADV timer expired\n");
119  }
120 
122 
123  // Event and function to deal with TIDV timer expiring
124  void tidvProcess() {
126  DPRINTF(EthernetIntr,
127  "Posting TXDW interrupt because TIDV timer expired\n");
129  }
131 
132  // Main event to tick the device
133  void tick();
135 
136 
137  uint64_t macAddr;
138 
139  void rxStateMachine();
140  void txStateMachine();
141  void txWire();
142 
148  void postInterrupt(iGbReg::IntTypes t, bool now = false);
149 
153  void chkInterrupt();
154 
157  void delayIntEvent();
158  void cpuPostInt();
159  // Event to moderate interrupts
161 
164  void cpuClearInt();
165 
166  Tick intClock() { return SimClock::Int::ns * 1024; }
167 
170  void restartClock();
171 
175  void checkDrain();
176 
177  template<class T>
178  class DescCache : public Serializable
179  {
180  protected:
181  virtual Addr descBase() const = 0;
182  virtual long descHead() const = 0;
183  virtual long descTail() const = 0;
184  virtual long descLen() const = 0;
185  virtual void updateHead(long h) = 0;
186  virtual void enableSm() = 0;
187  virtual void actionAfterWb() {}
188  virtual void fetchAfterWb() = 0;
189 
193 
195  T *wbBuf;
196 
197  // Pointer to the device we cache for
199 
200  // Name of this descriptor cache
201  std::string _name;
202 
203  // How far we've cached
204  int cachePnt;
205 
206  // The size of the descriptor cache
207  int size;
208 
209  // How many descriptors we are currently fetching
211 
212  // How many descriptors we are currently writing back
213  int wbOut;
214 
215  // if the we wrote back to the end of the descriptor ring and are going
216  // to have to wrap and write more
217  bool moreToWb;
218 
219  // What the alignment is of the next descriptor writeback
221 
224 
226  Addr pciToDma(Addr a) { return igbe->pciToDma(a); }
227 
228  public:
232 
233  DescCache(IGbE *i, const std::string n, int s);
234  virtual ~DescCache();
235 
236  std::string name() { return _name; }
237 
242  void areaChanged();
243 
244  void writeback(Addr aMask);
245  void writeback1();
247 
251  void fetchDescriptors();
252  void fetchDescriptors1();
254 
257  void fetchComplete();
259 
262  void wbComplete();
264 
265  /* Return the number of descriptors left in the ring, so the device has
266  * a way to figure out if it needs to interrupt.
267  */
268  unsigned
269  descLeft() const
270  {
271  unsigned left = unusedCache.size();
272  if (cachePnt > descTail())
273  left += (descLen() - cachePnt + descTail());
274  else
275  left += (descTail() - cachePnt);
276 
277  return left;
278  }
279 
280  /* Return the number of descriptors used and not written back.
281  */
282  unsigned descUsed() const { return usedCache.size(); }
283 
284  /* Return the number of cache unused descriptors we have. */
285  unsigned descUnused() const { return unusedCache.size(); }
286 
287  /* Get into a state where the descriptor address/head/etc colud be
288  * changed */
289  void reset();
290 
291 
292  void serialize(CheckpointOut &cp) const override;
293  void unserialize(CheckpointIn &cp) override;
294 
295  virtual bool hasOutstandingEvents() {
296  return wbEvent.scheduled() || fetchEvent.scheduled();
297  }
298 
299  };
300 
301 
302  class RxDescCache : public DescCache<iGbReg::RxDesc>
303  {
304  protected:
305  Addr descBase() const override { return igbe->regs.rdba(); }
306  long descHead() const override { return igbe->regs.rdh(); }
307  long descLen() const override { return igbe->regs.rdlen() >> 4; }
308  long descTail() const override { return igbe->regs.rdt(); }
309  void updateHead(long h) override { igbe->regs.rdh(h); }
310  void enableSm() override;
311  void fetchAfterWb() override {
314  }
315 
316  bool pktDone;
317 
320 
323  unsigned bytesCopied;
324 
325  public:
326  RxDescCache(IGbE *i, std::string n, int s);
327 
335  int writePacket(EthPacketPtr packet, int pkt_offset);
336 
339  void pktComplete();
340 
344  bool packetDone();
345 
347 
348  // Event to handle issuing header and data write at the same time
349  // and only callking pktComplete() when both are completed
350  void pktSplitDone();
353 
354  bool hasOutstandingEvents() override;
355 
356  void serialize(CheckpointOut &cp) const override;
357  void unserialize(CheckpointIn &cp) override;
358  };
359  friend class RxDescCache;
360 
362 
363  class TxDescCache : public DescCache<iGbReg::TxDesc>
364  {
365  protected:
366  Addr descBase() const override { return igbe->regs.tdba(); }
367  long descHead() const override { return igbe->regs.tdh(); }
368  long descTail() const override { return igbe->regs.tdt(); }
369  long descLen() const override { return igbe->regs.tdlen() >> 4; }
370  void updateHead(long h) override { igbe->regs.tdh(h); }
371  void enableSm() override;
372  void actionAfterWb() override;
373  void fetchAfterWb() override {
376  }
377 
378 
379 
380  bool pktDone;
381  bool isTcp;
386  uint32_t descEnd;
387 
388 
389  // tso variables
390  bool useTso;
399  uint8_t tsoHeader[256];
402  int tsoPkts;
403 
404  public:
405  TxDescCache(IGbE *i, std::string n, int s);
406 
411  unsigned getPacketSize(EthPacketPtr p);
413  void processContextDesc();
414 
418  unsigned
419  descInBlock(unsigned num_desc)
420  {
421  return num_desc / igbe->cacheBlockSize() / sizeof(iGbReg::TxDesc);
422  }
423 
428  bool packetAvailable();
429 
433  bool packetWaiting() { return pktWaiting; }
434 
441  bool packetMultiDesc() { return pktMultiDesc;}
442 
445  void pktComplete();
447 
448  void headerComplete();
450 
451 
453  DPRINTF(EthernetDesc,
454  "Completion writeback Addr: %#x enabled: %d\n",
455  a, enabled);
458  }
459 
460  bool hasOutstandingEvents() override;
461 
462  void nullCallback() {
463  DPRINTF(EthernetDesc, "Completion writeback complete\n");
464  }
466 
467  void serialize(CheckpointOut &cp) const override;
468  void unserialize(CheckpointIn &cp) override;
469  };
470 
471  friend class TxDescCache;
472 
474 
475  public:
476  PARAMS(IGbE);
477 
478  IGbE(const Params &params);
479  ~IGbE();
480  void init() override;
481 
482  Port &getPort(const std::string &if_name,
483  PortID idx=InvalidPortID) override;
484 
486 
487  Tick read(PacketPtr pkt) override;
488  Tick write(PacketPtr pkt) override;
489 
490  Tick writeConfig(PacketPtr pkt) override;
491 
492  bool ethRxPkt(EthPacketPtr packet);
493  void ethTxDone();
494 
495  void serialize(CheckpointOut &cp) const override;
496  void unserialize(CheckpointIn &cp) override;
497 
498  DrainState drain() override;
499  void drainResume() override;
500 
501 };
502 
503 class IGbEInt : public EtherInt
504 {
505  private:
507 
508  public:
509  IGbEInt(const std::string &name, IGbE *d)
510  : EtherInt(name), dev(d)
511  { }
512 
513  virtual bool recvPacket(EthPacketPtr pkt) { return dev->ethRxPkt(pkt); }
514  virtual void sendDone() { dev->ethTxDone(); }
515 };
516 
517 #endif //__DEV_NET_I8254XGBE_HH__
IGbE::TxDescCache::completionAddress
Addr completionAddress
Definition: i8254xGBe.hh:384
IGbE::IGbE
IGbE(const Params &params)
Definition: i8254xGBe.cc:58
IGbE::TxDescCache::descLen
long descLen() const override
Definition: i8254xGBe.hh:369
IGbE::DescCache::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:1108
IGbEInt::recvPacket
virtual bool recvPacket(EthPacketPtr pkt)
Definition: i8254xGBe.hh:513
IGbE::TxDescCache::descTail
long descTail() const override
Definition: i8254xGBe.hh:368
IGbE::txFifoTick
bool txFifoTick
Definition: i8254xGBe.hh:81
IGbE::DescCache::wbAlignment
Addr wbAlignment
Definition: i8254xGBe.hh:220
Event::scheduled
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:462
IGbE::TxDescCache::isTcp
bool isTcp
Definition: i8254xGBe.hh:381
IGbE::DescCache::fetchDescriptors
void fetchDescriptors()
Fetch a chunk of descriptors into the descriptor cache.
Definition: i8254xGBe.cc:926
IGbEInt::IGbEInt
IGbEInt(const std::string &name, IGbE *d)
Definition: i8254xGBe.hh:509
IGbE::DescCache::moreToWb
bool moreToWb
Definition: i8254xGBe.hh:217
SimClock::Int::ns
Tick ns
nanosecond
Definition: core.cc:62
IGbE::DescCache::descLen
virtual long descLen() const =0
IGbE::DescCache::name
std::string name()
Definition: i8254xGBe.hh:236
IGbE::postInterrupt
void postInterrupt(iGbReg::IntTypes t, bool now=false)
Write an interrupt into the interrupt pending register and check mask and interrupt limit timer befor...
Definition: i8254xGBe.cc:692
IGbE::DescCache::annSmFetch
std::string annSmFetch
Annotate sm.
Definition: i8254xGBe.hh:230
IGbE::fetchDelay
Tick fetchDelay
Definition: i8254xGBe.hh:89
PacketFifo
Definition: pktfifo.hh:76
iGbReg::Regs
Definition: i8254xGBe_defs.hh:297
IGbE::txFifo
PacketFifo txFifo
Definition: i8254xGBe.hh:72
DrainState::Running
@ Running
Running normally.
IGbE::txReadDelay
Tick txReadDelay
Definition: i8254xGBe.hh:91
IGbE::DescCache::fetchComplete
void fetchComplete()
Called by event when dma to read descriptors is completed.
Definition: i8254xGBe.cc:985
IGbE::write
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i8254xGBe.cc:355
serialize.hh
IGbE::DescCache::pktPtr
EthPacketPtr pktPtr
The packet that is currently being dmad to memory if any.
Definition: i8254xGBe.hh:223
IGbE::DescCache::size
int size
Definition: i8254xGBe.hh:207
InvalidPortID
const PortID InvalidPortID
Definition: types.hh:244
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
IGbE::RxDescCache
Definition: i8254xGBe.hh:302
IGbE::DescCache::wbOut
int wbOut
Definition: i8254xGBe.hh:213
IGbE::DescCache::actionAfterWb
virtual void actionAfterWb()
Definition: i8254xGBe.hh:187
IGbE::TxDescCache::actionAfterWb
void actionAfterWb() override
Definition: i8254xGBe.cc:1901
IGbE::txTick
bool txTick
Definition: i8254xGBe.hh:80
IGbE::TxDescCache::tsoHeaderLen
Addr tsoHeaderLen
Definition: i8254xGBe.hh:391
IGbE::TxDescCache::tsoCopyBytes
Addr tsoCopyBytes
Definition: i8254xGBe.hh:401
IGbE::TxDescCache::headerEvent
EventFunctionWrapper headerEvent
Definition: i8254xGBe.hh:449
EtherInt
Definition: etherint.hh:47
Serializable
Basic support for object serialization.
Definition: serialize.hh:175
IGbE::TxDescCache::tsoLoadedHeader
bool tsoLoadedHeader
Definition: i8254xGBe.hh:397
IGbE::DescCache::wbEvent
EventFunctionWrapper wbEvent
Definition: i8254xGBe.hh:263
IGbE::TxDescCache::packetAvailable
bool packetAvailable()
Ask if the packet has been transfered so the state machine can give it to the fifo.
Definition: i8254xGBe.cc:1975
IGbE::TxDescCache::tsoPkts
int tsoPkts
Definition: i8254xGBe.hh:402
iGbReg::Regs::tdlen
TDLEN tdlen
Definition: i8254xGBe_defs.hh:620
IGbE::TxDescCache::tsoTotalLen
Addr tsoTotalLen
Definition: i8254xGBe.hh:393
IGbE::tick
void tick()
Definition: i8254xGBe.cc:2318
IGbE::TxDescCache::packetWaiting
bool packetWaiting()
Ask if we are still waiting for the packet to be transfered.
Definition: i8254xGBe.hh:433
IGbE::ethRxPkt
bool ethRxPkt(EthPacketPtr packet)
Definition: i8254xGBe.cc:2154
IGbE::regs
iGbReg::Regs regs
Definition: i8254xGBe.hh:63
etherint.hh
IGbE::DescCache::fetchDescriptors1
void fetchDescriptors1()
Definition: i8254xGBe.cc:965
IGbE::ethTxDone
void ethTxDone()
Definition: i8254xGBe.cc:2346
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:59
IGbE::TxDescCache::nullEvent
EventFunctionWrapper nullEvent
Definition: i8254xGBe.hh:465
IGbE::lastInterrupt
Tick lastInterrupt
Definition: i8254xGBe.hh:485
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:243
IGbE::DescCache::wbBuf
T * wbBuf
Definition: i8254xGBe.hh:195
IGbE::RxDescCache::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:1486
IGbE::TxDescCache::completionEnabled
bool completionEnabled
Definition: i8254xGBe.hh:385
IGbE::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:2412
IGbE::DescCache::annUnusedDescQ
std::string annUnusedDescQ
Definition: i8254xGBe.hh:230
IGbE::DescCache::descUnused
unsigned descUnused() const
Definition: i8254xGBe.hh:285
IGbEInt
Definition: i8254xGBe.hh:503
IGbE::rdtrEvent
EventFunctionWrapper rdtrEvent
Definition: i8254xGBe.hh:101
DmaDevice::cacheBlockSize
unsigned int cacheBlockSize() const
Definition: dma_device.hh:242
IGbE::RxDescCache::pktDataEvent
EventFunctionWrapper pktDataEvent
Definition: i8254xGBe.hh:352
IGbE::TxDescCache::completionWriteback
void completionWriteback(Addr a, bool enabled)
Definition: i8254xGBe.hh:452
IGbE::RxDescCache::hasOutstandingEvents
bool hasOutstandingEvents() override
Definition: i8254xGBe.cc:1468
iGbReg::IT_TXDW
@ IT_TXDW
Definition: i8254xGBe_defs.hh:172
IGbE::RxDescCache::pktDone
bool pktDone
Definition: i8254xGBe.hh:316
IGbE::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: i8254xGBe.cc:2012
IGbE::RxDescCache::descLen
long descLen() const override
Definition: i8254xGBe.hh:307
IGbE::tidvEvent
EventFunctionWrapper tidvEvent
Definition: i8254xGBe.hh:130
IGbE::inTick
bool inTick
Definition: i8254xGBe.hh:78
IGbE::eeDataBits
int eeDataBits
Definition: i8254xGBe.hh:66
IGbE::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: i8254xGBe.cc:134
IGbE::DescCache::fetchDelayEvent
EventFunctionWrapper fetchDelayEvent
Definition: i8254xGBe.hh:253
iGbReg::Regs::rdt
RDT rdt
Definition: i8254xGBe_defs.hh:577
IGbE::eeAddrBits
int eeAddrBits
Definition: i8254xGBe.hh:66
device.hh
IGbE::DescCache::descHead
virtual long descHead() const =0
IGbE::TxDescCache
Definition: i8254xGBe.hh:363
IGbE::rxDescCache
RxDescCache rxDescCache
Definition: i8254xGBe.hh:361
IGbE::read
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i8254xGBe.cc:167
IGbE::RxDescCache::RxDescCache
RxDescCache(IGbE *i, std::string n, int s)
Definition: i8254xGBe.cc:1147
IGbE::TxDescCache::descBase
Addr descBase() const override
Definition: i8254xGBe.hh:366
iGbReg::IntTypes
IntTypes
Definition: i8254xGBe_defs.hh:169
IGbE::TxDescCache::pktWaiting
bool pktWaiting
Definition: i8254xGBe.hh:382
EventFunctionWrapper
Definition: eventq.hh:1112
IGbE::TxDescCache::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:1917
IGbE::TxDescCache::enableSm
void enableSm() override
Definition: i8254xGBe.cc:1985
IGbE::cpuClearInt
void cpuClearInt()
Clear the interupt line to the cpu.
Definition: i8254xGBe.cc:776
IGbE::DescCache::descLeft
unsigned descLeft() const
Definition: i8254xGBe.hh:269
IGbE::TxDescCache::fetchAfterWb
void fetchAfterWb() override
Definition: i8254xGBe.hh:373
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
ArmISA::n
Bitfield< 31 > n
Definition: miscregs_types.hh:450
IGbE::DescCache::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:1073
IGbE::fetchCompDelay
Tick fetchCompDelay
Definition: i8254xGBe.hh:90
IGbE::DescCache::pciToDma
Addr pciToDma(Addr a)
Shortcut for DMA address translation.
Definition: i8254xGBe.hh:226
IGbE::txDescCache
TxDescCache txDescCache
Definition: i8254xGBe.hh:473
IGbE::TxDescCache::getPacketData
void getPacketData(EthPacketPtr p)
Definition: i8254xGBe.cc:1658
IGbE::TxDescCache::hasOutstandingEvents
bool hasOutstandingEvents() override
Definition: i8254xGBe.cc:1994
IGbE::DescCache::igbe
IGbE * igbe
Definition: i8254xGBe.hh:198
iGbReg::Regs::rdba
RDBA rdba
Definition: i8254xGBe_defs.hh:548
IGbE::RxDescCache::bytesCopied
unsigned bytesCopied
Bytes of packet that have been copied, so we know when to set EOP.
Definition: i8254xGBe.hh:323
IGbE::radvProcess
void radvProcess()
Definition: i8254xGBe.hh:104
IGbE::cpuPostInt
void cpuPostInt()
Definition: i8254xGBe.cc:732
cp
Definition: cprintf.cc:37
IGbE::intClock
Tick intClock()
Definition: i8254xGBe.hh:166
IGbE::rdtrProcess
void rdtrProcess()
Definition: i8254xGBe.hh:94
IGbE::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:2361
Stats::enabled
bool enabled()
Definition: statistics.cc:275
IGbE::TxDescCache::pktComplete
void pktComplete()
Called by event when dma to write packet is completed.
Definition: i8254xGBe.cc:1706
ArmISA::a
Bitfield< 8 > a
Definition: miscregs_types.hh:62
IGbE::DescCache::annUsedDescQ
std::string annUsedDescQ
Definition: i8254xGBe.hh:231
IGbE::RxDescCache::pktSplitDone
void pktSplitDone()
Definition: i8254xGBe.cc:1164
IGbE::TxDescCache::updateHead
void updateHead(long h) override
Definition: i8254xGBe.hh:370
IGbE::txStateMachine
void txStateMachine()
Definition: i8254xGBe.cc:2064
IGbE::tadvEvent
EventFunctionWrapper tadvEvent
Definition: i8254xGBe.hh:121
IGbE::writeConfig
Tick writeConfig(PacketPtr pkt) override
Write to the PCI config space data that is stored locally.
Definition: i8254xGBe.cc:148
IGbE::TxDescCache::useTso
bool useTso
Definition: i8254xGBe.hh:390
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:237
IGbE::flash
uint16_t flash[iGbReg::EEPROM_SIZE]
Definition: i8254xGBe.hh:68
iGbReg::Regs::rdh
RDH rdh
Definition: i8254xGBe_defs.hh:571
IGbE::txPacket
EthPacketPtr txPacket
Definition: i8254xGBe.hh:75
ArmISA::d
Bitfield< 9 > d
Definition: miscregs_types.hh:60
IGbE::DescCache::enableSm
virtual void enableSm()=0
IGbE::RxDescCache::descHead
long descHead() const override
Definition: i8254xGBe.hh:306
IGbE::DescCache::descBase
virtual Addr descBase() const =0
iGbReg::Regs::tdt
TDT tdt
Definition: i8254xGBe_defs.hh:640
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
IGbE::RxDescCache::pktHdrEvent
EventFunctionWrapper pktHdrEvent
Definition: i8254xGBe.hh:351
IGbE::DescCache::unusedCache
CacheType unusedCache
Definition: i8254xGBe.hh:192
IGbEInt::sendDone
virtual void sendDone()
Definition: i8254xGBe.hh:514
IGbE::DescCache::DescCache
DescCache(IGbE *i, const std::string n, int s)
Definition: i8254xGBe.cc:822
IGbE::rxTick
bool rxTick
Definition: i8254xGBe.hh:79
IGbE::PARAMS
PARAMS(IGbE)
IGbE::DescCache::wbComplete
void wbComplete()
Called by event when dma to writeback descriptors is completed.
Definition: i8254xGBe.cc:1015
IGbE::DescCache::writeback
void writeback(Addr aMask)
Definition: i8254xGBe.cc:854
IGbE::TxDescCache::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:1946
IGbE::DescCache::descTail
virtual long descTail() const =0
IGbE
Definition: i8254xGBe.hh:57
IGbE::DescCache::wbDelayEvent
EventFunctionWrapper wbDelayEvent
Definition: i8254xGBe.hh:246
IGbE::RxDescCache::updateHead
void updateHead(long h) override
Definition: i8254xGBe.hh:309
IGbE::TxDescCache::descInBlock
unsigned descInBlock(unsigned num_desc)
Return the number of dsecriptors in a cache block for threshold operations.
Definition: i8254xGBe.hh:419
IGbEInt::dev
IGbE * dev
Definition: i8254xGBe.hh:506
IGbE::TxDescCache::pktMultiDesc
bool pktMultiDesc
Definition: i8254xGBe.hh:383
IGbE::RxDescCache::descTail
long descTail() const override
Definition: i8254xGBe.hh:308
iGbReg::IT_RXT
@ IT_RXT
Definition: i8254xGBe_defs.hh:178
IGbE::RxDescCache::packetDone
bool packetDone()
Check if the dma on the packet has completed and RX state machine can continue.
Definition: i8254xGBe.cc:1458
IGbE::DescCache
Definition: i8254xGBe.hh:178
IGbE::DescCache::annUsedCacheQ
std::string annUsedCacheQ
Definition: i8254xGBe.hh:230
IGbE::etherInt
IGbEInt * etherInt
Definition: i8254xGBe.hh:60
IGbE::rxStateMachine
void rxStateMachine()
Definition: i8254xGBe.cc:2186
IGbE::macAddr
uint64_t macAddr
Definition: i8254xGBe.hh:137
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:148
IGbE::tidvProcess
void tidvProcess()
Definition: i8254xGBe.hh:124
IGbE::DescCache::fetchBuf
T * fetchBuf
Definition: i8254xGBe.hh:194
IGbE::TxDescCache::TxDescCache
TxDescCache(IGbE *i, std::string n, int s)
Definition: i8254xGBe.cc:1497
IGbE::RxDescCache::writePacket
int writePacket(EthPacketPtr packet, int pkt_offset)
Write the given packet into the buffer(s) pointed to by the descriptor and update the book keeping.
Definition: i8254xGBe.cc:1179
IGbE::interEvent
EventFunctionWrapper interEvent
Definition: i8254xGBe.hh:160
IGbE::TxDescCache::descEnd
uint32_t descEnd
Definition: i8254xGBe.hh:386
Drainable::drainState
DrainState drainState() const
Return the current drain state of an object.
Definition: drain.hh:320
IGbE::DescCache::cachePnt
int cachePnt
Definition: i8254xGBe.hh:204
IGbE::RxDescCache::pktEvent
EventFunctionWrapper pktEvent
Definition: i8254xGBe.hh:346
IGbE::TxDescCache::nullCallback
void nullCallback()
Definition: i8254xGBe.hh:462
iGbReg::Regs::tdba
TDBA tdba
Definition: i8254xGBe_defs.hh:614
IGbE::DescCache::descUsed
unsigned descUsed() const
Definition: i8254xGBe.hh:282
IGbE::TxDescCache::tsoPktHasHeader
bool tsoPktHasHeader
Definition: i8254xGBe.hh:398
IGbE::DescCache::_name
std::string _name
Definition: i8254xGBe.hh:201
EthPacketPtr
std::shared_ptr< EthPacketData > EthPacketPtr
Definition: etherpkt.hh:87
IGbE::pktOffset
unsigned pktOffset
Definition: i8254xGBe.hh:86
IGbE::rxFifo
PacketFifo rxFifo
Definition: i8254xGBe.hh:71
IGbE::tickEvent
EventFunctionWrapper tickEvent
Definition: i8254xGBe.hh:134
EtherInt::name
const std::string & name() const
Return port name (for DPRINTF).
Definition: etherint.hh:59
IGbE::TxDescCache::tsoMss
Addr tsoMss
Definition: i8254xGBe.hh:392
IGbE::RxDescCache::enableSm
void enableSm() override
Definition: i8254xGBe.cc:1449
IGbE::RxDescCache::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:1477
iGbReg::TxDesc
Definition: i8254xGBe_defs.hh:224
types.hh
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
IGbE::DescCache::annDescQ
std::string annDescQ
Definition: i8254xGBe.hh:231
IGbE::DescCache::usedCache
CacheType usedCache
Definition: i8254xGBe.hh:191
EtherDevice
Definition: etherdevice.hh:45
IGbE::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: i8254xGBe.cc:2035
IGbE::DescCache::writeback1
void writeback1()
Definition: i8254xGBe.cc:902
IGbE::eeAddr
uint8_t eeAddr
Definition: i8254xGBe.hh:67
IGbE::DescCache::annUnusedCacheQ
std::string annUnusedCacheQ
Definition: i8254xGBe.hh:231
IGbE::TxDescCache::tsoPrevSeq
Addr tsoPrevSeq
Definition: i8254xGBe.hh:395
IGbE::DescCache::~DescCache
virtual ~DescCache()
Definition: i8254xGBe.cc:835
IGbE::DescCache::areaChanged
void areaChanged()
If the address/len/head change when we've got descriptors that are dirty that is very bad.
Definition: i8254xGBe.cc:844
IGbE::chkInterrupt
void chkInterrupt()
Check and see if changes to the mask register have caused an interrupt to need to be sent or perhaps ...
Definition: i8254xGBe.cc:788
IGbE::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: i8254xGBe.cc:140
IGbE::rxWriteDelay
Tick rxWriteDelay
Definition: i8254xGBe.hh:91
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:258
std::deque< T * >
IGbE::DescCache::hasOutstandingEvents
virtual bool hasOutstandingEvents()
Definition: i8254xGBe.hh:295
IGbE::restartClock
void restartClock()
This function is used to restart the clock so it can handle things like draining and resume in one pl...
Definition: i8254xGBe.cc:2004
IGbE::eeOpBits
int eeOpBits
Definition: i8254xGBe.hh:66
IGbE::DescCache::fetchEvent
EventFunctionWrapper fetchEvent
Definition: i8254xGBe.hh:258
IGbE::DescCache::reset
void reset()
Definition: i8254xGBe.cc:1056
IGbE::wbDelay
Tick wbDelay
Definition: i8254xGBe.hh:89
IGbE::DescCache::updateHead
virtual void updateHead(long h)=0
IGbE::TxDescCache::getPacketSize
unsigned getPacketSize(EthPacketPtr p)
Tell the cache to DMA a packet from main memory into its buffer and return the size the of the packet...
Definition: i8254xGBe.cc:1618
IGbE::TxDescCache::headerComplete
void headerComplete()
Definition: i8254xGBe.cc:1593
IGbE::radvEvent
EventFunctionWrapper radvEvent
Definition: i8254xGBe.hh:111
pktfifo.hh
IGbE::TxDescCache::tsoDescBytesUsed
Addr tsoDescBytesUsed
Definition: i8254xGBe.hh:400
etherpkt.hh
IGbE::DescCache::curFetching
int curFetching
Definition: i8254xGBe.hh:210
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:64
etherdevice.hh
IGbE::TxDescCache::pktDone
bool pktDone
Definition: i8254xGBe.hh:380
IGbE::RxDescCache::descBase
Addr descBase() const override
Definition: i8254xGBe.hh:305
trace.hh
IGbE::eeOpcode
uint8_t eeOpcode
Definition: i8254xGBe.hh:67
IGbE::TxDescCache::pktEvent
EventFunctionWrapper pktEvent
Definition: i8254xGBe.hh:446
SimObject::params
const Params & params() const
Definition: sim_object.hh:168
IGbE::RxDescCache::splitCount
int splitCount
Variable to head with header/data completion events.
Definition: i8254xGBe.hh:319
IGbE::DescCache::annSmWb
std::string annSmWb
Definition: i8254xGBe.hh:230
IGbE::checkDrain
void checkDrain()
Check if all the draining things that need to occur have occured and handle the drain event if so.
Definition: i8254xGBe.cc:2048
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
ArmISA::s
Bitfield< 4 > s
Definition: miscregs_types.hh:556
inet.hh
IGbE::TxDescCache::tsoPktPayloadBytes
Addr tsoPktPayloadBytes
Definition: i8254xGBe.hh:396
CheckpointIn
Definition: serialize.hh:68
IGbE::TxDescCache::tsoHeader
uint8_t tsoHeader[256]
Definition: i8254xGBe.hh:399
IGbE::~IGbE
~IGbE()
Definition: i8254xGBe.cc:128
IGbE::RxDescCache::fetchAfterWb
void fetchAfterWb() override
Definition: i8254xGBe.hh:311
IGbE::delayIntEvent
void delayIntEvent()
Send an interrupt to the cpu.
Definition: i8254xGBe.cc:725
IGbE::TxDescCache::processContextDesc
void processContextDesc()
Definition: i8254xGBe.cc:1518
IGbE::DescCache::fetchAfterWb
virtual void fetchAfterWb()=0
IGbE::TxDescCache::descHead
long descHead() const override
Definition: i8254xGBe.hh:367
IGbE::TxDescCache::tsoUsedLen
Addr tsoUsedLen
Definition: i8254xGBe.hh:394
IGbE::tadvProcess
void tadvProcess()
Definition: i8254xGBe.hh:114
IGbE::RxDescCache::pktComplete
void pktComplete()
Called by event when dma to write packet is completed.
Definition: i8254xGBe.cc:1287
iGbReg::Regs::rdlen
RDLEN rdlen
Definition: i8254xGBe_defs.hh:554
IGbE::wbCompDelay
Tick wbCompDelay
Definition: i8254xGBe.hh:90
DmaDevice::Params
DmaDeviceParams Params
Definition: dma_device.hh:206
IGbE::DescCache::CacheType
std::deque< T * > CacheType
Definition: i8254xGBe.hh:190
PciDevice::pciToDma
Addr pciToDma(Addr pci_addr) const
Definition: device.hh:356
IGbE::rxDmaPacket
bool rxDmaPacket
Definition: i8254xGBe.hh:83
IGbE::TxDescCache::packetMultiDesc
bool packetMultiDesc()
Ask if this packet is composed of multiple descriptors so even if we've got data, we need to wait for...
Definition: i8254xGBe.hh:441
IGbE::txWire
void txWire()
Definition: i8254xGBe.cc:2289
i8254xGBe_defs.hh
iGbReg::Regs::tdh
TDH tdh
Definition: i8254xGBe_defs.hh:626
iGbReg::EEPROM_SIZE
const uint8_t EEPROM_SIZE
Definition: i8254xGBe_defs.hh:104
eventq.hh

Generated on Tue Jun 22 2021 15:28:28 for gem5 by doxygen 1.8.17