Subject: Re: Panic: MMU fault :(
To: maximum entropy <entropy@zippy.bernstein.com>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: port-atari
Date: 01/05/1998 21:11:03
maximum entropy wrote:
> The uiomove() call in leomove() copies in or out based on the
> information in the struct uio.  Therefore the read and write entry
> points can do the same thing; they simply delegate the work to
> uiomove() which will do the right thing in either case.

Thanks.  I should have looked at the correct bit of source and I would
have seen this!  I'll try not to post late at night again ;-)

> The leonardo read/write code is actually faulty, but for another
> reason.  I took some shortcuts with bus space handles to generate
> virtual addresses.  The shortcuts I took work correctly (for now) but
> are clearly wrong because my code has no business "knowing" what these
> handles mean.  See the recent discussion on tech-kern.

(has a browse through the tech-kern archives ... perhaps I should subscribe)

Ar!  I understand why uimove() is bad.  However, I've now got more
questions :)  Why use bus_space_read_multi_1()?  Shouldn't it use
bus_space_read_region_1() or am I missing something else that is obvious?
And, presuambly, length could be up to the size of the memory on the card,
so you'd want to do many read/writes to and from buf until you'd read/written
enough.  Or, should you just define a maximum size to read/write and leave
it up to the user process to iterate over the address space if it wants?
(sorry for so many questions - I'm trying to understand it all)

J

-- 
    1024/55A5BC19        0F 3F 62 56 18 10 8B 84  43 8F F4 94 93 37 76 AA

S.E.P.