[U-Boot] [PATCH v2] common/memsize.c: Increase save array for supporting memory size > 4GB

tien.fong.chee at intel.com tien.fong.chee at intel.com
Wed Jun 20 07:06:20 UTC 2018


From: Tien Fong Chee <tien.fong.chee at intel.com>

In ARM 64-bits, memory size can be supported is more than 4GB,
hence increasing save array is needed to cope with testing larger memory.

Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
---

Changes in v2:
- Change save array size to save[BITS_PER_LONG - 1]
---
 common/memsize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/memsize.c b/common/memsize.c
index 5670e95..13b0047 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -26,7 +26,7 @@ DECLARE_GLOBAL_DATA_PTR;
 long get_ram_size(long *base, long maxsize)
 {
 	volatile long *addr;
-	long           save[31];
+	long           save[BITS_PER_LONG - 1];
 	long           save_base;
 	long           cnt;
 	long           val;
-- 
2.2.0



More information about the U-Boot mailing list