Subject: Re: vgahw and so on
To: Michael <macallan18@earthlink.net>
From: Matthieu Herrb <matthieu.herrb@laas.fr>
List: port-macppc
Date: 07/20/2004 09:58:58
Michael wrote:
> Hello,
> 
>> XFree86 already provides this level of abstraction, to handle the 
>> needed cache flushes (and even the various MMIO base adresses for 
>> multiple cards on different busses attached to different host bridges).
>>
>> See the xf86{Read,Write}Mmio() functions in 
>> xc/programs/Xserver/hw/xfree86/common/compiler.h.
> 
> 
> Ok, now I've found what's missing - NetBSD/macppc maps PCI IO space to 
> 0xf2000000 on my box and XFree86 doesn't know that. That's it. I'll 
> probably have it working for my card in the next few hours but a general 
> solution is a little more difficult, because the 2nd bandit found in 
> some PowerMacs would use a different address, and no idea what the other 
> PCI host-bridges do, we need some kind of generic solution here, but 
> that shouldn't be too difficult.

Look at the pci domain code in XFree86 
(xc/programs/Xserver/hw/xfree86/Domain.note). There is code to handle 
multiple PCI host bridges and probe their address from the OS. You may 
need to implement something in the NetBSD kernel to get the correct 
mappings for each host bridge tough, as probing it from userland is not 
  the right thing to do.



-- 
Matthieu Herrb