9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] What are the steps to add new video drivers?
@ 2001-03-30  8:37 Richard Greenblott
  2001-04-28  3:20 ` [9fans] status of the ide pseudo worm patches Sam Ducksworth
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Greenblott @ 2001-03-30  8:37 UTC (permalink / raw)
  To: 9fans

Hi:
    I am tring to install Plan9 on a pentium III processor from DELL.
The video board is one that is not currently supported by the Plan9
project. How can I add a new driver without first having Plan9 running.
My card is a NVIDIA GeForce2 GTS. I have been able to get this card
working with Linux but not with Plan9.

The system does start to load the OS from my floppy but it stops and
dumps the video prom and ends with a "%" prompt.

Any help or suggestions would be great.

Thanks:

Rick G.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [9fans] status of the ide pseudo worm patches
  2001-03-30  8:37 [9fans] What are the steps to add new video drivers? Richard Greenblott
@ 2001-04-28  3:20 ` Sam Ducksworth
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Ducksworth @ 2001-04-28  3:20 UTC (permalink / raw)
  To: 9fans

have the ide pseudo worm patches been rolled into
latest release?

--sam



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] What are the steps to add new video drivers?
@ 2001-03-30 16:58 jmk
  0 siblings, 0 replies; 7+ messages in thread
From: jmk @ 2001-03-30 16:58 UTC (permalink / raw)
  To: 9fans

I should say that the kernel stub driver, once you have the linear mapping
done for whatever memory spaces the card needs, usually doesn't need to be changed
until you get to writing the hardware cursor code, and that's the last part of
writing a Plan 9 video driver.

--jim


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] What are the steps to add new video drivers?
@ 2001-03-30 16:52 jmk
  0 siblings, 0 replies; 7+ messages in thread
From: jmk @ 2001-03-30 16:52 UTC (permalink / raw)
  To: 9fans

On Fri Mar 30 09:47:25 EST 2001, mike@trolltech.com wrote:
> 
> jmk@plan9.bell-labs.com wrote:
> > My advice is to install Plan 9 on a machine that has a suitable video
> > board, then you can go through the driver development cycle in a more
> > friendly environment.
> > 
> > Having support for Nvidea cards would be great, by the way.
> 
> Indeed, I keep thinking that I'd like to take a whack at getting my TNT2 Ultra
> working. Unfortunately my Copious Free Time hasn't yet been copious enough to
> let me gather together the necessary computers; it seems like you're talking
> about at least three for something like a normal environment: an operational
> terminal for development, a file server, and a machine with the card you're
> developing for.
> 

Basically you need somewhere to compile aux/vga and a new kernel with a stub driver
for the card. The machine with the new card needs to be able to boot the newly compiled
kernel and be attached to the fileserver that has the hacked aux/vga binary somewhere.

Here's the kernel stub I used when I briefly looked at the GeForce256 when one arrived
in a server I'd ordered - vgageforce256.c:

#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "io.h"
#include "../port/error.h"

#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static ulong
geforce245linear(VGAscr* scr, int* size, int* align)
{
	ulong aperture, oaperture;
	int oapsize, wasupamem;
	Pcidev *p;

	oaperture = scr->aperture;
	oapsize = scr->apsize;
	wasupamem = scr->isupamem;

	aperture = 0;
	if(p = pcimatch(nil, 0x10DE, 0)){
		switch(p->did){
		case 0x0101:
			aperture = p->mem[1].bar & ~0x0F;
			*size = p->mem[1].size;
			break;
		default:
			break;
		}
	}

	if(wasupamem){
		if(oaperture == aperture)
			return oaperture;
		upafree(oaperture, oapsize);
	}
	scr->isupamem = 0;

	aperture = upamalloc(aperture, *size, *align);
	if(aperture == 0){
		if(wasupamem && upamalloc(oaperture, oapsize, 0)){
			aperture = oaperture;
			scr->isupamem = 1;
		}
		else
			scr->isupamem = 0;
	}
	else
		scr->isupamem = 1;

	return aperture;
}

VGAdev vgageforce256dev = {
	"geforce256",

	nil,				/* enable */
	nil,				/* disable */
	nil,				/* page */
	geforce245linear,		/* linear */
	nil,				/* drawinit */
	nil,				/* fill */
};

and here's a stub for aux/vga - geforce256:

#include <u.h>
#include <libc.h>
#include <bio.h>

#include "vga.h"

/*
 * GeForce256.
 */
static void
snarf(Vga* vga, Ctlr* ctlr)
{
	USED(vga);
	ctlr->flag |= Fsnarf;
}

static void
options(Vga* vga, Ctlr* ctlr)
{
	USED(vga);
	ctlr->flag |= Foptions;
}

static void
init(Vga* vga, Ctlr* ctlr)
{
	USED(vga);
	ctlr->flag |= Finit;
}

static void
load(Vga* vga, Ctlr* ctlr)
{
	USED(vga);
	ctlr->flag |= Fload;
}

static void
dump(Vga* vga, Ctlr* ctlr)
{
	USED(vga, ctlr);
}

Ctlr geforce256 = {
	"geforce256",			/* name */
	snarf,				/* snarf */
	options,			/* options */
	init,				/* init */
	load,				/* load */
	dump,				/* dump */
};

At this point I usually write the snarf and dump functions; with the
GeForce256 I looked at the register set of the card as described in the
XFree86 code (the only 'documentation') and decided I didn't have the
strength.

--jim


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] What are the steps to add new video drivers?
@ 2001-03-30 16:12 forsyth
  0 siblings, 0 replies; 7+ messages in thread
From: forsyth @ 2001-03-30 16:12 UTC (permalink / raw)
  To: 9fans

> let me gather together the necessary computers; it seems like you're talking
> about at least three for something like a normal environment: an operational
> terminal for development, a file server, and a machine with the card you're
> developing for.

if are developing a driver for a new AGP card, and you've got a working PCI card,
or vice versa, you can use one machine and switch between AGP and PCI
using the bios.  it's tedious but should work.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] What are the steps to add new video drivers?
  2001-03-30 14:18 [9fans] What are the steps to add new video drivers? jmk
@ 2001-03-30 14:46 ` Mike Acar
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Acar @ 2001-03-30 14:46 UTC (permalink / raw)
  To: 9fans


jmk@plan9.bell-labs.com wrote:
> My advice is to install Plan 9 on a machine that has a suitable video
> board, then you can go through the driver development cycle in a more
> friendly environment.
> 
> Having support for Nvidea cards would be great, by the way.

Indeed, I keep thinking that I'd like to take a whack at getting my TNT2 Ultra
working. Unfortunately my Copious Free Time hasn't yet been copious enough to
let me gather together the necessary computers; it seems like you're talking
about at least three for something like a normal environment: an operational
terminal for development, a file server, and a machine with the card you're
developing for.

-- 
Brilliance and gorgeousness                        |   Mike Acar
And we tell ourselves we don't want the treasures  |   mike@trolltech.com
But we hate the glass anyway                       |


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] What are the steps to add new video drivers?
@ 2001-03-30 14:18 jmk
  2001-03-30 14:46 ` Mike Acar
  0 siblings, 1 reply; 7+ messages in thread
From: jmk @ 2001-03-30 14:18 UTC (permalink / raw)
  To: 9fans

On Fri Mar 30 04:08:19 EST 2001, rgreenbl@nextabit.com wrote:
> Hi:
>     I am tring to install Plan9 on a pentium III processor from DELL.
> The video board is one that is not currently supported by the Plan9
> project. How can I add a new driver without first having Plan9 running.
> My card is a NVIDIA GeForce2 GTS. I have been able to get this card
> working with Linux but not with Plan9.
> 
> The system does start to load the OS from my floppy but it stops and
> dumps the video prom and ends with a "%" prompt.
> 
> Any help or suggestions would be great.
> 
> Thanks:
> 
> Rick G.

My advice is to install Plan 9 on a machine that has a suitable video
board, then you can go through the driver development cycle in a more
friendly environment.

Having support for Nvidea cards would be great, by the way.

--jim


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-04-28  3:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-30  8:37 [9fans] What are the steps to add new video drivers? Richard Greenblott
2001-04-28  3:20 ` [9fans] status of the ide pseudo worm patches Sam Ducksworth
2001-03-30 14:18 [9fans] What are the steps to add new video drivers? jmk
2001-03-30 14:46 ` Mike Acar
2001-03-30 16:12 forsyth
2001-03-30 16:52 jmk
2001-03-30 16:58 jmk

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).