June 15: - Completed: skge_devinit()

- Meeting with Marty: I spoke on the phone with Marty today for about 90 minutes. We discussed my progress and he reviewed my code up until now. Overall, it was a very constructive meeting.
- Key recomendations of that conversation were:
- ensure code formatting is consistant with the rest of the code base
- ensure assumptions are not made (such as mac address length)
- remove certain unnecessary functions that were implemented by linux, but unnecessary for gPXE

- shortly after the meeting, I committed and headed to bed.

June 16:
- Completed: skge_probe() !
- imported a few more constants that were defined in linux-2.6/drivers/net/skge.c that had to do with implementation of probe
- Screenshot (to be inserted) of gpxe recognizing my network card
- Reformatted some bits of code to comply with coding standards;
- %s/<8xspace>/<tab>/g
- Verified device recognition:

gPXE 0.9.7+ -- Open Source Boot Firmware -- http://etherboot.org

gPXE> ifstat
net0: 00:00:00:00:00:00 on <NULL> (closed)
  [Link:down, TX:0 TXE:0 RX:0 RXE:0]

June 17: GRRR. Power outage put me back about 20 minutes. Not horrible, but … grrr. Now, a BSOD, i could have dealt with. Infact, I'm almost comfortable with blue screens. However, the power here… very rarely goes off.

On a completely non-important note, tim hortans coffee and bagles are awsome. </advertisement>

- Inserted lines for doxygen compiling,
- built “make doc” several times
- changed “EXPORT_ALL” to yes in doxygen.cfg
- changed the directory in doxygen.cfg to generate to /var/www/pxe.asdlkf.net/doxy
- (output available at http://pxe.asdlkf.net/doxy/)

- rwcr reviewed (briefly) the code I have written, he seemed pleased; pointed out a few
variables that are set in other units that i can use instead of declairing them in skge.c

- spoke with rwcr about the datastructure and dma access of the rx and tx descriptors
- I believe I'm going to implement a circularly linked data structure resembling this:

struct tx_queue:

I should be able to implement that quite easily; Ill get started on open tomorrow when I get home.

June 18: 11:25 PM: It seems unlikely Ill get much done today. Due to a mishap at work (read: customers AD needs to be restored), I will only be able to work for about an hour today.

Lets see how far I can get by 12:30.

Retroactive June 18 post: I ended up copying some of the code from mdeck's driver across and got started on open, but then passed out at the keyboard. I woke up and decided I should go to bed.

June 19: 11:29 PM: AD restore went well, however, ate most of the day. I managed to get some of open written as stated, however, not as much as I would have liked.

Continuing on with open…

June 20: Today was a meeting with the mentors again. Prior to th emeeting, I imported some of mdeck's driver code to get going on open. This seemed to go fairly well. After about two hours. I had the functions mostly imported. However, the program was not compiling at that time.

During the meeting, Marty suggested I should be writing DBGP statements, instead of DBG2 or DBG and then showed me how to source out the compiler DEBUG settings to invoke those debug levels. He also noted that from his observation, almost all programmers end up writing blocks of code and then trying to debug them later, however, with out sufficient debug statements available to turn on, this can take a long time. So, he suggested that I insert many more DBG statements then I have been. I will work on inserting these over the next day or so and continue to add them as I write more code later.

I took from approx 12:00 to 2:30 off and then started generating the supporting functions for open(). This process was long and tedious, but I finished those around 8:00 pm. I believe open() is “Written” but something is buggy in it so i'll have to do some tracing on it.

I'm not sure if this is exepected behaviour for a NIC with probe() and open() only, but as soon as i type “ifopen net0”, the box crashes. I'll have to put some more debug info in there to see exactly where it's crashing.

June 21:

As a planning note, today (i'm writing this the morning of the 21'st), I would like to decipher what's causing the machine to reboot (or if this is expected behaviour) and work on doxygen documentation and sort some functions around (the file has become very… unorganized. I would like to resort the functions into a logical order.
<10 hours later>

Hmm. well, a productive day I suppose. Below this post, you can see the current debugging output. There are two direct issues that I'm having. I suspect they are related.

1: Note the references to <NULL> or phys <NULL>. I'm not sure why the lines aren't “sticking” but for one reason or another, the physical adapter reference doesn't appear to be being passed to the core.
2: In the output below, there are no references to any functions other than probe or remove. Interestingly, remove is called twice, once where I was expecting to see skge_open.

I spoke with rwcr again today, and he reminded me of stefanha's work last summer integrating gdb debugger stubs into gpxe. I will tomorrow work on getting GDB debugging working for me. Tonight I format-reinstalled a windows-7 laptop to ubuntu 9.10 (KarmicKoala) with GDB. I'm going to try tomorrow to get my USB to serial adapter working on it and hopefully get a “stable” serial console going. My main windows 7 machine keeps BSD'ing.

- Just pushed to my repo…

- Compiled mdeck's driver code base into doxygen… http://pxe.asdlkf.net/mdeck/ .

- That's likely it for this weeks journal entries. After this i'll be starting the week 5 notes.

Removed PCI device 00:08.0
Adding PCI device 00:00.0 (1039:0661 mem e8000000 io 0 irq 0)
...no driver found
Adding PCI device 00:01.0 (1039:0003 mem 20010100 io 0 irq 0)
...no driver found
Adding PCI device 00:02.0 (1039:0964 mem 0 io 0 irq 0)
...no driver found
Adding PCI device 00:02.5 (1039:5513 mem 0 io 1f0 irq 0)
...no driver found
Adding PCI device 00:02.7 (1039:7012 mem 0 io e000 irq 5)
...no driver found
Adding PCI device 00:03.0 (1039:7001 mem ec127000 io 0 irq 5)
...no driver found
Adding PCI device 00:03.1 (1039:7001 mem ec129000 io 0 irq 10)
...no driver found
Adding PCI device 00:03.2 (1039:7001 mem ec124000 io 0 irq 11)
...no driver found
Adding PCI device 00:03.3 (1039:7002 mem ec125000 io 0 irq 9)
...no driver found
Adding PCI device 00:04.0 (1039:0900 mem ec126000 io e400 irq 11)
...no driver found
Adding PCI device 00:08.0 (1186:4b01 mem ec120000 io e800 irq 10)
...using driver DGE530T
skge_probe - start
registers mapped
skge_initialize - end
skge_enable_test_mode - 1
     initialize -> removing error bits
skge_enable_test_mode - 0
     initialize -> chip id: MARV: 0xb1
     initialize -> ram_size  : 65536
     initialize -> ram_offset: 0
     initialize -> wasn't genesis
     initialize -> Clearing error bits
skge_enable_test_mode - 1
skge_enable_test_mode - 0
     initialize -> Performing reset
     initialize -> Stopping card
     initialize -> Turning LED on
     initialize -> Enabling arbiter
     initialize -> Setting timeout init values
     initialize -> Setting clock values
     initialize -> Resetting each port
yukon_reset start
gm_phy_write - start
gm_phy_write - end - return 0
yukon_reset end
skge initialize - end
     skge_probe - middle: addr 0xde258950 irq 10 chip 0xb1 rev 9
     ll_addr[i]: 00:21:91:91:10:6d
NETDEV 0x178f4 registered as net0 (phys <NULL> hwaddr 00:21:91:91:10:6d)
skge_probe - end - return 0
Adding PCI device 00:09.0 (0e11:ae32 mem ec128000 io ed00 irq 5)
...no driver found
Adding PCI device 01:00.0 (1039:6330 mem e0000000 io d000 irq 3)
...no driver found

gPXE 0.9.7+ -- Open Source Boot Firmware -- http://etherboot.org

NETDEV 0x178f4 opening
Could not open net0: Error 0x000140d4
No more network devices

– Chris

QR Code
QR Code soc:2009:asdlkf:journal:week4 (generated for current page)