From owner-freebsd-hackers Wed Dec 13 8:32:23 2000 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 08:32:19 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from smtp05.primenet.com (smtp05.primenet.com [206.165.6.135]) by hub.freebsd.org (Postfix) with ESMTP id E1A1D37B400 for ; Wed, 13 Dec 2000 08:32:18 -0800 (PST) Received: (from daemon@localhost) by smtp05.primenet.com (8.9.3/8.9.3) id JAA12003 for ; Wed, 13 Dec 2000 09:28:46 -0700 (MST) Received: from 208-48-172-195.nas-2.scf.primenet.com(208.48.172.195), claiming to be "max" via SMTP by smtp05.primenet.com, id smtpdAAAXSaaAx; Wed Dec 13 09:28:41 2000 Reply-To: From: "Steve Shoecraft" To: Subject: RE: Accessing the Video Bios on a PCI card?? (vm_map ?) Date: Wed, 13 Dec 2000 09:34:12 -0700 Message-ID: <000201c06522$872f6ea0$c3ac30d0@max.home.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-reply-to: <200012130145.eBD1j9306069@mass.osd.bsdi.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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