Linked by Eli Gottlieb on Thu 30th Nov 2006 17:42 UTC
OSNews, Generic OSes On December 28th, 2005 - a day which will live in anonymity - OSNews published an editorial of mine urging hobby and research operating system developers to implement Project UDI, because otherwise we (the small/ non-mainstream/ hobby/research OS community) would always wind up stuck with mutually incompatible sets of drivers for doing the same exact things. I also proclaimed that I would implement UDI for my own operating system kernel. Bad decision.
Thread beginning with comment 187032
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: why not...
by Vanders on Fri 1st Dec 2006 08:00 UTC in reply to "RE[2]: why not..."
Vanders
Member since:
2005-07-06

As we're discussing driver development, I'm talking about the API between the driver and the kernel. Yes, Linux does have one. It may technically comprise every single function and table in the entire kernel, but it is still an API.

The thing is, you don't need to emulate every single Linux kernel function. You just need to support some areas of functionality in a way that is close enough to the way Linux does them that you can port a driver from Linux with a few small changes. This is exactly how Syllable does it; there is a well defined driver API, but where functionality intercepts with Linux the implementations are similiar.

For example our atomic functions are almost identical, because there's only so many ways to implement an atomic increment operation on IA32, so why not just do it the same way? Memory management, mutexes: all of the low level functionality, is similiar enough to Linux that it's easy to port a driver. This sort of stuff doesn't change often within Linux.

The few places where implementing Linux functionality would be cumbersome are covered by a simple system header file "linux_compat.h" which wraps Syllable functionality to present a set of functions and macros that work well enough to be used with a lot of Linux drivers.

So yes, it can be done and we're doing it. Not only are we doing it, but it is in fact working out very well for us!

Reply Parent Score: 3

RE[4]: why not...
by EliGottlieb on Fri 1st Dec 2006 15:26 in reply to "RE[3]: why not..."
EliGottlieb Member since:
2005-10-30

>As we're discussing driver development, I'm talking about the API between the driver and the kernel. Yes, Linux does have one. It may technically comprise every single function and table in the entire kernel, but it is still an API.

Except that implementing Linux's driver API also requires that drivers code for a monolithic kernel. Oops, there go all those interesting microkernel projects where the drivers can't access symbols inside the kernel.

Linux's driver API also can't work on microkernels because you would have to code a runtime driver API layer that polled "kernel variables" in order to send messages to the real kernel. Probably technically possible, but very hard and not likely to happen.

EDI, in contrast, requires only functionality that a user-mode library could translate into messages or even implement itself.

Edited 2006-12-01 15:43

Reply Parent Score: 2

RE[5]: why not...
by Vanders on Sat 2nd Dec 2006 11:34 in reply to "RE[4]: why not..."
Vanders Member since:
2005-07-06

Except that implementing Linux's driver API also requires that drivers code for a monolithic kernel. Oops, there go all those interesting microkernel projects where the drivers can't access symbols inside the kernel.

I don't see how this is relevent. The situation is identical on Syllable: a driver can not access symbols inside the kernel unless they are made available via. the kernel API (O.K, sure, the driver shares the same memory space as the kernel so you could hack your way around it, but that's irelivent to this discussion)

Linux's driver API also can't work on microkernels..

Agreed. Getting it to work would be possible but you'd have to make a lot of compromises. Although doesn't HURD try to offer some sort of Linux-like driver API?

Reply Parent Score: 1