From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1854fc76e5c50f866c1cccbf01ce82a4@plan9.bell-labs.com> From: "Russ Cox" To: 9fans@cse.psu.edu Subject: Re: [9fans] questions on sis630 driver... MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Fri, 2 Aug 2002 20:28:42 -0400 Topicbox-Message-UUID: d74b433a-eaca-11e9-9e20-41e7f4b1d025 Look at any of the other vga drivers. You have to allocate yourself some physical addresses with upamalloc. Then you set up the segment structures so that user programs can call segattach. Addvgaseg will do the grungy work for you. Most of the cards get their addresses configured by the PCI BIOS at boot time, so you just have to read the addresses out of the card, upamalloc, and addvgaseg. Look at the vgat2r4.c driver for a good simple example. The linear function takes care of this. If the SiS card doesn't have its own video memory and you need to give it normal memory, you might want to look at the vgai81x.c driver for an example. /sys/src/cmd/aux/vga/notes.txt has some notes about writing VGA drivers. I posted them to 9fans a while ago too. I just put notes.txt out; the next scan will find it. Russ