On Fri, 20 Dec 2002 10:38:45 -0600 (CST), Scott Garfinkle wrote:

>"who really cares" refers to whether there is a specific need for the functionality. 
>Since there does 
>appear to be one, that's fine. At this point, providing general-purpose support on 
>OS/2 is often not 
>too important! As for KEE, it was implemented mainly to support JFS and the 32 bit 
>tcpip stack, not 
>out of some sense that OS/2 just ought to be able to do 32 bit DevHelps. Once it was 
>implemented, 
>it certainly made sense to make it available to others; however, in most cases, there 
>really isn't 
>anything to be gained (and often much efficiency to be lost) in doing 32 bit OS/2 dd 
>code.

I know about the efficiency of thunking :-)
But like e.g. the Soundblaster Live! drivers. If they would use GCONFIG-API, one would 
have to support both, 
16bit and 32-bit, otherwise Sander could dump the 32-bit version or regenerate 
GCONFIG-APIs internally.
That's why I'm doing 32-bit. I won't implement them at first and the whole detection 
code is 16-bit mode. I'm 
just designing the detection area to allow access from 32-bit code later. Also device 
attach/detach are 
handled by 16-bit code. 32-bit only contains the API, which includes device search 
functions, specific 
functions like e.g. PCI-space access and hot-plug callback API.

It's meant so one can write such driver like SBLive, so that it's possible to write a 
16-bit and 32-bit version of it 
w/o modifying any code (at least for GCONFIG-calling).

Example of some GCONFIG-API code:

HWDEVICE  MyDevice;
USHORT MyIRQ;

if (MyDevice = PCI_FindDevice(0x1073, -1, PDD_FIND_STRAIGHT, 0)) {
   MyIRQ = PDD_GetDeviceIRQ(MyDevice,0);
   PrintF ("Yamaha found on %lx using %d!", &MyDevice, MyIRQ);
   PCI_WriteConfigDWord (MyDevice, 64, 0x1000);
 }

That's all the code needed to find the first PCI-device of vendor 0x1073 and getting 
the IRQ line that is 
currently assigned by the device, printing it out and set register 64 (dword) to 
0x1000. Print/PrintF are also part 
of GCONFIG-API. That's the needed of it. And this code will run on ACPI and normal PCI 
systems. And the 
PDD_x functions are generic (!) which means they will work on any device. PnP, PCI, 
whatever. And all take 
HWDeviceID as the device specifier. There are also APIs to reconfigure a device (those 
are nearly of the 
same simplicity).

cu, Kiewitz


-----------
To unsubscribe yourself from this list, send the following message
to [EMAIL PROTECTED]

     unsubscribe acpi-os2
     end

Reply via email to