hi everyone,
I have custom board derived from s32g274a-rdb2 board and working with embedded linux compiled by yocto build env. in custom board i have 2GB LPDDR4 RAM instead of 4GB LPDDR4 in RDB2 board, so i changed DDR RAM initialization code in TF-A source code taken from S32DS DDR tool and also commented out PHYS_SDRAM2 which is second 2GB ram region in 4gb version in u-boot source code. Now ATF and u-boot works fine but while u-boot trying to start kernel it stucks at the point where i guess the DMA initialization. i added starting log below.
Do you have any idea about what is wrong with my yocto build?
best,
解決済! 解決策の投稿を見る。
Can you share the solution to this issue? I am having similar issues
hi swhite,
if you change DDR size because i had this issue and reason was changing DDR size from 4GB to 2GB, you should change ram start address in in u-boot source code as follows:
config SYS_TEXT_BASE
hex "Text Base" if CUSTOM_SYS_TEXT_BASE
- default 0xffaa0000
+ default 0xefaa0000
config SYS_LOAD_ADDR
hex "Address in memory to use by default"
@@ -33,7 +33,7 @@ config CUSTOM_SYS_DATA_BASE
config SYS_DATA_BASE
hex "Data Base" if CUSTOM_SYS_DATA_BASE
- default 0xffa00000
+ default 0xefa00000
help
U-Boot data base address in DDR.
this changes are performed in Kconfig file you can do it in menuconfig this is official way, also i commented out sram define in s32-cc.h in uboot as follows:
#define PHYS_SDRAM_1 0x80000000UL
#define PHYS_SDRAM_1_SIZE (SZ_2G)
-#define PHYS_SDRAM_2 0x880000000UL
-#define PHYS_SDRAM_2_SIZE (SZ_2G)
+//#define PHYS_SDRAM_2 0x880000000UL
+//#define PHYS_SDRAM_2_SIZE (SZ_2G)
last change that i performed which is in atf source code, in s32_platform_def.h file as follows:
/* Top of the first 2GB bank of physical memory. */
#ifndef S32_PLATFORM_DDR0_END
-#define S32_DDR0_END 0xffffffff
+#define S32_DDR0_END 0xefffffff
#else
#define S32_DDR0_END S32_PLATFORM_DDR0_END
#endif
if you have same issue, these changes must solve the problem.
take it easy,
Thank you so much for responding! Very much appreciated!!
hi @swhite39
sorry i forgot the mentioned about ddr initialization code that you must generate from S32DS according to your new DDR ram specs.
you must use s32ds DDR Tool and generate ddr_init sources from there and you must change Makefile in TF-A by adding CUSTOM_DDR_DRV variable and set it to path of ddr_init source code that you generate from S32DS.
no need to change anything in linux kernel itself about DDR size or something because before linux kernel is loaded, all DDR related tasks must done by U-boot and TF-A.
Hi @0xEC,
Thank you for reaching out to us.
We have received your ticket and this is the duplicate of another ticket raised by you.
We will work on that and provide an update to you on ticket#577217.
Hence, Closing this ticket.
Thanks,
Mayank S Patel