[U-Boot-Users] Atmel DataFlash hooks.

Wolfgang Denk wd at denx.de
Tue Jan 30 01:01:12 CET 2007


In message <45BE7D37.5090601 at comcast.net> you wrote:
>
> >>bring it up for completeness. cp.l commands that look like they for sure 
> >>should generate an alignment exception will not do so if the destination 
> >>is flash.
> >
> >Why should they?
> >
> Well, my thought on this is that UNIX (and u-boot) also follows the 
> Principle of Least Surprise, namely that like cases tend to work alike. 
> If  I type cp.l 0x3 0x10 0x1 on a system that enforces longword (4 byte 
> words) to be aligned, it will throw an exception and not work. I would 

Note that it will trap on the unaligned read access at address 0x3.

> therefore also expect cp.l 0x3 <some flash address> 0x1 to also throw an 
> exception and not work for the same reason, yet it does not do so. It is 

It should trap as well on the unaligned read access at address 0x3 -
it should not matter at all what the target address is.

> executed as cp.b 0x3 <some flash address> 0x1, which is not what I asked 

It's more in the equivalent of "cp.b 3 <flash address> 4"

> for. Like I said, this is a nit and probably not important. I expect few 
> people use cp.l to copy into flash anyway. It was just a difference 
> between flash and ram that I noticed.

Indeed, there is a difference.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A memorandum is written not to inform the reader, but to protect  the
writer.                                               -- Dean Acheson




More information about the U-Boot mailing list