Update - Re: Open Sourced Glide on Linux PPC
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 12 lines · Jens Ch. Restemeier
Okay, a small update:
I decided to go the
/dev/3dfxway, and got everything to compile. That was last weekend.Status:
-/dev/3dfxdetects the card correctly. It uses the kernel's PCI functions to detect the card, mmap's it when it is requested and provides ioctls to access the PCI configuration registers.
Quoted 4 lines
- Glide compiles, after disabling the assembler triangle setup code.
Quoted 1 line
From the documentation I think that P6FENCE should avoid instruction
reordering between I/O accesses. From the information here I think eieio (sp?) it the PPC instruction to use.
Yes if you look at the macos defines you see that they use eieio there
they seem to do lots of read/writes without ever doing an eieio but since it is working in macos i am not too worried.
Quoted 4 lines
- Problems: E - N - D - I - A - N. sigh...
/dev/3dfxreturns several values through a memory buffer. Guess... That's currently the point where glide fails.
They do all memory access through the GETxx SETxx defines you can
do the byteswapping there, the linux specific code doesn't use this though so you'll have to change this too.
Quoted 7 lines
Maybe I can free a few minutes this weekend to look deeper into it, but I plan to checkout the sourceforge version, too. Maybe there are already changes... I'd be happy if they fixed the build-system.
Jens
I managed to get glide (v3) running a couple of days ago in my voodoo3
its far from ready yet though, especially the autobump stuff is beyond my understanding yet, i get fifo lockups there :( in the macos side they seem to do call dcbf/dcbz to clear/flush the fifo but in our side the fb memory is uncached......
Jens maybe we should work together over this ? send my an email if you are intrested.
Kostas Gewrgiou
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 9 lines · Kostas Gewrgiou
Quoted 4 lines · Jens Ch. Restemeier
- Glide compiles, after disabling the assembler triangle setup code.
Quoted 1 line
From the documentation I think that P6FENCE should avoid instruction
reordering between I/O accesses. From the information here I think eieio (sp?) it the PPC instruction to use.
Yes if you look at the macos defines you see that they use eieio there
they seem to do lots of read/writes without ever doing an eieio but since it is working in macos i am not too worried.
If you use the *mb() macros instead of eieio(), you don't have to use #ifdefs and it'll work automagically on e.g. Alpha as well.
Quoted 7 lines
Quoted 3 lines
- Problems: E - N - D - I - A - N. sigh...
/dev/3dfxreturns several values through a memory buffer. Guess... That's currently the point where glide fails.They do all memory access through the GETxx SETxx defines you can
do the byteswapping there, the linux specific code doesn't use this though so you'll have to change this too.
Use read*()/write*() for all accesses to PCI memory space, as per linux/Documentation/IO-mapping.txt.
Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines
They do all memory access through the GETxx SETxx defines you can
do the byteswapping there, the linux specific code doesn't use this though so you'll have to change this too.Use read*()/write*() for all accesses to PCI memory space, as per
linux/Documentation/IO-mapping.txt.
I don't know if this applies to the problem, but I thought I would reference the VGA read/write routines in drivers/video/vga.h. If Glide has to talk to VGA registers, the functions in there should be best for most uses. They take endianness into account too.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 10 lines · Geert Uytterhoeven
Quoted 9 lines · Kostas Gewrgiou
Quoted 4 lines · Jens Ch. Restemeier
- Glide compiles, after disabling the assembler triangle setup code.
Quoted 1 line
From the documentation I think that P6FENCE should avoid instruction
reordering between I/O accesses. From the information here I think eieio (sp?) it the PPC instruction to use.
Yes if you look at the macos defines you see that they use eieio there
they seem to do lots of read/writes without ever doing an eieio but since it is working in macos i am not too worried.
This sort of depends on teh hw that you're talking to on the other side. If it is v2 or better then it will take care of doing 'hole counting' for you so that you don't need explicit fences to make the hw happy. If you're doing this for sst1 or sst96 then you will need to do fences so taht the command register on gets written after all of the command data has been settled.
Quoted 2 lines
If you use the
*mb()macros instead ofeieio(), you don't have to use #ifdefs and it'll work automagically on e.g. Alpha as well.
This I know less about, but these might fence more often than strictly necessary?
\p
---
The most vulnerable and yet most unconquerable of things is human vanity; nay, through being wounded its strength increases and can grow to giant proportions. --- Friedrich Nietzsche
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 5 lines · Peter Chang
Quoted 2 lines · Geert Uytterhoeven
If you use the
*mb()macros instead ofeieio(), you don't have to use #ifdefs and it'll work automagically on e.g. Alpha as well.This I know less about, but these might fence more often than strictly necessary?
wmb() is a barrier for writing.rmb() is a barrier for reading.mb() is a barrier for both and thus the `safest'.
The main advantage is that these are defined for all architectures, unlike eieio().
Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/