Hi all,
I am trying to debug problems we have with a S3 video card, the drivers are
based on the S3 sources from the NT DDK.
The application works fine on a PC with a Celeron Chip but for performance
reasons we are now trying to run it on a pentium III, 1Ghz and the PC no
longer boots, it spins in the display driver S3.DLL. Here is what I have
found out so far.
The S3 display driver sends a IOCTL_VIDEO_QUERY_PUBLIC RANGES asking for 2
ranges. The miniport uses VideoPortMapMemory to map the IO addresses in the
processes memory. The call uses 0x00000000 for the Physical address, Length
is 0x00010000, InIoSpace is true. The call returns a Virtual address of 0
but no error is returned. Is it true that if I choose InIoSPace is true that
it will always return a virtual address of 0 ??
We also set the MappedInIoSpace field of the VIDEO_PUBLIC_ACCESS_RANGES
structure to 1 when we return from the IOCTL call.
The next thing I know is that the display driver (S3.DLL) is spinning on
this code:
while (INPW(ppdev->pjIoBase, pbd->ulGp_stat_cmd) & 0x0200)
;
If I look with ice I can see it is doing:
mov ax, dx // DX = 9AE8 which is the address of GP_STAT register
in ax
This code always returns FFFF because this IO register is invalid and
nothing is seen op the PCI bus. If in Ice I do a PHYS on 9AE8 and poke/peek
the returned address it works.
My problem is that I don’t really understand why it is doing an IN
instruction ?
The S3 display driver does not use pjIOBase (which is the memory base
address for the IO Space returned in the call to
VIDEO_IOCTL_QUERY_PUBLIC_ACCESS_RANGES because it is compiled for X86.
Don’t understand that either. Shouldn’t it add this address ???
If I modify the miniport and set InIoSpace and MappedInIoSPace to false then
I do get a non-zeroe value back for the mapped virtual address in
VideoPortMapMemory but the display driver does the same IN instruction.
What I also don’t understand is is how these variables are used: InIoSpace
and MappedInIoSPace. Does anyone now how these should be set. (The video
card is a PCI device)
Also, I thought an IN instruction can only be used with a 16bit IO Address
so how can this work. I expected the display driver to use the mapped
address + register offset and just do memory read and writes on them. PCI
address always seems to be 32 bit numbers, can we use IN instructions on
these to begin with or should the Hal take care of this depending on the
mapping we have choosen ?
Any help or pointers welcome :))
Jos
.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com