diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2008-12-05 13:58:22 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2008-12-05 13:58:22 -0500 |
commit | dd788a23c972ec45248ad42e58eaa5141160cff9 (patch) | |
tree | 9a17d5867e58ced509f435848c7f64d4230c0f97 /src/dev/i8254xGBe.hh | |
parent | 400e5162619f3a63c2ac3f7698af89a677829295 (diff) | |
download | gem5-dd788a23c972ec45248ad42e58eaa5141160cff9.tar.xz |
IGbE: Add support for newer 8257x based Intel NICs
Diffstat (limited to 'src/dev/i8254xGBe.hh')
-rw-r--r-- | src/dev/i8254xGBe.hh | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/dev/i8254xGBe.hh b/src/dev/i8254xGBe.hh index 473174bcb..5e5ab1d21 100644 --- a/src/dev/i8254xGBe.hh +++ b/src/dev/i8254xGBe.hh @@ -183,7 +183,7 @@ class IGbE : public EtherDevice virtual long descLen() const = 0; virtual void updateHead(long h) = 0; virtual void enableSm() = 0; - virtual void intAfterWb() const {} + virtual void actionAfterWb() {} virtual void fetchAfterWb() = 0; std::deque<T*> usedCache; @@ -440,7 +440,7 @@ class IGbE : public EtherDevice oldHead, curHead); // If we still have more to wb, call wb now - intAfterWb(); + actionAfterWb(); if (moreToWb) { moreToWb = false; DPRINTF(EthernetDesc, "Writeback has more todo\n"); @@ -625,16 +625,22 @@ class IGbE : public EtherDevice virtual long descLen() const { return igbe->regs.tdlen() >> 4; } virtual void updateHead(long h) { igbe->regs.tdh(h); } virtual void enableSm(); - virtual void intAfterWb() const { igbe->postInterrupt(iGbReg::IT_TXDW); } + virtual void actionAfterWb(); virtual void fetchAfterWb() { if (!igbe->txTick && igbe->getState() == SimObject::Running) fetchDescriptors(); } + + bool pktDone; bool isTcp; bool pktWaiting; bool pktMultiDesc; + Addr completionAddress; + bool completionEnabled; + uint32_t descEnd; + // tso variables bool useTso; @@ -662,6 +668,11 @@ class IGbE : public EtherDevice void getPacketData(EthPacketPtr p); void processContextDesc(); + /** Return the number of dsecriptors in a cache block for threshold + * operations. + */ + int descInBlock(int num_desc) { return num_desc / + igbe->cacheBlockSize() / sizeof(iGbReg::TxDesc); } /** Ask if the packet has been transfered so the state machine can give * it to the fifo. * @return packet available in descriptor cache @@ -689,8 +700,19 @@ class IGbE : public EtherDevice void headerComplete(); EventWrapper<TxDescCache, &TxDescCache::headerComplete> headerEvent; + + void completionWriteback(Addr a, bool enabled) { + DPRINTF(EthernetDesc, "Completion writeback Addr: %#x enabled: %d\n", + a, enabled); + completionAddress = a; + completionEnabled = enabled; + } + virtual bool hasOutstandingEvents(); + void nullCallback() { DPRINTF(EthernetDesc, "Completion writeback complete\n"); } + EventWrapper<TxDescCache, &TxDescCache::nullCallback> nullEvent; + virtual void serialize(std::ostream &os); virtual void unserialize(Checkpoint *cp, const std::string §ion); |