Skip to contentSkip to conversation

mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

PATCH New Fabio Estevam 3 participants 9 messages May 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

From: Fabio Estevam <[email protected]>

Scan only first 512 MB of DRAM to avoid memory wraparound.

This fixes mx28evk boot and it follows the same idea of commit 19a2066b57 (M28: Scan only first 512 MB of DRAM to avoid memory wraparound)

---
 include/configs/mx28evk.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/mx28evk.h +1 -1
index 0c18e50..a4ea12d 100644
@@ -75,7 +75,7 @@
  */
 #define CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */
 #define PHYS_SDRAM_1			0x40000000	/* Base address */
-#define PHYS_SDRAM_1_SIZE		0x40000000	/* Max 1 GB RAM */
+#define PHYS_SDRAM_1_SIZE		0x20000000	/* Max 512MB RAM */
 #define CONFIG_STACKSIZE		(128 * 1024)	/* 128 KB stack */
 #define CONFIG_SYS_MALLOC_LEN		0x00400000	/* 4 MB for malloc */
 #define CONFIG_SYS_MEMTEST_START	0x40000000	/* Memtest start adr */
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

Dear Fabio Estevam,

Quoted 6 lines

From: Fabio Estevam <[email protected]>

Scan only first 512 MB of DRAM to avoid memory wraparound.

This fixes mx28evk boot and it follows the same idea of commit 19a2066b57 (M28: Scan only first 512 MB of DRAM to avoid memory wraparound)

Thanks, sorry for the breakage.

btw. I think Otavio was working on some common config, wasn't he? btw2. won't there ever be MX28EVK with more than 512MB of DRAM?

Quoted 11 lines
---
 include/configs/mx28evk.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/mx28evk.h +0 -0
index 0c18e50..a4ea12d 100644

include/configs/mx28evk.h line 80

Quoted 7 lines
include/configs/mx28evk.h +1 -1
@@ -75,7 +75,7 @@
  */
 #define CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */
 #define PHYS_SDRAM_1			0x40000000	/* Base address */
-#define PHYS_SDRAM_1_SIZE		0x40000000	/* Max 1 GB RAM */
+#define PHYS_SDRAM_1_SIZE		0x20000000	/* Max 512MB RAM */
 #define CONFIG_STACKSIZE		(128 * 1024)	/* 128 KB stack */
 #define CONFIG_SYS_MALLOC_LEN		0x00400000	/* 4 MB for 

malloc */

include/configs/mx28evk.h line 81

Quoted 1 line
include/configs/mx28evk.h +0 -0
 #define CONFIG_SYS_MEMTEST_START	0x40000000	/* Memtest start adr */

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

Quoted 5 lines · Marek Vasut

Thanks, sorry for the breakage.

btw. I think Otavio was working on some common config, wasn't he?

Yes, I think Otavio is working on that.

Quoted 1 line

btw2. won't there ever be MX28EVK with more than 512MB of DRAM?

I don't think there will be other revision of mx28evk board.

Regards,

Fabio Estevam

#3 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

Dear Fabio Estevam,

Quoted 8 lines · Marek Vasut
Quoted 5 lines

Thanks, sorry for the breakage.

btw. I think Otavio was working on some common config, wasn't he?

Yes, I think Otavio is working on that.

That'd be so cool ... :)

Quoted 4 lines
Quoted 2 lines

btw2. won't there ever be MX28EVK with more than 512MB of DRAM?

I don't think there will be other revision of mx28evk board.

All right, this approach is valid then. Btw. Fabio, can you verify that you don't see any memory aliasing now (just to avoid trouble).

Quoted 3 lines

Regards,

Fabio Estevam

Best regards,
Marek Vasut

#4 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

Quoted 2 lines · Marek Vasut

All right, this approach is valid then. Btw. Fabio, can you verify that you don't see any memory aliasing now (just to avoid trouble).

How can I verify this, please?

Regards,

Fabio Estevam

#5 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

Dear Fabio Estevam,

Quoted 5 lines · Marek Vasut
Quoted 2 lines

All right, this approach is valid then. Btw. Fabio, can you verify that you don't see any memory aliasing now (just to avoid trouble).

How can I verify this, please?

Try writing some pattern into DRAM at "offset-sizeof(pattern area)" and try reading it from "2*offset + sizeof(pattern area)" ... try doing the same for 4*offset etc.

You might also be able to read data from memory behind what uboot considers as detected DRAM which will have the same contents as the detected DRAM etc.

Quoted 4 lines

Regards,

Fabio Estevam

Best regards,
Marek Vasut

#6 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

In reply to Marek Vasut
Quoted 2 lines · Marek Vasut

All right, this approach is valid then. Btw. Fabio, can you verify that you don't see any memory aliasing now (just to avoid trouble).

Actually I think it would be better to define the total size of RAM for mx28evk as 128MB.

Do you agree?

Regards,

Fabio Estevam

#7 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

Dear Fabio Estevam,

Quoted 8 lines · Marek Vasut
Quoted 2 lines

All right, this approach is valid then. Btw. Fabio, can you verify that you don't see any memory aliasing now (just to avoid trouble).

Actually I think it would be better to define the total size of RAM for mx28evk as 128MB.

Do you agree?

Yes, it's fine with me.

Quoted 4 lines

Regards,

Fabio Estevam

Best regards,
Marek Vasut

#8 lore raw

PATCH 1/1 mx28evk: Scan only first 512 MB of DRAM to avoid memory wraparound

In reply to Fabio Estevam

Dear Fabio Estevam,

Quoted 6 lines · In message <[email protected]> you wrote:

From: Fabio Estevam <[email protected]>

Scan only first 512 MB of DRAM to avoid memory wraparound.

This fixes mx28evk boot and it follows the same idea of commit 19a2066b57 (M28: Scan only first 512 MB of DRAM to avoid memory wraparound)

Actually I think this should not be needed. Such wrap-arounds are supposed to be detected by get_ram_size(), which should result in properly sized RAM mappings.

Why is this failing here?

Best regards,

Wolfgang Denk

Signature · 6 lines
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
He'd heard her use that sweet, innocent  tone  of  voice  before.  It
meant that, pretty soon, there was going to be trouble.
                                        - Terry Pratchett, _Truckers_