Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-07-24 Thread Wolfgang Denk
Dear IaMaPlAyEr, In message 2ae8403e0906242014k7e37b8f0tebaffaeeaea3f...@mail.gmail.com you wrote: I could not understand common/memsize.c, how it works? It writes markers at specific memory locations and then reads these back. The algorithm is chosen to be fast but still to be able to

Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-07-24 Thread Aggrwal Poonam-B10812
-Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Wolfgang Denk Sent: Friday, July 24, 2009 11:41 AM To: IaMaPlAyEr Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] hi, I could not understand the memsize.c,somebody help me

Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-07-24 Thread Detlev Zundel
Hi Aggrwal, I could not understand common/memsize.c, how it works? It writes markers at specific memory locations and then reads these back. The algorithm is chosen to be fast but still to be able to detect mirrored address ranges and other memory errors. Suppose I configure

Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-07-24 Thread Kenneth Johansson
On Fri, 2009-07-24 at 20:01 +0530, Aggrwal Poonam-B10812 wrote: I could not understand common/memsize.c, how it works? It writes markers at specific memory locations and then reads these back. The algorithm is chosen to be fast but still to be able to detect mirrored address ranges

Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-06-30 Thread Detlev Zundel
Hi, Thanks for your patient explanation, I acquired a lot. Glad if it helped. I just find in linux, arch/mips/bcm47xx/prom.c, there is a segment code just like what I suggest above. And move the code to my old box which bootloader is redboot, it works well. (Of course I also tryed

Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-06-29 Thread IaMaPlAyEr
hi~ thanks for your reply. sorry for my ability of writing and understanding the code =D btw, How contribute my idea of this function, I means, it should be more clean or easy just like this: unsigned long get_ram_size(volatile long *base, long maxsize) { unsigned long mem;

Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-06-29 Thread Detlev Zundel
Hi, thanks for your reply. sorry for my ability of writing and understanding the code =D btw, How contribute my idea of this function, I means, it should be more  clean or easy just like this: unsigned long get_ram_size(volatile long *base, long maxsize) {     unsigned long mem;  

Re: [U-Boot] hi, I could not understand the memsize.c, somebody help me?

2009-06-25 Thread Detlev Zundel
Hi ya, I could not understand common/memsize.c, how it works? Like a charm ;) maxsize / sizeof (long), what's meaning of it? why sizeof (long) is dividend? As the comment in line 50 states, cnt is used in pointer arithmetic, so addr is increased in sizeof(long) bytes. maxsize however is