* [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code
@ 2012-09-10 6:16 Iwo Mergler
2012-09-18 19:06 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Iwo Mergler @ 2012-09-10 6:16 UTC (permalink / raw)
To: u-boot
The original memory sizing code in get_ram_size clobbers the word
at the base address, but forgets to restore it.
Signed-off-by: Iwo Mergler <Iwo.Mergler@netcommwireless.com>
---
common/memsize.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/common/memsize.c b/common/memsize.c
index 963e4f3..74cf075 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -73,6 +73,7 @@ long get_ram_size(long *base, long maxsize)
}
return (0);
}
+ *addr = save[i];
for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
addr = base + cnt; /* pointer arith! */
--
1.7.4.4
______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code
2012-09-10 6:16 [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code Iwo Mergler
@ 2012-09-18 19:06 ` Tom Rini
2012-09-21 11:15 ` Gerlando Falauto
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2012-09-18 19:06 UTC (permalink / raw)
To: u-boot
On Sun, Sep 09, 2012 at 08:16:58PM -0000, Iwo Mergler wrote:
> The original memory sizing code in get_ram_size clobbers the word
> at the base address, but forgets to restore it.
>
> Signed-off-by: Iwo Mergler <Iwo.Mergler@netcommwireless.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120918/805d82e3/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code
2012-09-18 19:06 ` Tom Rini
@ 2012-09-21 11:15 ` Gerlando Falauto
2012-09-21 15:16 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Gerlando Falauto @ 2012-09-21 11:15 UTC (permalink / raw)
To: u-boot
Hi,
this patch actually breaks the mpc83xx board I am currently working on,
leading to a detected size of 2 GiB (as opposed to the actual size of
128 MiB).
I tried reviewing it and couldn't really figure out why, as it seems
legitimate, and I currently don't have a chance to check it on other boards.
But I just tripled checked it and I am sure it's the root cause of my
AAAAAAAAAAAARGGGGGGGGGGGHHHHHHHHHHHHHHHH! :-)
Anyone ever tried it?
Thanks,
Gerlando
On 09/18/2012 09:06 PM, Tom Rini wrote:
> On Sun, Sep 09, 2012 at 08:16:58PM -0000, Iwo Mergler wrote:
>
>> The original memory sizing code in get_ram_size clobbers the word
>> at the base address, but forgets to restore it.
>>
>> Signed-off-by: Iwo Mergler<Iwo.Mergler@netcommwireless.com>
>
> Applied to u-boot/master, thanks!
>
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code
2012-09-21 11:15 ` Gerlando Falauto
@ 2012-09-21 15:16 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2012-09-21 15:16 UTC (permalink / raw)
To: u-boot
On 09/21/12 04:15, Gerlando Falauto wrote:
> Hi,
>
> this patch actually breaks the mpc83xx board I am currently working on,
> leading to a detected size of 2 GiB (as opposed to the actual size of
> 128 MiB).
> I tried reviewing it and couldn't really figure out why, as it seems
> legitimate, and I currently don't have a chance to check it on other
> boards.
> But I just tripled checked it and I am sure it's the root cause of my
> AAAAAAAAAAAARGGGGGGGGGGGHHHHHHHHHHHHHHHH! :-)
>
> Anyone ever tried it?
Confirmed, reverted. Thanks for the report.
--
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-21 15:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-10 6:16 [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code Iwo Mergler
2012-09-18 19:06 ` Tom Rini
2012-09-21 11:15 ` Gerlando Falauto
2012-09-21 15:16 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox