[U-Boot] [PATCH 1/7] common: Display >=4GiB memory bank size

Bin Meng bmeng.cn at gmail.com
Thu Jul 30 12:49:12 CEST 2015


bd->bi_dram[] has both start address and size defined as 32-bit,
which is not the case on some platforms where >=4GiB memory bank
is used. Change them to support such memory banks.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
---

 common/board_f.c             | 2 +-
 include/asm-generic/u-boot.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 21be26f..a8ed6c8 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -206,7 +206,7 @@ static int show_dram_config(void)
 	debug("\nRAM Configuration:\n");
 	for (i = size = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
 		size += gd->bd->bi_dram[i].size;
-		debug("Bank #%d: %08lx ", i, gd->bd->bi_dram[i].start);
+		debug("Bank #%d: %016llx ", i, gd->bd->bi_dram[i].start);
 #ifdef DEBUG
 		print_size(gd->bd->bi_dram[i].size, "\n");
 #endif
diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h
index c918049..4e8b481 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -130,8 +130,8 @@ typedef struct bd_info {
 	ulong	        bi_boot_params;	/* where this board expects params */
 #ifdef CONFIG_NR_DRAM_BANKS
 	struct {			/* RAM configuration */
-		ulong start;
-		ulong size;
+		unsigned long long start;
+		phys_size_t size;
 	} bi_dram[CONFIG_NR_DRAM_BANKS];
 #endif /* CONFIG_NR_DRAM_BANKS */
 } bd_t;
-- 
1.8.2.1



More information about the U-Boot mailing list