This is file: 07_94QA.TXT

This file contains questions asked of the Driver Development Support Center
(DDSC) and the answers given to that particular question.  Entries are
appended to the top, so the most recent entry is available first.

Each entry starts with a header line that has a KEY WORD (or words) included
to allow the reader to "search" on KEY WORDS of particular interest.  Each KEY
WORD starts with the exclamation point character (!).  This allows for search
arguments that will limit matches to the header lines.

The following KEY WORDS are supported in this file.

KEYWORD                      DEVICES/TYPES OF QUESTIONS
===========   ==========================================================
!BASE         Loader, Memory Management, Strategy/Architecture
!I/O          Serial/Parallel, Pointing Device, Trackball, Keyboard, Pen
!MULTIMEDIA   Motion, Sound
!NETWORK      LAN,
!OTHER        PCMCIA, APM, Miscellaneous
!PRINT        Printer, Scanner
!STORAGE      DASD, SCSI, Tape, CD-ROM, ASPI, IFS
!VIDEO        VGA, SVGA, XGA, 8514, Display
**********    Entry separator (10 *'s)
==============================================================================

!OTHER__________________________________**********
July 29, 1994
QUESTION: (Ref: D85)
I need to know how to build a device driver.  I have coded the driver using
MASM 6.11 on a PC-DOS machine and have object code.  I tried using a link
command on my OS/2 machine using a link command derived from sample code etc.
I got with "Writing OS/2 2.1 Device Drivers in C" by Steven J. Mastranni.
When I did this I got an error code of SYS3175 which I haven't the slightest
idea what it means.


ANSWER:
OS/2 device driver developers cannot use MASM 6.11.  Actually, the linker
should display some kind of error message, but you do not seem to be using the
one from DDK.  For your information, it is known that Microsoft MASM 5.10A and
MASM 6.00A can be used on OS/2 development.  6.00B can be used, but you will
need to reconcile any errors that show up during the assembly.  Later versions
of MS MASM cannot be used.  DDK includes MASM 5.10A, but 6.00A is not
included, and 6.00A is not on the market anymore.




!OTHER !STORAGE_________________________**********
July 29, 1994
QUESTION: (Ref: D72)
Some of our OS/2 customers had the diskette version of OS/2 2.10.  After
installing OS/2, they wanted to add our CD-ROM drive to the system.  But we
only provide the drive and .ADD driver.

In order to make the CD-ROM drive work, the two files, CDFS.IFS and
OS2CDROM.DMD, are required.  However, these two files are not in the diskette
version of OS/2 2.10.


ANSWER:
CDFS.IFS and OS2CDROM.DMD are located on disk 12 of the 2.1 disks.  They are
bundled in a file called CDROMREQ.  If you need the two files, just do a
selective install for "OTHER" under CDROM's.  This will automatically unpack
the two files and place the statements in the CONFIG.SYS.  By the looks of
things, you will have to manually add your .ADD driver to the system and to
the CONFIG.SYS.  There is a device driver install program that comes with
OS/2.




!VIDEO__________________________________**********
July 29, 1994
QUESTION: (Ref: D00)
My seamless driver is functional, but when I select menu items, occasionally
the app output hangs until I resize the window.  It appears that my new
seamless driver is not getting or interpreting REPAINT messages.  Can you
suggest a debug procedure to get rid of this problem?


ANSWER:
Make sure that in Check_hw_access whenever the require hw state involves write
access, be it write_only or readwrite, be sure to send the bounding rectangle
of the area supposed to be drawn back to WinShield via winshield_callback if
hw is not in the required state.

WinShield will cause a repaint of the area,like clearing the pull down menu
away, he accumulated from SEAMLESS_CLIPRECT call of WinShield_callback when
the hw state is back to enable.




!STORAGE________________________________**********
July 29, 1994
QUESTION: (Ref: C84)
We would like to know why a SCSI adapter that uses hardware interrupts cannot
be used to boot-up an IBM Valuepoint computer.  We make SCSI adapters and this
problem has been brought to our attention.  The same problem appears with
other makers products.

Is there a fix or BIOS modification that addresses this issue?


ANSWER:
The problem that you presented to us is not a driver development problem, so
this is not something that we would normally address.  This is a hardware
question and needs to be addressed by the IBM Hardware support organization.

However, we have tried to find out something about this to help you:

  o We are aware of adapters from Future Domain, Bus Logic, and Adaptec
    which are interrupt driven and which all work with the ValuePoints.

  o We ship Adaptec 1540 and 1542 adapters with the ValuePoint system.  We
    suggest that you try to get your hands on one of these adapters to insure
    that they work on your systems before you try your own adapter.

  o You can check to see if your problem is an Interupt conflict, or a memory
    mapping conflict problem.

  o If this does not help you solve your problem, please contact the IBM
    Hardware Support line at 800-426-7378 directly.




!STORAGE________________________________**********
July 29, 1994
QUESTION: (Ref: C65)
We are developing a filter device driver for disk encryption.  I would like to
know if it is possible, when receiving WRITE requests, to encrypt the data in
the caller's buffer and leave it encrypted after the request is completed.
This would save us the task of copying the data to a private buffer.  We are
developing an encryption filter device driver for every disk and tape units.
I have several questions:

1. Which error shall I return if I want to deny access to a specific unit?

2. Can I rely on the fact that only IOCC_EXECUTEIO requests will be chained?

3. Is the UnitHandle the same for every IORB in the request chain?


ANSWER:
1. The filter will select the .ADD driver it wants and send the
        encrypted message to it. Every thing is the same the filter
        just encrypts the message standard messaging and error
        is the same. The filter has nothing to do with changing the
        IORB for the most part. The filter can change this but the
        filter most will not it will just pass the IORB on to the ADD driver.

                        OS/2 2.1 tech manual SDDR

2. No, the filter can use the IORB or change it
                        Tech manual SDDR

3.No, the Unit handle is unique for each ADD drive
        Page 18 OS/2 2.1 tech manual SDDR

All the filter does is kind of encrypt the code to a difference format and
send it to the .add and convert it back to the correct format and give it to
the DMD.  Kind of like a translator.
                        page 4 Storage Device Driver Ref. (SDDR)

Please look at the Filters in the DDK toolkit  ddk\src\dev\dasd\cdrom\filter




!OTHER__________________________________**********
July 29, 1994
QUESTION: (Ref: C62)
We have purchased from IBM the OS/2 DDK and SDK cd-rom.

Some example program are included but we want to know if the microsoft CL
compiler is required.


ANSWER:
Since you stated that you already have the DDK, I will point you to the
information you need.

One of the FIRST things that you should do is look at the file README.DDK
located in the root directory of the DDK. It contains some information
regarding the Microsoft C Opptimizer Compiler (CL) and the Microsoft 386 C
Compiler (CL386). The latter is shipped with the DDK. I am not sure which one
you are referring to, since you used the term "CL" and both of these products
also use "CL".

The next thing you should do is gain access to the on-line documentation
provided on the DDK. It can all be installed on your system, or reside on the
CDROM and still allow you access to it. Instructions are also located in
README.DDK.

When you gain documentation access, the FIRST thing you need to do is read
"Using Your DDK". Look into the section "Components and Build Requirements".
This explains the assemblers and compilers required to build the drivers that
are on the DDK.




!BASE !OTHER____________________________**********
July 29, 1994
QUESTION: (Ref: B31)
Q1. I am currently experiencing inexplicable data or code corruption (?)  in
    my driver.  I wonder if this could be due to excess stack usage since my
    PDD is written in C with several nested calls.

A1. The recommended limit for nested interrupt stacks is 2 deep.
==============================================================================

Q2. What is the system stack space availbale to a PDD?

A2. The maximum total interrupt stack space is 8K bytes.

    In debug version OS2KRNL the total system interrupt stack space is 10K.
    In retail system has 8K, as stated above.  This might explain why you
    don't experience the problem when using the debug version.
==============================================================================

Q3. Is it possible to detect/change this size when a request comes in, or
    detect an overflow?

A3. The PDD can request interrupt stack space at INIT time by calling
    DevHlp_RegisterStackUsage.  And also in RegisterStackUsage, there is a
    parameter of the maximum number of levels that the device driver expects
    to nest.  When the unbounded nesting of interrupt occurs, the system will
    shut dowm this driver's interrupt level to prevent a system halt.  But the
    device driver can keep the two levels of interrupt nesting if the customer
    develops the interrupt routine in the correct way by itself.  Actually
    this is the tecnique which most of the drivers are doing.  "Limiting the
    Number of Nested Interrupt" section in PDD Design Issues in PDD has the
    details of how to implement this.
==============================================================================

Q4. Currently I have got the following system error.  Although there is no
    devhlp call mistake on my side, but this could give a clue perhaps:

    1100:0e05 - 0002:0e05
    line 60000, f2008 @ (#) dhrouter.asm
    DevHlp Usage Error       6.11 91/11/16
    048600b4 - 04/18 14:24. 14.00
    Internal Revision 6.514, 93/04/12
    eax=ffe307c0 ebx=fff00058, ecx = 0000ffff, ed= 00000006, esi = fff10034
    edi = fe91ffff, eip = 0000e05, esp = 00000f64 ebp=000003e0
    iopl=2
    cs=1100 ss=00e8 ds=400 es=07b0 fs=0 gs=0 cr2=00015000 cr3=001d2000

    The system crashed, saying -contact your service representative.

A4. According to the register information that you attached, you are calling
    DevHlp_SemRequest from your driver.  DevHlp_SemRequest is availble at only
    task time, not init time or interrupt time.  It looks like this API was
    called at init time.




!I/O____________________________________**********
July 29, 1994
QUESTION: (Ref: B16)
I'm working on a project that utilizes a dual monitor system through a special
video card.  The video card spreads a large desktop over two monitors.  What
I'd like to do is have a single full size window on each monitor and a
seperate pointing device (mouse) for each monitor.

Is it possible to run two pointing devices on a single system ?

Would this require a special device driver ?


ANSWER:
I have never thought of putting two pointing devices up at once.  I am sure
that there would be some conflicts that would arise.  If a separate driver was
to take these conflicts into consideration there might be a way of
accomplishing it.  You would definitely have to give one priority over the
other.  It might be easier to just write a new driver that can handle the two
inputs.

(Why would you want two pointing devices?  Why not have one that just jumps
from screen to screen.  This would be much easier to implement.)




!OTHER__________________________________**********
QUESTION: (Ref: D91)
I am trying to install DDK version 1.2 CD on top of OS/2 2.1.  Installation is
dying with error message EPFIE142.  Failure is the same regardless of what
component of DDK that I try to install.  Need your HELP FAST !!


ANSWER:
There is a possibility that you may experience a EPFIE142 error while trying
to reinstall DDK 1.2 to your fixed disk.  The workaround is to remove the
"Read-Only" attribute of the file "DDK.PKG" on your fixed disk.  To do this,
use the following procedure:

1. In an OS/2 session, switch to the DDK directory on your fixed disk.
2. Issue the command "ATTRIB -r DDK.PKG".

This procedure will need to be repeated each time you attempt to reinstall DDK
1.2.  This problem will be fixed in the next version of the DDK.




!VIDEO__________________________________**********
July 26, 1994
QUESTION: (Ref: D64)
We are a software development company.  Our programmers are currently working
on some Windows device drivers for a program and we need information on the
XGA chipset to write these drivers so that they can support the PS/2 Micro
Channel Video Adapter.  If this information is available on the DUDE, I could
use some help finding it.  Thanks.


ANSWER:
Your question is more of a hardware question rather that that of a device
driver development technical question.  However, I may be able to provide you
with some direction.

I have been able to locate a few documents that may be of some assistance to
you (you were not specific as to the information you are looking for).  The
following books can be ordered through IBM by calling 1-800-426-7282:

1. XGA Display Adapter Interface Technical Reference
   P/N S15F-2154    $13.25

2. XGA Display Adapter/A Technical Reference
   P/N S15F-2219    $25.25

3. PS/2 Hardware Interface Technical Reference - Video Subsystems
   P/N S42G-2193    $64.50

I am sorry, but this is as much as I can do regarding hardware.  For
additional hardware information, please contact the hardware support line at
1-800-426-7378, or post your hardware questions on one of the many public
forums.




! I/O___________________________________**********
July 26, 1994
QUESTION: (Ref: D48)
I'm trying to program a client-server application that uses a LapLink cable to
connect 2 pc's.  Are there any device drivers available that would let me
DosOpen and DosClose across a laplink cable?


ANSWER:
The OS/2 parallel port device driver does not provide the capability to send
and receive data files across the parallel port through a laplink cable.  The
parallel port device driver can only be used to transmit data out the parallel
port using DosOpen, DosWrite, DosClose.  In other words, DosRead is not
currently supported and will always return zero bytes read.

We are working on support for the IEEE 1284 specification which includes
nibble and byte reverse channel transfers from printers.  There are no plans
to enhance this to support transfers of data files through laplink- like
cables.

There are a number of file transfer programs on the market which work under
OS/2.  Laplink and Brooklyn Bridge are a couple of DOS-based applications that
have been tested and work properly.  I am unaware of any native OS/2 file
transfer programs.  OS/2 does not provide a device driver to do file transfer
through the parallel port.




!OTHER__________________________________**********
July 26, 1994
QUESTION: (Ref: D29)
I need the latest manual of Kernel Debugger of OS/2. Where I can  get it?


ANSWER:
The latest manual for the Kernel Debugger of OS/2 is included with DDK 1.2.
Run DDKREF.CMD from DDK directory to install the DDK reference icons.  Open
the the DDKREF on CDROM icon then double click on the OS/2 Debug Kernel
Reference icon.




!I/O ___________________________________**********
July 26, 1994
QUESTION: (Ref: C60)
Re:  Event-driven serial port monitoring
We are developing several multi-threaded, real-time, process-control
applications which must receive and process transactions sent from various
hardware devices over several RS-232 lines.  The transactions need to be
processed as soon as they arrive due to the real-time nature of the system.

In order to perform acceptably, I need a method of monitoring the ports which
(1) provides a fast response time and (2) uses very little CPU time (close to
none when no data is present).  As I see it, I need an event driven mechanism,
rather than polling (as we do now).

We currently poll the ports using the Normal Read Timeout processing mode of
the async PDD driver with a moderate length read timeout (100 to 250ms, which
is a setting of 10 to 25 on the DosDevIOCtl call).  This keeps the processor
use only moderately low and does not provide an acceptable response time since
the call waits the length of the read timeout AFTER the transaction has
completely arrived before returning.

What I would like to be able to do is associate an event semaphore with each
com port and let the system post the semaphore when data begins to arrive.
When the semaphore posts, the com port thread could read the transaction from
the appropriate port using Normal Read Timeout processing with a minimal
timeout (10ms).  Something like this would give me the following benefits:

  1.  The thread would be totally inactive when no data is present.
  2.  The thread would unblock as soon as the transaction completely comes in.
  3.  Normal Read Timeout processing would insure that the entire transaction
      had come in.  (The 10ms delay is long enough to make sure the whole
      transaction came in, but short enough for an acceptable response time.)

If I could use event semaphores, I would be able to add them to a muxwait
semaphore to allow one thread to handle all of the ports, which would be very
nice.  Any suggestions on how I can achieve (or come closer to) what I am
seeking would be much appreciated.

Note again that I am writing an application, not a device driver.  DAP
referred me to DDSC (probably because my application needs to communicate with
the OS/2 comm device driver, thus device drivers are involved).


ANSWER:
There is no event driven line monitoring in com.  Typically applications can
have a separate thread doing a loop of check status sleep check status etc.
for that type of monitoring.

There are probably a couple options:
  1) We currently have no semaphore support as per the note above, but it
     could be done.  The DDK comes with com.sys code which can be
     modified to do this.  It's not really practical for a general
     purpose case.  We're doing all we can now to do as little as
     at interrupt time. I don't believe it would be difficult to add
     this function.  Future versions of com may include some sort
     of event notification similar to this.

  2) I haven't verified this but you might try setting a fairly large
     timeout value and use Wait-For-Something timeout processing.
     Send a few of these packets down.  As soon as one returns valid
     data change to normal timeout with a small timeout value.  I
     believe these can be changed on the fly.  This will only require
     a lot of cpu when there is data. Might also look into the No-Wait
     processing for when you want the fast response.




!OTHER !VIDEO___________________________**********
July 14, 1994
QUESTION: (Ref: D23)
Can you tell me what the GRADD extension is, and the meaning of this for me as
a video device driver developer?


ANSWER:
The GRADD is a new display driver architecture for the POWERPC...the GRADD
extension is an ability to add interfaces and functions to the display driver
without changing the display driver.  It shows up on foils of the new
architecture that we distributed at the OS/2 Technical Exchange and device
driver conference that we held in San Francisco in April.  The GRADD spec is
targeted for the first PowerPC OS/2 alpha in July 1994.




!OTHER__________________________________**********
July 14, 1994
QUESTION: (Ref: D17)
I'm trying to open a file from my Device Driver INIT code.  The Control Panel
reference documentation has the interfaces for all Dos like commnds but
unfortunatly they are all in C!.  My driver is written in ASM.  Where can I
find the ASM interfaces into the Control Panel?


ANSWER:
The manual name which you mentioned may not be correct.  It seems the name is
"Control Program Programming Reference", instead of "Control Panel Reference".
In the DDK, there is a file named ATEISAI.ASM under .\DDK\DEV\ ATCOM directory
which is calling DosOpen.  You may be able to refer to it.  Or, if you have a
C compiler, you can just make a small file including DosOpen, and make a .COD
file.  In .COD file there is compiled assemble code there.




!BASE___________________________________**********
July 14, 1994
QUESTION: (Ref: D09)
I am writing a device driver which will be controlling multiple devices.  For
performance reasons, when an interrupt occurs, I plan on servicing any device
which requires service.

The devices can either share a common interrupt, or use separate interrupts.
After I have serviced all the devices, how do I determine which interrupt I am
processing so I can issue the EOI?


ANSWER:
Let me clarify the question first.  You want to have only one interrupt
handler routine which can handle multiple interrupt levels, and want to know
how the handler knows which IRQ level is processing to issue EOI.

I do not see any examples doing the same thing, and since the interrupt
routine will always be called without any parameter, it seems that it is
impossible to do it.  To support the multiple devices, most of the device
drivers handle this as follows:

If you have 3 devices to support,

           DevHelp_SetIRQ(  Interrupt_Entry1,  IRQLevel1, 0 )
           DevHelp_SetIRQ (  Interrupt_Entry2, IRQLevel2, 0)
           DevHelp_SetIRQ (Interrupt_Entry3, IRQLevel3, 0 )

 And in the interrupt routine,

 Interrupt_Entry1( )
 {
       return(Interrupt_Common( 0 ));
 }
 Interrupt_Entry2()
 {
       return(Interrupt_Common( 1 ));
 }

          .
          .
  Interrupt_Common( Index )
  {


        DevHelp_EOI (DeviceControlBlockIndex.IRQLevel);


  }

This is a very rough sample, but in this case, from each interrupt routine to
common routine, only a NEAR CALL happened.




!BASE___________________________________**********
July 14, 1994
QUESTION: (Ref: D08)
I'm writing an IFS using the OS220IFS skeleton files and am having a couple of
problems during initialization (FS_INIT).

1. The DevHlp=DevHelp statement causes immediate system death.

2. The DosOpen statement is supposed to open a file called ccache.ini in the
root directory of the boot drive.  The file is there but the call returns
rc=123.  What does 123 mean?

In all cases the IFS compiles & links without error or warning.  The only
thing I can think of is that something is messed up in regard to segments.
(customer code removed for security reasons)


ANSWER
1. Change compile options to Asfu from Asfw, u means set DS on entry,
   w means DS already set, but this is NOT the case with an IFS
2. ERROR_INVALID_NAME              123
   from BSEERR.H (usually the backslashes get you here in C)




!I/O !OTHER_____________________________**********
July 14, 1994
QUESTION: (Ref: C97)
Using debug kernel from DDK 1.2 with OS/2 2.11 I cannot receive any screen
messages on my WYSE terminal.  I can CTRL-C and get control, but with no
display.  All of my settings on the WYSE are correct(I can copy files to com2
and they display on the WYSE just fine).  My KDB.INI file is set up with .B
9600T 2.

One interesting thing to note is that if I do a mode command in an OS/2
session and then do a copy of a file to com2 while the debug kernel is
installed , the copy hangs and then after pressing CTRL-C on the terminal I
get screen messages just fine.  It's as if the kernel debugger didn't
successfully open the COM port on startup, but still sends output to the
terminal and when the copy command opens the port everything works.


ANSWER
1. Make sure the Wyse terminal has it's receive handshaking options turned
OFF; otherwise it will probably ignor it's received data.

2. Make sure they're using a LOOPBACK null modem cable; see KDB instructions
(loopback pins 4-5, 6-8-20 at each end) for cable wiring .




!OTHER__________________________________**********
July 14, 1994
QUESTION: (Ref: C96)
It appears that if you want a driver to be able to access more than 64kb in
user space that you must use the VMProcessToGlobal device helper.  According
to the documentation, you then access this memory using the FLAT selector.
Simple enough in principal, but I can find no guidance as to how I can find
this FLAT selector.

Any help would be greatly appreciated.


ANSWER:
Devhelp(GetDosVar, index=9 (reserved)) returns a 16:16 far pointer to a UCHAR
with a count of following DWORDs (array), after this array is another UCHAR
with a count of following DWORDs (array), the 10th (decimal, 10hex, 0 based)
DWORD contains the FLAT kernel DS value..

So, Getdosvar(9)-----------> x'03'
                             dword (= ULONG)
                             dword
                             dword
                             x'0b'
                             dword 0
                             dword 1
                             dword 2
                             dword 3
                             dword 4
                             dword 5
                             dword 6
                             dword 7
                             dword 8
                             dword 9
                             dword 10  <----------- Ring 0, flat DS

Note the 03 and 0b above are EXAMPLES, and these values may be different from
version to version...  the second array index 10 will NOT change however...



Example code to do this

  PUCHAR work PULONG work1;
  if(DevHelp_GetDOSVar( 9,0,(PPVOID)&work) ) {
      DosPutMessage(1, MsgLen1, Msg1);               // SRD
      stat = RET_PANIC;                              // SRD
  } /* end if */
  else {
      work+=(*(work)*sizeof(ULONG))+sizeof(UCHAR)+sizeof(UCHAR);
      work1=(PULONG)work;
      work1+=10;
      FlatDS=(USHORT)(*work1);
  } /* end else */




!OTHER__________________________________**********
July 14, 1994
QUESTION: (Ref: C92)
I had requested info on an "install program" for the customer to use to
install my device driver.  I was referenced to chapter 7 of the Physical
Device Driver Reference manual.  The problem I have with this install
procedure is that it places my device driver at the end of the CONFIG.SYS
file, which renders my device driver inoperable as it must be placed before
Socket Services (IBM2TOS1.SYS).

Any suggestions?


ANSWER:
DDINSTALL does not take care of this problem.  You might have to write your
own source to modify Config.sys.




!STORAGE________________________________**********
July 14, 1994
QUESTION: (Ref: C82)
I would like to know the status of the IDE CDROM driver and the IDE driver
with extended DMA support.


ANSWER:
Our plan is to support the new CDROM ATAPI in the next release of OS/2
scheduled for this fall).  Beta releases of the ATAPI code will be available
in the next beta release of the new OS/2 for Windows.  We expect to have one
driver that supports all of the vendor implementations.  This is similiar to
the way disk drives and SCSI CDROM drives are supported today.  The IDE CDROM
driver is PIO only.  No DMA support.




!OTHER__________________________________**********
July 14, 1994
QUESTION: (Ref: C77)
I would like to develop a realtime system on OS/2.  This realtime system
requires the function that special short time hardware interrupt (from 5 to 10
microseconds).

I know 2 ways to use hardware interrupt.  One is to set timer handler in
device drivers.  But timer handler happens per 32msec in OS/2.  The other is
to set SetIRQ in device drivers.  But I can not know how long handler calles
from OS/2 when IRQ signals reaches to H/W.

Q1. How long does handler(IRQ Handler) in PDD call from OS/2 when IRQ signals
    happens ?

Q2. Do you know other way to use short time interrupt (5-10 microsec)?


ANSWER:
A1. The current OS/2 design garantees a maximum of 400 microseconds interrupt
    latency.

A2. The only way to get timer interrupts faster than 32milliseconds is the use
    a hardware timer card that supplies interrupts at a faster rate, and
    provide a physical device driver to field the interrupts thru
    DevHelp_SetIrq




!VIDEO__________________________________**********
July 14, 1994
QUESTION: (Ref: C71)
Q1. Does OS/2 require VGA support?  Ideally, we'd like to be a "dumb"
    framebuffer and not have to emulate VGA.

Q2. Are there hooks in PM to support more than 1 monitor?


ANSWER:
A1. According to the Display Driver reference the generic driver BVHINIT.DLL
    runs during system installation.  It is also used in situations where the
    display has not been identified.  Through VioGetConfig BVHINIT reports the
    device it finds.  It can identify MPA,CGA,VGA etc..  With this information
    in mind I think presence of VGA is not necessary.  It can support
    resolutions and modes below VGA also like CGA for example.  The generic
    driver for non vga modes can be loaded by the statement
    GENERIC=DEVICE(BVHCGA).

A2. No, there are no hooks in PM to support more than 1 monitor?




!BASE___________________________________**********
July 14, 1994
QUESTION: (Ref: C58)
In my driver, I need to implement a far call to the 16 bit protected mode BIOS
routine.  The BIOS supports INI 1A calls for DOS or protected entry point at
address 0FFE6E for both - DOS and OS/2 (real and protected mode).  DOS part of
my driver works fine (it is NDIS 2 driver, it supports both OSs).

For OS/2, I use PhysToVirt DevHlp call to get virtual address for 0FFE6E (the
way I would do it for data transfer to/from physical address) and then I call
the virtual address I'm getting from this DevHlp call.

Well, I'm getting General Protection fault.  The address itself is fine.  I
can see correct BIOS instructions on debugger monitor.  I just can't execute
them.

What I'm doing wrong?  Can the result from PhysToVirt be called or it can be
used for data transfers only and I must convert the address to call somehow
else?

All I need to do is to make far calls to 16 and (or) 32 protected mode entry
points in PCI BIOS.  I have physical addresses for those entry points,
provided by BIOS.  How can I do this?

I am trying to use VirtToPhys DevHlp call to get selector:offset for the
physical addresses I have (and I get the correct address, I verified that) but
far call to this address fails with "General protection fault".


ANSWER:
According to the OS/2 2.0 Physical Device Driver reference, the address
returned by the PhysToVirt is only temporarily valid (invalidated by block,
yield, or other devhlps, etc.), and is a data segment (or ES) selector.  This
would not be validfor code segment.  Therefore, the call to the DS traps.  I
believe that you need to use the devhlp PageListToGDTSelector to create the
selector for the codesegment.  To do so, you must first build the pagelist
with the physical address, and then call this devhlp.  See the details in the
pub.




=================== Administrative Stuff ===================
________________________________________**********
July 29, 1994
