[U-Boot-Users] Some puzzles on dram_size()

Wolfgang Denk wd at denx.de
Mon Jan 5 16:20:26 CET 2004

In message <20040105064054.54073.qmail at web15201.mail.bjs.yahoo.com> you wrote:
> Breakpoint 6, dram_size (mamr_value=546328576,
> base=0x0, maxsize=67108864) at RPXlite.c:199
> (gdb) d b
> (gdb) step
> (gdb) step
> (gdb) step
> (gdb) step
> (gdb) step
> (gdb) step
> (gdb) step

Instead of using DDD where nobody can see what's going  on  it  would
have  been much more useful to use plain GDB so we could see at which
line this happened. Also, setting "d/i $pc" is usually very useful.

> Program received signal SIGSTOP, Stopped (signal).
> 0x00001000 in ?? ()
> (gdb) 
> By DDD,I could see the code executed  to the following
> cycle and hanged after one cycle.At the same time,cnt
> and maxsize equal to 16777216 and 67108864
> respectively.
> for (cnt = maxsize/sizeof(long); cnt > 0; cnt >>= 1) {
>         addr = base + cnt;	/* pointer arith! */
>         save[i++] = *addr;
>         *addr = ~cnt;
>     }

Really? With just 8 steps I would think you should  not  be  able  to
perform the init part of the function plus two full loops through the

> > How big is your SDRAM_MAX_SIZE #defined? And how big
> > is your actual RAM?
> I set SDRAM_MAX_SIZE as 0x04000000 according to two
> MT48LC16M16A2TG£­75 on LITE_DW.

So it seems the problem hapens when you actually access the  RAM  for
the  first time. The previous cycles through the test loop were still
outside the available RAM area (testing at 64 MB and 32 MB);

> Thank you for your notes.Actually,I cannot help
> suspect that address multiplexing on LITE_DW makes the
> problems.I notice that A6mpc is connected to A12sd but
> A8mpc and A7mpc linking BA0sd and BA1sd on
> LITE_DW.Some documents from Micron Technical
> Notes,howerever, say the MSB for the SDRAM are the
> bank address lines BA1 and BA0.I am a little confused
> by these authoritative reference.Which one is better
> for practice?Is it related with above phenomenon?

Sorry, but I don't know anything about the RPXlite hardware.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Machines take me by surprise with great frequency.      - Alan Turing

More information about the U-Boot mailing list