Skip to contentSkip to conversation

MPC8266 March-C memory test

PATCH New Rune Torgersen 3 participants 5 messages May 19, 2003 – May 23, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MPC8266 March-C memory test

Patch to do full March-C- memory test on the MPC8266ADS board.

Later on I will probably include it as a command, right now it runs as test_dram() which is called first thing after SDRAM is initializes, and before anything uses the SDRAM.

Note: Fast version uses floating point assembly and is therefore PPC specific. Generic version takes more than twice the amount of time to complete.
(Fast version: ~50 sec on 256MB RAM, slow version ~1:50 on 256MB RAM) ADS
Rune Torgersen
Software Developer
Innovative Systems
1000 Innovative Drive
Mitchell, SD 57301

Phone:  605-995-6120
Fax:  605-995-0084
email: runet at innovsys.com

www.innovsys.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_8266_memtest
Type: application/octet-stream
Size: 9652 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20030519/f94b67bd/attachment.obj

#1 lore raw

PATCH 1/1 MPC8266 March-C memory test

Should this also be portable to the 8xx[F]ADS platforms?

I am currently debugging UPM/memory problems, and a real memory test would be invaluable :)

Quoted 25 lines · Rune Torgersen

Patch to do full March-C- memory test on the MPC8266ADS board.

Later on I will probably include it as a command, right now it runs as test_dram() which is called first thing after SDRAM is initializes, and before anything uses the SDRAM.

Note: Fast version uses floating point assembly and is therefore PPC specific. Generic version takes more than twice the amount of time to complete.
(Fast version: ~50 sec on 256MB RAM, slow version ~1:50 on 256MB RAM) ADS
Rune Torgersen
Software Developer
Innovative Systems
1000 Innovative Drive
Mitchell, SD 57301

Phone:  605-995-6120
Fax:  605-995-0084
email: runet at innovsys.com

www.innovsys.com

Signature · 6 lines
Nye Liu
nliu at mrv.com
(818) 772-6235x248

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote
#2 lore raw

PATCH 1/1 MPC8266 March-C memory test

Quoted 1 line · In message <[email protected]> you wrote:

Should this also be portable to the 8xx[F]ADS platforms?

Please note that there is also extensive POST code for MPC8xx systems, which includes an IMHO excellent memory test.

Quoted 2 lines

I am currently debugging UPM/memory problems, and a real memory test would be invaluable :)

It won't help much. Usually memory tests test just the memory _contents_ using read and write accesses, while 99% of all RAM problems happen in burst mode, i. e. while fetching instructions or while doing DMA. I have yet to see a RAM test that catches this reliably.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Do not underestimate the value of print statements for debugging.
Don't have aesthetic convulsions when using them, either.
#3 lore raw

PATCH 1/1 MPC8266 March-C memory test

Stupid question:

Will load/store string/multiple cause a burst if i implement a test in asm?

Quoted 24 lines · Wolfgang Denk
Quoted 1 line · In message <[email protected]> you wrote:

Should this also be portable to the 8xx[F]ADS platforms?

Please note that there is also extensive POST code for MPC8xx systems, which includes an IMHO excellent memory test.

Quoted 2 lines

I am currently debugging UPM/memory problems, and a real memory test would be invaluable :)

It won't help much. Usually memory tests test just the memory _contents_ using read and write accesses, while 99% of all RAM problems happen in burst mode, i. e. while fetching instructions or while doing DMA. I have yet to see a RAM test that catches this reliably.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Do not underestimate the value of print statements for debugging.
Don't have aesthetic convulsions when using them, either.
Signature · 6 lines
Nye Liu
nliu at mrv.com
(818) 772-6235x248

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote
#4 lore raw

PATCH 1/1 MPC8266 March-C memory test

In reply to Rune Torgersen

Dear Rune,

Quoted 2 lines · in message <9F5558593173D21190EA0008C7B1769873138B@innsys1> you wrote:

Patch to do full March-C- memory test on the MPC8266ADS board.

I hesitate to include this.

First, as implemented now the code, while being generic for all boards using 860 class processors, is limited to the MPC8266ADS board. If we implement it, we should make it optional for all these boards.

Second, the code duplicates existing functionality (see the memory test code in post/memory.c). Instead of adding new versions of the same stuff again and again (and having to clean it all up later) we rather should get the post/ code working on your board, too.

Finally, there are some minor issues with your patch:
- there is no README documentation for the new CFG_ variables
- there are errors in the code; for example:

Review

Quoted 9 lines
(quoted diff) +9 -0
+int testdram (void)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	MEMDATATYPE *pstart = (MEMDATATYPE *) CFG_SDRAM_BASE;
+	MEMDATATYPE *pend;
+	MEMDATATYPE *p;
+	uint size;
+	uint erraddr;
+	pend = (MEMDATATYPE*)gd->ram_size;

This should read:

	pend = pstart + (gd->ram_size / sizeof(MEMDATATYPE));

What do you suggest how to proceed?

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
If a train station is a place where a train stops,
                                           then what's a workstation?