Skip to contentSkip to conversation

ARM: Fix malloc area size for versatile and integrator

PATCH New Marek Vasut 3 participants 6 messages Mar 17, 2012 – Feb 2, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Fix malloc area size for versatile and integrator

These boards couldn't save their environment because they couldn't malloc() the whole size of the sector.

---
 include/configs/integratorcp.h |    2 +-
 include/configs/versatile.h    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/configs/integratorcp.h +1 -1
index 57610a6..511fa1f 100644
@@ -56,7 +56,7 @@
 /*
  * Size of malloc() pool
  */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SECT_SIZE + 128*1024)
 
 /*
  * Hardware drivers
include/configs/versatile.h +1 -1
index bb835e0..6a9aa30 100644
@@ -71,7 +71,7 @@
  * Size of malloc() pool
  */
 #define CONFIG_ENV_SIZE			8192
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SECT_SIZE + 128 * 1024)
 
 /*
  * Hardware drivers
Signature · 1 line
1.7.9
#2 lore raw

PATCH 1/1 ARM: Fix malloc area size for versatile and integrator

Dear Linus Walleij,

Quoted 11 lines · Marek Vasut
Quoted 5 lines

These boards couldn't save their environment because they couldn't malloc() the whole size of the sector.

Thanks!
Linus Walleij

You're welcome, we're now running daily u-boot tests on qemulated integrator ;-)

Best regards,
Marek Vasut

#3 lore raw

PATCH v2 1/1 ARM: Fix malloc area size for versatile and integrator

In reply to Marek Vasut

These boards couldn't save their environment because they couldn't malloc() the whole size of the sector.

---
 include/configs/integrator-common.h |    3 ++-
 include/configs/versatile.h         |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

V2: Align with current code

include/configs/integrator-common.h +2 -1
index 564b418..51227e7 100644
@@ -37,7 +37,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
 #define CONFIG_SYS_MAXARGS		16	/* max number of command args */
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SECT_SIZE + 128*1024)
 
 #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
 #define CONFIG_SETUP_MEMORY_TAGS
include/configs/versatile.h +1 -1
index a65c676..2484881 100644
@@ -71,7 +71,7 @@
  * Size of malloc() pool
  */
 #define CONFIG_ENV_SIZE			8192
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SECT_SIZE + 128 * 1024)
 
 /*
  * Hardware drivers
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH v2 1/1 ARM: Fix malloc area size for versatile and integrator

Hi Marek,

Quoted 31 lines · Marek Vasut

These boards couldn't save their environment because they couldn't malloc() the whole size of the sector.

---
 include/configs/integrator-common.h |    3 ++-
 include/configs/versatile.h         |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

V2: Align with current code

include/configs/integrator-common.h +2 -1
index 564b418..51227e7 100644
@@ -37,7 +37,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
 #define CONFIG_SYS_MAXARGS		16	/* max number of command args */
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SECT_SIZE + 128*1024)
 
 #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
 #define CONFIG_SETUP_MEMORY_TAGS
include/configs/versatile.h +0 -0
index a65c676..2484881 100644

include/configs/versatile.h line 77

Quoted 8 lines
include/configs/versatile.h +1 -1
@@ -71,7 +71,7 @@
  * Size of malloc() pool
  */
 #define CONFIG_ENV_SIZE			8192
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SECT_SIZE + 128 * 1024)
 
 /*
  * Hardware drivers

This does not build properly on current ARM ToT:

board.c:395:19: error: 'CONFIG_ENV_SECT_SIZE' undeclared (first use in this function)

All 4 of integratorap_cm720t integratorap_cm920t integratorap_cm926ejs integratorap_cm946es fail.

Amicalement,

Signature · 1 line
Albert.
#5 lore raw

PATCH v2 1/1 ARM: Fix malloc area size for versatile and integrator

Dear Albert ARIBAUD,

Quoted 22 lines

Hi Marek,

Quoted 19 lines · Marek Vasut

These boards couldn't save their environment because they couldn't malloc() the whole size of the sector.

---

 include/configs/integrator-common.h |    3 ++-
 include/configs/versatile.h         |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

V2: Align with current code

(quoted diff) +0 -0

b/include/configs/integrator-common.h index 564b418..51227e7 100644

include/configs/integrator-common.h +0 -0
@@ -37,7 +37,8 @@
 
Quoted 3 lines

include/configs/integrator-common.h line 40

Quoted 3 lines
include/configs/integrator-common.h +0 -0
 #define
 CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
 #define CONFIG_SYS_MAXARGS		16	/* max number of command args */ 

#define

Quoted 1 line

include/configs/integrator-common.h line 41

Quoted 1 line
include/configs/integrator-common.h +0 -0
 CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot Argument 

Buffer Size*/

Quoted 2 lines

include/configs/integrator-common.h line 42

Quoted 2 lines
include/configs/integrator-common.h +0 -1
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024) /* 

Size of

Quoted 2 lines
Quoted 2 lines

malloc() pool */ +/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SECT_SIZE +

128*1024)

Quoted 10 lines
Quoted 10 lines

#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
#define CONFIG_SETUP_MEMORY_TAGS

include/configs/versatile.h +0 -0
index a65c676..2484881 100644
@@ -71,7 +71,7 @@
 
Quoted 7 lines

include/configs/versatile.h

Quoted 7 lines
include/configs/versatile.h +1 -1
  * Size of malloc() pool
  */
 
 #define CONFIG_ENV_SIZE			8192
 
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SECT_SIZE + 128 * 

1024)

Quoted 5 lines
Quoted 4 lines

/*

* Hardware drivers

Quoted 7 lines

This does not build properly on current ARM ToT:

board.c:395:19: error: 'CONFIG_ENV_SECT_SIZE' undeclared (first use in this function)

All 4 of integratorap_cm720t integratorap_cm920t integratorap_cm926ejs integratorap_cm946es fail.

Yea well, the original patch is like one year old now ... I guess these things happen.

Best regards,
Marek Vasut