How to debug e1000 driver?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
szhou42
Member
Member
Posts: 67
Joined: Thu Apr 28, 2016 12:40 pm
Contact:

How to debug e1000 driver?

Post by szhou42 »

Hi
My e1000 driver is having troubles sending any packets, basically, the e1000 card never writes to my transmit descriptor's status field. I m wondering if there are any tools to help me debug this?

I''ve seen MIT's JOS lab mentioned a qemu flag that can do this, in this web page

Code: Select all

https://pdos.csail.mit.edu/6.828/2011/labs/lab6/#Exercise-8
but I don't find any useful commands in its makefile, or on google, that tell qemu to log e1000 error message.

:( :( :(

Thanks!
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How to debug e1000 driver?

Post by iansjack »

If you look at the "Transmitting Packets" section (and later sections) of your reference, examples are given of using these debug flags.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: How to debug e1000 driver?

Post by Kevin »

Note that E1000_DEBUG only works in the 6.828 version of QEMU.
They patched their qemu...

If you want to get debugging information from qemu (which can be a very useful approach if you're stuck and don't mind reading qemu code), you'll have to patch it as well. hw/net/e1000.c already has quite a few DBGOUT() calls which write to stderr if they are enabled in debugflags, and you can still add more of them if the information you're looking for is missing.
Developer of tyndur - community OS of Lowlevel (German)
szhou42
Member
Member
Posts: 67
Joined: Thu Apr 28, 2016 12:40 pm
Contact:

Re: How to debug e1000 driver?

Post by szhou42 »

Thanks! I never thought we could patch the qemu..
Post Reply