2006/7/26, Attila Kinali <[EMAIL PROTECTED]>:
On Wed, 26 Jul 2006 12:21:59 +0200
"Nicolas Boulay" <[EMAIL PROTECTED]> wrote:

> 2006/7/26, Attila Kinali <[EMAIL PROTECTED]>:
> > On Wed, 26 Jul 2006 11:40:57 +0200

> > What you call generic IO is most probably just accessing the
> > card as if it were memory. That can be easily done in
> > user space if it has to be. Not even a driver needed.
>
> So, you don't have any memory checking, you could trash your system,
> etc.. And you have to understand everything between your card and your
> application code (Linux, pci bus, ...).

Not true. You map only the memory regions of the card into
your adress space. Not the whole adress space of the kernel.
Of course, this way you can always trash your card which in
turn can trash your system, but no generic driver can protect
against this anyways.

The "generic" drivers could be tailord for the OGD PCI bridge. When
you say that you don't need register, i beleived that you want to open
/dev/mem and write inside it.


> > > But most application want write to some card register, transfert data
> > > to and from the card. This thing fit well in some /dev/ device.
> >
> > Wont work for several reasons, most important that you cann hardly
> > write a generic driver that fits all.
> >
>
> Peripheric acces are always the same : register for configuration,
> chunck of memory transfert (for efficency).

Register are nothing more than memory locations in pci terms.
Please note that registers on a card are from the host point of
view something very different than register in a CPU.


:) I'm in hardware engenering since 5 years, thanks...

register in memory are often sensible to latency rather than bandwith.
And out of order writing are often a very bad idea. So there is a
difference, even if it's always memory adress.

> > Read LDD3[1], a pci driver that maps it's memory into some adress
> > space is written in something about 20-30 lines or so.
> > I assume that *BSD is about the same, no idea about windows and MacOS X.
>
> Surr but make it safe and clean, i much more that understanding 30
> lines of code.

Nope, that is already secure. The kernel does all the checks
there are, to make sure you cannot trash the system. And all
these checks are hidden from you behind a very simple interface.

Of course, as said above, you can totaly fuck up your card
as you have full control over it. But only a special written
driver that checks all input and ouput to the device can
protect against something like this.


                                Attila Kinali

--
心をこめて聞け心をこめて話せ

_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to