Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2000 09:34:12 -0700
From:      "Steve Shoecraft" <sshoecraft@1-link.net>
To:        <freebsd-hackers@freebsd.org>
Subject:   RE: Accessing the Video Bios on a PCI card?? (vm_map ?) 
Message-ID:  <000201c06522$872f6ea0$c3ac30d0@max.home.org>
In-Reply-To: <200012130145.eBD1j9306069@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

	Well, I never did get that to work last night.  Any maps outside of the
memory range on the machine (which only has 128 meg) turned up all 1s in all
bits.  I dropped the issue for the moment and looked at AGP ... I'm
currently doing DMA transfers, but it's an AGP card, and I'm wondering a)
how to detect AGP (how does the AGP register differ on PCI cards as opposed
to AGP cards -- read as 0L?) and b) once detected, how to use AGP to improve
capture performance.  Not much progress was made -- still on the learning
curve (looked alot at the agp* stuff in the /sys/pci dir).

	Back to the BIOS_BASE subject, I fired off a message to ATI developer
support about it.  And yes, suprisingly enough they _HAVE_ been very
helpfull in the past about information on this card (I got the full register
set refrence and the programmers manual and sample code from them).  We'll
see what they say.

	In the meantime, if you can think of anything else that might work (mapping
BIOS), lemme know.

- Steve

-----Original Message-----
From: Mike Smith [mailto:msmith@freebsd.org]
Sent: Tuesday, December 12, 2000 6:45 PM
To: sshoecraft@1-link.net
Subject: Re: Accessing the Video Bios on a PCI card?? (vm_map ?)


>
> 	(this is a winblows system with my work-related email on it - you expect
> sane wrapping?)

It *is* possible, actually. 8)

> 	Anyway ... I got the size of the bios using the method you suggested.  I
> used malloc to get a chunk of memory, turned the ptr into a physical addr,
> then used free to get rid of it.  I then used pmap_mapdev to map the phsy
to
> virt.

That won't work.  The physical pointer you referenced there is still
backed by physical pages (since they were the pages allocated to you!).

> 	You suggested using the resource manager to find a block ... how do I go
> about doing that?  I've tried bus_alloc_resource with the MEMORY type, but
> it always fails...  Any hints?

For now, try just using 0x80000000.  Unless you have > 2GB of RAM, that
should work fine. (ie. stuff 0x80000001 into the bios base address
register).  When you've got it working doing this, I'll work out how to
get you a better number. 8)

> 	Oh, and yes, the card is my primary adapter.  I just want my driver to
> work even if the card is not the primary adapter.

Ok.  It doesn't matter, since expansion ROMs are never executed in-place,
they're always shadowed.

--
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000201c06522$872f6ea0$c3ac30d0>