views:

99

answers:

2

Hi,

I would like to write an IO intensive application with no underlying OS, running on x86 architecture and driving any modern network interface controller.

By having a look to Linux's drivers source code, I know that thousands lines of codes are required to drive, as an example, an Intel e1000e Gigabit controller. I think that such code is quite hard to extract from Linux source code.

Do you know any solution/project providing a way to drive a today's computer (including its NIC), probably by wrapping Linux drivers?

Thanks a lot

+4  A: 

You would have to write a driver, and an OS (of sorts) to manage all this. Scheduling, memory management, out of band IO, an IP stack (if you choose to go that route). Why reinvent the wheel? Get a real-time Linux distro, or grab vxworks or QNX - something purpose-built for IO intensive requirements.

Chris Kaminski
Actually, he'd have to write many drivers. I can understand wanting to run something on bare x86, but wanting to do that and using a variety of NICs is, well, odd.
David Thornley
+1  A: 

UNDI is a universal programming interface for network devices, and should work on all network cards that support PXE (which is basically all of them, these days).

UNDI is designed to run in real (16-bit unprotected) mode, which makes it easy to use without an OS. (Much easier without an OS or with a dumb OS like DOS than within a modern OS, which run in 32- or 64-bit protected mode.)

ephemient
But it's going to be slow.
bdonlan
Yep, performance using the UNDI API can not possibly come anywhere close to the performance of a proper driver for the hardware. It's only useful if you're working in a limited environment where you don't care so much about performance as you do not having many NIC-specific drivers.
ephemient
Part of the benefit of having a driver is being able to take advantage of DMA and all that fun stuff to improve performance. He can definitely do it, especially using the GPLed drivers as a baseline, but it's going to be tougher and a lot less stable, and probably cost more in the end than a license of QNX.
Chris Kaminski