[coreboot] [RFC] network console for coreboot and ethernet support for SerialICE

Rudolf Marek r.marek at assembler.cz
Thu Nov 5 10:32:48 CET 2009


Hello all,

You may ask what is it all about? Well, for SerialICE we have no RAM, therefore 
sending through network adapter is not quite easy - you can't even place a 
descriptors for DMA in RAM ;) For coreboot we have CAR but same problem, DMA 
wants a working memory. Remember those old days with Novell Netware? Packwars? 
Netwars? This time is connected with a NE2000 cards. To reduce a cost it is 
nearly an reference design of the NS8390 chip. No external DMA, insane registers 
;) The Novell needed very cheap Ethernet adapters - because their business was 
to license of Nowell Netware per node. They simple needed to make the ethernet 
adapters affordable. As the consequence of this NE2000 chips survived even to 
PCI era. The Realtek made some chip called RTL8029AS. This chip is still quite 
wide spread. I bet you have some 10Mbit/s ethernet cards around (twisted pair) 
most likely with this chip...

End of story? No! The sweet features of this chip:

* insane registers
* no DMA, only PIO
* 8bit/16 IO bit access
* 10Mbit/Full duplex ;)
* Nice hardware bugs ;) ?
* 16KB SRAM for TX/RX buffers

Now you know ;) The idea is to create the packets in the card SRAM, construct 
some UDP packets with destination eth address as broadcasts. This will ensure we 
need no ARP. Packets can be also received, parsing of packets is like reading a 
very long FIFO byte to byte or word by word. Therefore I think one could have 
this card plugged to some PCI slot in the system and use it for quite fast IO.

The K8 HT chain most likely works to SB so the PCI adpaters are accessible early 
too. The only way which needs to be set is the IO resource and enable decoding 
of this resource in PCI_CMD. I think problems will only arise if the bus for PCI 
slot is not the primary. For the coreboot, I think we can use pci_find_device to 
"dynamically" read the current IO port from PCI BAR.

What do you think? I and agaran (aka Maciej) started to hack this together. We 
used GPXE as code base for this, now we are able to send/receive data in linux 
userspace application.

The usage idea is to have 8029 card as the "console" similar way as linux 
netconsole for coreboot. The SerialICE could be changed to use the network 
instead of slow serial.

Any clue what might cause that this does not work?

Rudolf







More information about the coreboot mailing list