Re: [XFree86] Debug statements inside xfree video driver ??

2008-06-30 Thread Marc Aurele La France

On Mon, 30 Jun 2008, vishnuvaradan vishnuvaradan wrote:

On Sun, Jun 29, 2008 at 9:54 PM, Marc Aurele La France <[EMAIL PROTECTED]>
wrote:

On Sun, 29 Jun 2008, vishnuvaradan vishnuvaradan wrote:
 Iam trying to integrate the xfree video driver for my PMC graphics card ..



while configuring and running the driver access some illegal memory area

and
iam geting oops kernel access bad area..



 I need to debug the video driver.. ( reg its IOBASE,mem base etc)



I added printf inside the driver but it is not coming in var/log



 Please give idea how to add some debug statements(with variable values)

inside the  video  driver such that it will come in var/log ...???



The server closes stdout as part of its initialisation.  You could use
stderr instead, but it is preferable to use the xf86Msg() family of
functions. These are documented in section 18.1 of the DESIGN document.



Still, I could not find where my video driver access bad area.

   As said earlier iam using the PMC graphics card along with a base board.
   while integrating the frame buffer driver for the graphics,  based on
our architecture
   FOR I/o READ/WRITE ACCESS I should use as
   outb(val,port) as outb(val, 0xF200+port)
   inb(val,port)   as inb(val, 0xF200+ port)



   I have modified the direct I/O accessing in the xfree in my video driver
...
   Shall i need to modify the same in compiler.h inside
programs/Xserver/hw/xfree86/common ??



   I suspect the problem is closely related to I/o issue only



   I have attached the log file and the serial port messages for ur
reference  ..



  Please shed me some light to solve the issue..


For this architecture, compiler.h offsets all PCI I/O by ioBase, which in 
turn is set by xf86EnableIO() in os-support/linux/lnx_video.c


Marc.

+--+--+
|  Marc Aurele La France   |  work:   1-780-492-9310  |
|  Academic Information and|  fax:1-780-492-1729  |
|Communications Technologies   |  email:  [EMAIL PROTECTED] |
|  352 General Services Building   +--+
|  University of Alberta   |  |
|  Edmonton, Alberta   |Standard disclaimers apply|
|  T6G 2H1 |  |
|  CANADA  |  |
+--+--+
XFree86 developer and VP.  ATI driver and X server internals.
___
XFree86 mailing list
XFree86@XFree86.Org
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] Debug statements inside xfree video driver ??

2008-06-30 Thread vishnuvaradan vishnuvaradan
On Sun, Jun 29, 2008 at 9:54 PM, Marc Aurele La France <[EMAIL PROTECTED]>
wrote:

> On Sun, 29 Jun 2008, vishnuvaradan vishnuvaradan wrote:
>
>  Iam trying to integrate the xfree video driver for my PMC graphics card ..
>>
> while configuring and running the driver access some illegal memory area
>> and
>> iam geting oops kernel access bad area..
>>
>
>  I need to debug the video driver.. ( reg its IOBASE,mem base etc)
>>
> I added printf inside the driver but it is not coming in var/log
>>
>
>  Please give idea how to add some debug statements(with variable values)
>> inside the  video  driver such that it will come in var/log ...???
>>
>
> The server closes stdout as part of its initialisation.  You could use
> stderr instead, but it is preferable to use the xf86Msg() family of
> functions. These are documented in section 18.1 of the DESIGN document.
>
> Still, I could not find where my video driver access bad area.
As said earlier iam using the PMC graphics card along with a base board.
while integrating the frame buffer driver for the graphics,  based on
our architecture
FOR I/o READ/WRITE ACCESS I should use as
outb(val,port) as outb(val, 0xF200+port)
inb(val,port)   as inb(val, 0xF200+ port)

I have modified the direct I/O accessing in the xfree in my video driver
...
Shall i need to modify the same in compiler.h inside
programs/Xserver/hw/xfree86/common ??

I suspect the problem is closely related to I/o issue only

I have attached the log file and the serial port messages for ur
reference  ..

   Please shed me some light to solve the issue..

  Thanks a lot
(II) PCI: PCI scan (all values are in hex)
(II) PCI: 00:00:0: chip 10e3,0148 card 10e3, rev 01 class 06,80,00 hdr 00
(II) PCI: 00:02:0: chip 10b5,6520 card , rev cb class 06,04,00 hdr 01
(II) PCI: 01:03:0: chip 126f,0720 card 0101,0101 rev c1 class 03,00,00 hdr 00
(II) PCI: 01:04:0: chip 1131,1561 card 1131,1561 rev 11 class 0c,03,10 hdr 80
(II) PCI: 01:04:1: chip 1131,1561 card 1131,1561 rev 11 class 0c,03,10 hdr 80
(II) PCI: 01:04:2: chip 1131,1562 card 1131,1562 rev 11 class 0c,03,20 hdr 80
(II) PCI: End of PCI scan
(II) PCI-to-PCI bridge:
(II) Bus 1: bridge is at (0:2:0), (0,1,1), BCTRL: 0x0400 (VGA_EN is cleared)
(II) Bus 1 non-prefetchable memory range:
[0] -1  0   0x9bf0 - 0x9fff (0x410) MX[B]
(II) Bus 1 prefetchable memory range:
[0] -1  0   0x9be0 - 0x9bef (0x10) MX[B]
(II) Host-to-PCI bridge:
(II) Bus 0: bridge is at (0:0:0), (0,0,0), BCTRL: 0x0008 (VGA_EN is set)
(II) Bus 0 I/O range:
[0] -1  0   0x - 0x00ff (0x100) IX[B]
(II) Bus 0 non-prefetchable memory range:
[0] -1  0   0x - 0x (0x0) MX[B]
(II) Bus 0 prefetchable memory range:
[0] -1  0   0x - 0x (0x0) MX[B]
(--) PCI:*(1:3:0) Silicon Motion, Inc. SM720 Lynx3DM rev 193, Mem @ 0x9c00/2
6
(WW) Open ACPI failed (/proc/acpi/event) (No such file or directory)
(WW) Open APM failed (/dev/apm_bios) (No such file or directory)
(II) Addressable bus resource ranges are
[0] -1  0   0x - 0x (0x0) MX[B]
[1] -1  0   0x - 0x00ff (0x100) IX[B]
(II) OS-reported resource ranges:
[0] -1  0   0x - 0x (0x1) MX[B]
[1] -1  0   0x - 0x (0x1) MX[B]
[2] -1  0   0x00ff - 0x00ff (0x1) IX[B]
[3] -1  0   0x - 0x (0x1) IX[B]
(II) Active PCI resource ranges:
[0] -1  0   0x9bffdf00 - 0x9bffdfff (0x100) MX[B]
[1] -1  0   0x9bffe000 - 0x9bffefff (0x1000) MX[B]
[2] -1  0   0x9bfff000 - 0x9bff (0x1000) MX[B]
[3] -1  0   0x8000 - 0x8fff (0x1000) MX[B]
[4] -1  0   0x9c00 - 0x9fff (0x400) MX[B](B)
(II) Active PCI resource ranges after removing overlaps:
[0] -1  0   0x9bffdf00 - 0x9bffdfff (0x100) MX[B]
[1] -1  0   0x9bffe000 - 0x9bffefff (0x1000) MX[B]
[2] -1  0   0x9bfff000 - 0x9bff (0x1000) MX[B]
[3] -1  0   0x8000 - 0x8fff (0x1000) MX[B]
[4] -1  0   0x9c00 - 0x9fff (0x400) MX[B](B)
(II) OS-reported resource ranges after removing overlaps with PCI:
[0] -1  0   0x - 0x (0x1) MX[B]
[1] -1  0   0x - 0x (0x1) MX[B]
[2] -1  0   0x00ff - 0x00ff (0x1) IX[B]
[3] -1  0   0x - 0x (0x1) IX[B]
(II) All system resource ranges:
[0] -1  0   0x - 0x (0x1) MX[B]
[1] -1  0   0x - 0x (0x1) MX[B]
[2] -1  0   0x9bffdf00 - 0x9bffdfff (0x100) MX[B]
[3] -1  0   0x9bffe000 - 0x9bffefff (0x1000) MX[B]
[4] -1  0   0x9bfff000 - 0x9bff (0x1000) MX[B]
[5] -1  0   0x8000 - 0x8fff (0x1000) MX[B]
[6] -1  0  

Re: [XFree86] Debug statements inside xfree video driver ??

2008-06-29 Thread Marc Aurele La France

On Sun, 29 Jun 2008, vishnuvaradan vishnuvaradan wrote:


Iam trying to integrate the xfree video driver for my PMC graphics card ..



while configuring and running the driver access some illegal memory area and
iam geting oops kernel access bad area..



I need to debug the video driver.. ( reg its IOBASE,mem base etc)



I added printf inside the driver but it is not coming in var/log



Please give idea how to add some debug statements(with variable values)
inside the  video  driver such that it will come in var/log ...???


The server closes stdout as part of its initialisation.  You could use stderr 
instead, but it is preferable to use the xf86Msg() family of functions. 
These are documented in section 18.1 of the DESIGN document.


Marc.

+--+--+
|  Marc Aurele La France   |  work:   1-780-492-9310  |
|  Academic Information and|  fax:1-780-492-1729  |
|Communications Technologies   |  email:  [EMAIL PROTECTED] |
|  352 General Services Building   +--+
|  University of Alberta   |  |
|  Edmonton, Alberta   |Standard disclaimers apply|
|  T6G 2H1 |  |
|  CANADA  |  |
+--+--+
XFree86 developer and VP.  ATI driver and X server internals.
___
XFree86 mailing list
XFree86@XFree86.Org
http://XFree86.Org/mailman/listinfo/xfree86


[XFree86] Debug statements inside xfree video driver ??

2008-06-29 Thread vishnuvaradan vishnuvaradan
Hi

Iam trying to integrate the xfree video driver for my PMC graphics card ..

while configuring and running the driver access some illegal memory area and
iam geting oops kernel access bad area..

I need to debug the video driver.. ( reg its IOBASE,mem base etc)

I added printf inside the driver but it is not coming in var/log

Please give idea how to add some debug statements(with variable values)
inside the  video  driver such that it will come in var/log ...???


Thanks