public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Shieh <ashieh@cs.cornell.edu>
To: Donald Becker <becker@scyld.com>
Cc: Daniel Rodrick <daniel.rodrick@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Linux Newbie <linux-newbie@vger.kernel.org>,
	kernelnewbies <kernelnewbies@nl.linux.org>,
	linux-net@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Univeral Protocol Driver (using UNDI) in Linux
Date: Fri, 11 Aug 2006 16:48:23 -0400	[thread overview]
Message-ID: <44DCED17.1050202@cs.cornell.edu> (raw)
In-Reply-To: <Pine.LNX.4.44.0608101156490.20933-100000@bluewest.scyld.com>

Donald Becker wrote:
> On Tue, 8 Aug 2006, Alan Shieh wrote:
> 
> 
>>With help from the Etherboot Project, I've recently implemented such a 
>>driver for Etherboot 5.4. It currently supports PIO NICs (e.g. cards 
>>that use in*/out* to interface with CPU). It's currently available in a 
>>branch, and will be merged into the trunk by the Etherboot project. It 
>>works reliably with QEMU + PXELINUX, with the virtual ne2k-pci NIC.
>>
>>Barring unforseen issues, I should get MMIO to work soon; target 
>>platform would be pcnet32 or e1000 on VMware, booted with PXELINUX.
> 
> 
> Addressing a very narrow terminology issue:

<snip>

Thanks for the terminology clarification. I'll try to clarify the 
hardware scenarios.

Currently, cards that use the I/O port space ought to work, so long as 
their Etherboot drivers are well-behaved. Those that use PIO (like the 
QEMU's NE2K-PCI, which looks like NE2K bolted onto a PCI/ISA bridge) 
ought to work 100%. Those that use I/O ports to set up DMA transfers may 
or may not work depending on whether they try to DMA directly into 
pointers specified by UNDI calls.

I am in the process of implementing a way to pass the virtual address of 
each memory mapped I/O region described in the PCI BARs; once this 
works, the same caveats as for I/O port controlled

> So what does all of this have to with UNDI (and, not coincidentally,
> virtualization)?  There are a bunch of problems with using UNDI drivers,
> but we only need one unsolvable one to make it a doomed effort.  It's a
> big challenge to limit, control and remap how the UNDI driver code talks
> to the hardware.  That seems to be focus above -- just dealing with how to
> control access to the device registers.  But even if we do that correctly
> , the driver is still setting up the NIC to be a bus master.  The device
> hardware will be reading and writing directly to memory, and the driver
> has to make a bunch of assumptions when calculating those addresses.

This is true. I had to verify that the Etherboot UNDI code performs 
copies to/from its memory (which it knows the precise location of), 
rather than DMAing to pointers.

I think the virtualization approach is workable for stacks that hide 
themselves properly in E820 maps (not specified in the PXE spec), but 
somewhat complicated. It would have to either use a IOMMU (afaik not 
present on Pacifica, VT, or LT), or enforce a 1:1 correspondence between 
the emulated physical pages and actual physical pages that are provided 
to the stack.

The advantage of this over downloading an Etherboot stack is that it 
slightly simplifies deployment -- there is no need to install a 
Etherboot option ROM or boot image on each node. I believe the code 
complexity, development, and testing costs are higher than they are for 
our current approach, where we get to control and fix the firmware.

> People are hoping to magically get driver support for all hardware 
> without writing drivers.  If it were as easy as writing a Linux-to-UNDI 
> shim, that shim would have been written long ago.  UNDI doesn't come 
> close to being an OS-independent driver interface, even if you are willing 
> to accept the big performance hit.

I agree. The PXE specification is woefully underspecified and clunky for 
protected mode operation. Performance is on the order of broadband speed 
-- I'm getting 200-250KB/s using polling (as opposed to interrupt-driven 
I/O), with QEMU running on a 2GHz Athlon.

We still need drivers in the Etherboot-based strategy -- they live in 
the Etherboot layer. Etherboot drivers would be checked for conformance 
with protected mode operation.

Alan

  parent reply	other threads:[~2006-08-11 20:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07 10:39 Univeral Protocol Driver (using UNDI) in Linux Daniel Rodrick
2006-08-07 15:09 ` H. Peter Anvin
2006-08-07 16:11   ` Daniel Rodrick
2006-08-07 16:49     ` H. Peter Anvin
2006-08-08  5:13       ` Daniel Rodrick
2006-08-08 15:04         ` Alan Shieh
2006-08-10  8:18           ` Daniel Rodrick
2006-08-11 20:01             ` Alan Shieh
2006-08-10 20:59           ` Donald Becker
2006-08-10 21:08             ` H. Peter Anvin
2006-08-11 20:48             ` Alan Shieh [this message]
2006-08-08 16:35         ` H. Peter Anvin
2006-08-07 18:00     ` Jan Engelhardt
2006-08-07 18:15       ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2006-09-28  9:59 Deepak Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44DCED17.1050202@cs.cornell.edu \
    --to=ashieh@cs.cornell.edu \
    --cc=becker@scyld.com \
    --cc=daniel.rodrick@gmail.com \
    --cc=hpa@zytor.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox