[U-Boot] Need input: Use Virtual address in commands; add translation/physical

Andrew Dyer amdyer at gmail.com
Thu Nov 27 18:06:01 CET 2008


>> I would love to see memory addresses get parsed through a common
>> routine - that would allow easily hooking in an arch/platform specific
>> routine to filter out addresses that should be avoided.
>
> U-Boot is not supposed to do any such filtering.
>
> "UNIX was not designed to stop you from doing stupid things,  because
> that would also stop you from doing clever things."       - Doug Gwyn
...
followed later by
...
> For every complex problem, there is a solution that is simple,  neat,
> and wrong.                                           -- H. L. Mencken

What about suicidal things like accessing a bus region that hangs the
machine, hitting the one address that resets the whole thing?  Yes, I
know that's broken design, but hardware like that exists, and is not
going to change because we wish it so.

Many times I've accidentally left some control character in the input
stream or typed one too many or too few zeros, and the address gets
parsed wrong, code accesses something it shouldn't and things lock up.
 I (sometimes) know what I'm doing, but I have customers who
(sometimes) don't.

How about this - have a weak function or #ifdef/#endif to call out to
a platform address checking routine (only on parsing an address, not
every access), but only if an environment variable is set.  That would
leave the default way of things, but allow people who are distributing
u-boot to others to try and make their system a bit more robust.

-- 
Hardware, n.:
        The parts of a computer system that can be kicked.


More information about the U-Boot mailing list