From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id E32E22EF9E for ; Mon, 14 Aug 2000 04:54:55 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.8.7/8.8.7) id EAA06695 for axp-list@listman.redhat.com; Mon, 14 Aug 2000 04:54:55 -0400 Received: from enterprise2.newlogic.com (enterprise2.newlogic.at [194.208.88.1]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id EAA06691 for ; Mon, 14 Aug 2000 04:54:54 -0400 Received: from sparc5-6.newlogic.at (sparc5-6.newlogic.at [194.208.88.46]) by enterprise2.newlogic.com (8.9.2/8.9.2) with ESMTP id KAA08020 for ; Mon, 14 Aug 2000 10:54:24 +0200 (MET DST) Received: (from nwaibel@localhost) by sparc5-6.newlogic.at (8.9.3+Sun/8.9.1) id KAA08537 for axp-list@redhat.com; Mon, 14 Aug 2000 10:54:23 +0200 (MET DST) Message-ID: X-Mailer: XFMail 1.4.6 on Solaris X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Mon, 14 Aug 2000 10:54:23 +0200 (MET DST) Organization: NewLogic From: "Niki W. Waibel" To: axp-list@redhat.com Subject: mapping pci memory on avanti (apecs) / glide2x 3dfx driver X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors hi, i am currently porting glide from linux/x86 to linux/alpha. things look very good! (compiling of GlideV2 (i have a voodoo2) works now) the only bad thing is that the device driver for /dev/3dfx is currently not working correct. it was not possible for me (on my alphastation255 (avanti/apecs machine)) to map the pci memory of the voodoo2 card. in the driver it is done in the mmap_3dfx routine (which is of course correct ;-) via: remap_page_range(vma->vm_start, VM_OFFSET(vma), len, vma->vm_page_prot) which in my opinion has to be changed to: remap_page_range(vma->vm_start, virt_to_phys(bus_to_virt(VM_OFFSET(vma))), len, vma->vm_page_prot) which (i have tested and looked it up in the kernel sources) works on x86. ... but not on alpha (avanti/apecs). BTW: i have compiled kernel 2.2.16 with avanti option (not general support). in the kernel sources i was able to find a hint about a "1GB magic". the reason why the above (my version) does not work is: a 'bus_to_virt(0x0600000)' returns 0!!!! a 'bus_to_virt(0x0600000 + 1024*1024*1024)' ("1GB magic") seens to return a correct value: sthg like 0xffff fc00 0600 0000 (if i remember correct). so i changed the routine to: remap_page_range(vma->vm_start, virt_to_phys(bus_to_virt(VM_OFFSET(vma) + 1024*1024*1024)), len, vma->vm_page_prot) which also does not work, because a virt_to_phys(0xffff fc00 0600 0000) simply returns 0x0600 0000 . looking into the kernel: it returns: address & 0xff ffff ffff... hmmm - that is the point where i am now. mapping the pci mem must work somehow, because i am also using matrox mill framebuffer device on my alphastation255 and X can use that card too. X works on linux-2.2.16 and linux-2.4.0-test5 fb dev just works on linux-2.4.0-test5. hope that someone can give me a hint. want to see tux_aqfh running accelerated on my alpha!!! thanks a lot, niki -- unix, because reboots are for upgrades.