• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

A 32 bits device driver model for OS/2

Started by lpino, 2009.10.29, 16:39:29

Previous topic - Next topic

lpino

For anyone interested in device driver development here is a very interesting paper writen by Steve Mastianni. In this paper he proposes a 32 DD model for OS/2.

The link is: http://mastrianni.net/pubs/paper.pdf

Leonardo Pino

Radek

A nice paper but it only proposes a possible 32-bit DD architecture. It does not state that anything of the proposed architecture is or has been installed. I would like to know how much of 32-bit PDD is now supported by OS/2 ...  :-\

RobertM

Check out this link:
http://www.os2site.com/sw/drivers/misc/index.html

Look at the first real entry. Also, if my understanding is correct, there are methods to do this already (such as those used in GRADD, various sound, NIC and SCSI drivers). Cannot seem to find documentation currently though.

Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


RobertM

#3
Ugh... brain fart. Duh! Look up the KEE32 Device Driver model for OS/2. It was used for various things (like those I mentioned), including various Intel cards (for support for IBM servers - though the cards are easily obtainable or already included in a bunch of other products) and if memory serves, for the SBLive package.

That means, at the least, Sander Van Leeuwen and Veit Kannegieser would have an idea of how it's done... I believe Veit even has or had info on the API used.

Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


RobertM



|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


rudi

Quote from: Radek on 2009.10.29, 23:24:59
A nice paper but it only proposes a possible 32-bit DD architecture.

Exactly. And since IBM didn't implement that stuff, it's pretty much useless.

Quote from: Radek on 2009.10.29, 23:24:59
I would like to know how much of 32-bit PDD is now supported by OS/2 ...

Not much. Instead of restructuring the whole DD interface, IBM implemented a
hack (KEE) which just meets the requirements necessary to port JFS. KEE lacks
a lot of functionality needed for general PDDs (like interrupt handling and resource
managment). Thus all existing 32bit device drivers (even if they use KEE) contain
their own thunking code that converts the 16bit calls coming in from the kernel to
32bit and the 32bit "API" callouts done be the driver back to 16bits understandable
by the kernel. Normally this is not very efficient (even with the use of some dirty
tricks to speed things up). Thus IBM added another hack for 32bit file systems,
which introduced 32bit versions for the 3 or 4 most often used IFS functions so
that 32bit applications partially avoid  the 32bit (app) -> 16-bit (kernel IFS API) ->
32bit (IFS) ping-pong.

After all I'd say that a real change of the DD model (including proper SMP support
instead of limiting interrupt handling to the first CPU while spinlooping all others) is
something, IBM should have done many years ago. Now it's too late. Game over.

BTW, not sure if that is due the age of the document, but drivers are not "loaded
in low memory, below the 640KB boundary". AFAIK, the limit is 16MB (without
EARLYMEMINIT in CONFIG.SYS) and much higher when EARLYMEMINIT is
specified.

rudi

Quote from: RobertM on 2009.10.30, 06:41:00
Also, if my understanding is correct, there are methods to do this already

Yep. For along time...

Quote from: RobertM on 2009.10.30, 06:44:24
That means, at the least, Sander Van Leeuwen and Veit Kannegieser would have an idea of how it's done...

The question is not if 32bit drivers can be done or not. All existing 32bit drivers (which btw.
must contain a 16bit part in order to be loaded at all) have to do all kinds of programming
tricks to be able work with the existing kernel. This is inefficient and error prone. It's the
f****ing job of the kernel to provide a proper infrastructure for device drivers. Not the job of
device drivers to work around deficiencies of the kernel API ! And nealy all 32bit OS/2 drivers
have to do the latter.


lpino

Quote from: rudi on 2009.10.30, 07:29:08
Quote from: RobertM on 2009.10.30, 06:41:00
Also, if my understanding is correct, there are methods to do this already

Yep. For along time...

Quote from: RobertM on 2009.10.30, 06:44:24
That means, at the least, Sander Van Leeuwen and Veit Kannegieser would have an idea of how it's done...

The question is not if 32bit drivers can be done or not. All existing 32bit drivers (which btw.
must contain a 16bit part in order to be loaded at all) have to do all kinds of programming
tricks to be able work with the existing kernel. This is inefficient and error prone. It's the
f****ing job of the kernel to provide a proper infrastructure for device drivers. Not the job of
device drivers to work around deficiencies of the kernel API ! And nealy all 32bit OS/2 drivers
have to do the latter.

The discussion of replacing the driver model to a 32 bit version is as old as OS/2 2.0. The author of the paper pushed for a new model within IBM back in 91, 92 ....etc. The focus then was first support for DOS and Win 3.1 and latter in Warp PPC edition (he wrote a very informative internal letter that was very critical about the management of OS/2).

The KEE APIs were indeed a hack to support JFS. It's very interesting to note the date of this paper, 1997. Probably at that time IBM was evaluating the possibility to move DDTK to 32 bits. You can see efforts to create the so called ADD32 (network, LAN drivers 32 bit framework, probably part of PPC edition).

All those efforts didn't see the light, but today there are efforts to extend the OS/2 kernel. First the OSFree port and the OS/4 project (probably using the original kernel as base). This kind of paper are in my view a good thing to see possible implementations. The purpose is not to cry over what was not done but to look forward.

Thanks

RobertM

*IF* I recall correctly, they were also considering porting the MACH PPC kernel to Intel - something that of course never happened. I believe there were other revamps in mind as well that were related to that effort, that of course also didnt make it very far (or anywhere). Thus, the KEE hack.


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


Radek

Thanks you all for info, especially to Rudi for making the things clear. As I feared, my (not very consistent) knowledge about 32-bit PDDs wasn't too far from reality: some support for IFS and GRADD, incomplete and specialized to particular kinds of drivers. The rest of 32-bit PDDs runs "do it yourself" thunking from 16-bit to 32-bit and back. Oh, well ...