Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Niki W. Waibel" <niki.waibel@newlogic.com>
To: axp-list@redhat.com
Subject: mapping pci memory on avanti (apecs) / glide2x 3dfx driver
Date: Mon, 14 Aug 2000 10:54:23 +0200 (MET DST)	[thread overview]
Message-ID: <XFMail.20000814105423.niki.waibel@newlogic.com> (raw)

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.




                 reply	other threads:[~2000-08-14  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox