9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] questions on sis630 driver...
Date: Fri,  2 Aug 2002 20:28:42 -0400	[thread overview]
Message-ID: <1854fc76e5c50f866c1cccbf01ce82a4@plan9.bell-labs.com> (raw)

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


             reply	other threads:[~2002-08-03  0:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-03  0:28 Russ Cox [this message]
2002-08-03  1:40 ` paurea
  -- strict thread matches above, loose matches on Subject: below --
2002-08-02 12:40 paurea
2002-08-02 23:03 ` paurea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1854fc76e5c50f866c1cccbf01ce82a4@plan9.bell-labs.com \
    --to=rsc@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).