Ronald G Minnich <[EMAIL PROTECTED]> writes: > yes, but ... the whole point of this kind of card is to direct-map control > registers in user space. There are lots of cards like this -- myrinet, > quadrics, graphics, etc. If the BIOS sets things up in a non-page-aligned > way, the driver still has to allow the mapping, or the card can not be > used.
I guess it depends on how bad your average BIOS is. If you generally have a good BIOS it isn't to bad. > I see three bugs: > 1) hardware bug -- for cards which are intended to be user-mapped, the > hardware should ALWAYS indicate a BAR size of >= 4096 bytes. But ... > 2) BIOS bug. (1) doesn't help on architectures with big page sizes -- > Alpha with 8192 byte pages, or other machines with 16384 or larger pages. > How big should the minimum BAR be? it is clear, however, that 256 bytes is > wrong. > 3) driver bug. I fixed it this way. If drivers find that user-mapped BARs > are not on unique pages they should relocate them. But this can be totally > impossible in some circumstances. > Summary: the BIOS should set up BAR registers in a VM-friendly way. Not > all BIOSes do this. LinuxBIOS does, hurrah! Hurrah! With a little more maturity we can advertise as: LinuxBIOS the BIOS that works! Eric
