The first thing to do is to edit h5/board.h (board/board.h) and uncomment
WANT_NET. Then make clean ; make and reboot.
We get this:
BSD panic: tcp_initThis comes from tcp_init() in tcp_bsd/tcp_subr.c It has nothing to do with the emac driver. A sanity check is testing the size of the tcpiphdr structure. We will need to look at this someday. It has to do with either types or alignment on arm64.
I do this and now I can compile and boot up Kyu without error!
I get a variety of messages from the EMAC driver as it initializes.
n 1 - gives me basic statistics n 11 - gives me the "debug" with full display of the rings.
An easy and foolproof way to find out what was negotiated is to look at the LED on my network switch! I look and see that 1000 Mbit has been arranged, and this surely is not what has been set for the emac chip.
When Kyu starts up, it prints:
emac CTL0 = 00000001This register has only 4 defined bits.
bit 0 -- 1 is full duplex bit 1 -- 0 is loopback off bits 3:2 -- 00 is 1000 MbitSo this looks correct. I never set values in this register myself. I am not getting data. But I see this message once:
emac interrupt -- status:40000127This must happen right after I write to the emac int_ena register to enable interrupts. Experiment shows that it happens before I enable the Rx or Tx units. After I add some delay, I see a second interrupt after I enable Rx and TX:
emac interrupt -- status:4000002bThe upper "4" is undefined. In the first interrupt, 0x100 is a Rx interrupt. The lower 8 bits are all related to Tx.
Tom's electronics pages / tom@mmto.org