linux kernel loading stucks

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

linux kernel loading stucks

跳至解决方案
1,425 次查看
0xEC
Contributor IV

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. 

0xEC_0-1691742466983.png

 

Do you have any idea about what is wrong with my yocto build?

best,

0 项奖励
回复
1 解答
1,371 次查看
0xEC
Contributor IV
hi @MayanksPatel,
Yes i also open ticket from nxp support but not received any reply, by the way i could solve the problem by changing text and data start address of u-boot, thanks we can close this ticket and 557217 also.
best,

在原帖中查看解决方案

0 项奖励
回复
6 回复数
1,132 次查看
swhite39
Contributor II

Can you share the solution to this issue? I am having similar issues

0 项奖励
回复
1,125 次查看
0xEC
Contributor IV

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,

0 项奖励
回复
1,117 次查看
swhite39
Contributor II

Thank you so much for responding! Very much appreciated!!

0 项奖励
回复
1,099 次查看
0xEC
Contributor IV

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. 

0 项奖励
回复
1,382 次查看
MayanksPatel
NXP Employee
NXP Employee

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

0 项奖励
回复
1,372 次查看
0xEC
Contributor IV
hi @MayanksPatel,
Yes i also open ticket from nxp support but not received any reply, by the way i could solve the problem by changing text and data start address of u-boot, thanks we can close this ticket and 557217 also.
best,
0 项奖励
回复