[U-Boot] [PATCH] Use memcpy in print_buffer to fix unaligned dumps
Wolfgang Denk
wd at denx.de
Tue Jun 29 14:57:51 CEST 2010
Dear Anatolij,
I wrote:
> > Use memcpy in print_buffer() to fix the problem.
>
> NAK. This violates the design of the command.
>
> > for (i = 0; i < linelen; i++) {
> > if (width == 4) {
>
> The "width == 4" part means that we want to access the memory with 32
> bit accesses - nothing else.
Also note that the fix would be incomplete - the same issue happens
with unaligned 16 bit accesses:
=> md.w FC0C0000 10
fc0c0000: 7012 ab65 0161 6464 636f 6e73 3d73 6574 p..e.addcons=set
fc0c0010: 656e 7620 626f 6f74 6172 6773 2024 7b62 env bootargs ${b
=> md.w FC0C0001 10
fc0c0001: 007b 6501 0000 6463 0000 733d 0000 7465 .{e...dc..s=..te
fc0c0011: 0000 2062 0000 7461 0000 7320 0000 626f .. b..ta..s ..bo
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Politics: A strife of interests masquerading as a contest of
principles. The conduct of public affairs for private advantage.
- Ambrose Bierce
More information about the U-Boot
mailing list