Subject: Re: PCI VGA Card Initilization (SIS6326 / PT80)

From: "Girish Gulawani" <[email-masked]>
Date: Wed, 20 Mar 2002 23:15:15 +0900

hello again.
with regards to previous replies to my post -- the isa_readb() i am not
using as i am still inside the linux loader program & not inside the linux
kernel. now it seems what Zhang says is right. that some cards cannot be
fired up without their BIOS.
meantime today i could access VGA ROM BIOS at 0xC_0000 for no use as its x86
code. i tried free-bios source code, which has VGA bios code for SiS300. its
able to bring up monitor to normal mode out of powerdown mode. screen even
displays "Out of Scan Range" message. but nothing after that. in order to
compare initialization steps between SiS300 & my target SiS6326, i tried to
get the data sheet from www.sis.com website but the data sheets are not
available. could any body point me where the data sheets for SiS300 and
PT-80 VGA card are available?

btw, i wonder what card you people are using for VGA monitors? and what
about their initialization on the MIPS board? is there ANYBODY who has used
"AOpen's PT80" or ANY VGA card based on SiS6326 chipset on MIPS board & how?
if somebody has done this exercise could you please explain, because i am
sure this will be of general interest.

[to summarize my problem with PCI/VGA card -- currently i am using MILO bios
source code. the card has 3 BARs.
BAR0 = PCI Memory Area. BAR1 = 0xA_0000 (VGA MemIO Buff) BAR2 = 0x0380 (IO).
with these settings the IO access from CPU is ok. but any access to A0000
fails. my PCI is not PCI-to-PCI bridge, hence no question of VGA Enable.
also the PCI bus analyzer does show memory read & memory writes commands
being generated when accessed A0000 address. to add to this - i guess my
options to choose the card are also limited as i have 3.3v PCI slot.]

please help me.
many thanks in advance.
regards,
girish.

----- Original Message -----
From: "Zhang Fuxin" <[email-masked]>
To: "Girish Gulawani" <[email-masked]>
Sent: Tuesday, March 19, 2002 12:00 AM
Subject: Re: Re: PCI VGA Card Initilization (SIS6326 / PT80)

hi,

 could that be the famouse vga bios initialization problem? That is,
without executing the vgabios code,video card often refuse to work.
And unfortunately vgabios code is often for x86.

?ú 2002-03-19 08:46:00 you wrote￡o
>> > i have a PCI/VGA card PT80 with SIS6326 chipset. i am using MILO BIOS
>source
>> > code. but i am not able to access the internal buffer which is
typically
>at
>> > 0xA0000. even the BIOS ROM (0xC0000) read fails to show default value
>> > 0xA5A5. the expansion ROM is enabled in PCI by setting D0 bit to 1.
>however
>> > IO seems okay because the monitor actually switches from power down
mode
>to
>> > normal mode. i have tried using both vgaraw1.c and vgaraw2.c files, but
>no
>> > success. could anybody help me to solve this problem.
>> > many thanks.
>>
>> Are you using isa_readb() and friends to access ISA memory space?
>> Did you set up isa_slot_offset correctly with the start address of ISA
>memory
>> space on your MIPS box?
>no i am not using isa_readb() etc. infact i am accessing this area 0xA_0000
>as Memory/IO in memory mode. i have seen the pci bus transactions, its
>generating memory read and memory write commands. but due to some reason
>that is still *unknown* to me generates master abort. i always get master
>received master abort. could you tell me what could be the reason?
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com

Regards
            Zhang Fuxin
            [email-masked]

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

---

From: Dominic Sweetman <[email-masked]>
Date: Thu, 21 Mar 2002 15:48:23 +0000

Dan,

> Is Algorithmics BIOS emulator not the x86emu code
> that can be found in the Alpha MILO and the XFree86
> code base as Alan Cox mentioned?

It's an entirely indepedent invention of the same idea.  I've no idea
whether it's any better/worse, but it sounded like our binary was
working for Zhang better than the MILO he'd built.

Dominic
Algorithmics Ltd

---

From: "Dan Aizenstros" <[email-masked]>
Date: Thu, 21 Mar 2002 07:22:02 -0800

Hello Dominic,

That code was originally under GPL but was changed
to a BSD style license when Kendall Bennett took
over the project.

The code is available at the SciTech ftp site
ftp.scitechsoft.com/devel/x86emu/x86emu-0.8.tar.gz

Dan Aizenstros
Software Project Manager
QuickLogic Canada

>>> Dominic Sweetman <[email-masked]> 03/21/02 02:39 AM >>>

Zhang Fuxin ([email-masked]) writes:

> We have tried several cards on Algor P6032 board,but only matrox
> Gxxx cards (G450 needs the latest code) can be used by linux kernel
> without vga bios executed. With a x86 emulator we are able to use
> Riva TNT2,and probably more can work. Unfortunately that emulator is
> an executable from Algor, as a kindly help. We can't get more
> control on it and finally give up...

Just a note: Zhang, if you want source code of the Algorithmics
simulator, we've no problem at all supplying it on our standard
license.  

Whether that source is useful to you is another question: the BIOS
emulator was created out of pieces of a complete x86 emulator, and
it's a fairly complicated bit of software.

One of my colleagues saw Zhang's request and said he'd consult, and
then the message got lost - sorry.

Our standard license is not GPL and it does have one restriction - if
you build our software into something you sell, we ask you to get a
further license from us before you take the money from your customers.

We can be persuaded to put software out on GPL instead (as we did with
the floting-point emulation code).  But generally some commercial
organisation - the difference only matters then, right? - has to ask
nicely...

--
Dominic Sweetman
Algorithmics Ltd
The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND
phone +44 1223 706200/fax +44 1223 706250/direct +44 1223 706205
http://www.algor.co.uk

---

From: Zhang Fuxin <[email-masked]>
Date: Thu, 21 Mar 2002 20:31:48 +0800

hi,
 
>simulator, we've no problem at all supplying it on our standard
Thank you for your information. We may request for it again if we
could not make one. I always deem the executable as 'a kindly help'
and appreciate all your contribution to mips world. 
>it's a fairly complicated bit of software.
In fact I am interesting in this task itself,no one ask me to do it.
Anyway we are a reseaching institute:).But it is a pity that mips platform 
can't get its own display easily,and cheaply. Just too many things to do..

Our plan is to port X86 bios emulation code(as Alan pointed out) into pmon.
bochs has been considered too.
>the floating-point emulation code).  But generally some commercial
Yes,i understand. 

Regards
            Zhang Fuxin
            [email-masked]

---

From: "Dan Aizenstros" <[email-masked]>
Date: Thu, 21 Mar 2002 11:10:56 -0800

Hello Dominic,

Actually it was Girish Gulawani who said he used the
MILO bios not Zhang. He said he was using the files
vgaraw1.c and vgaraw2.c from MILO. Those files do not
use the x86emu BIOS emulator but try to directly
initialize the VGA adapter.

Dan Aizenstros
Software Project Manager
QuickLogic Canada

>>> Dominic Sweetman <[email-masked]> 03/21/02 08:28 AM >>>

Dan,

Dominic
Algorithmics Ltd

---

From: "Dan Aizenstros" <[email-masked]>
Date: Fri, 22 Mar 2002 07:13:40 -0800

Hello Girish,

I have used the x86emu code to run the BIOS code
on an ATI Rage IIC PCI adapter. I added the code
to the PMON that I build for my company's Hurricane
board. The code for the emulator does not require
a lot of work because it is seperated between
portable code that is not board or system specific
and glue code that is.

In the x86emu-0.8.tar.gz archive you will find the
portable code in the directory scitech/src/x86emu.

The code in scitech/src/biosemu can be used as a
starting point for creating the glue code.

Dan Aizenstros
Software Project Manager
QuickLogic Canada

>>> "Girish Gulawani" <[email-masked]> 03/22/02 03:45 AM >>>

hello, all
thank you very much for all these reply mails.
my saga of VGA initialization continues. it occurs to me that the x86
emulation for the VGA bios is a long process. SiS6326 chipset has support
inside XFree86 & digging out the BIOS code from here is also a big story.
hence i was looking for a rather quickish solution. currently i'm trying to
use sis_*.c files from XFree86 source. dont know how but my monitor displays
2 red & 1 green vertical lines. the sis_bios source code searched for the
mode, memory references inside the BIOS at 0x20A offset & it failed to find
the mode & other info. AOpen BIOS version is 2.25.
could anybody of you please share your success story of VGA initialization
on MIPS board with me??
many thanks in advance.
regards,
girish.

----- Original Message -----
From: "Dan Aizenstros" <[email-masked]>
To: <[email-masked]>; <[email-masked]>; <[email-masked]>;
<[email-masked]>
Sent: Friday, March 22, 2002 4:10 AM
Subject: Re: Re: PCI VGA Card Initilization (SI6326 / PT80)

Hello Dominic,

Dan Aizenstros
Software Project Manager
QuickLogic Canada

Dan,

Dominic
Algorithmics Ltd