Tool/software:
Dear TI,
We have vmalloc problem when insmod module after update kernel to SDK 09.02.01.09 (SDK from https://www.ti.com/tool/PROCESSOR-SDK-AM62X)
Our system using falcon boot mode with 512 MB of Ram (boot seq: sbl1->sbl2->Linux).
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Dear TI,
We have vmalloc problem when insmod module after update kernel to SDK 09.02.01.09 (SDK from https://www.ti.com/tool/PROCESSOR-SDK-AM62X)
Our system using falcon boot mode with 512 MB of Ram (boot seq: sbl1->sbl2->Linux).
Hi Tran,
We have vmalloc problem when insmod module after update kernel to SDK 09.02.01.09
When you say "after update kernel", do you mean you don't have such issue in older SDK? if so, which SDK version is it?
Hi Tran,
As mentioned in the referred e2e thread above, the vmalloc error issue is till open, we don't know the root cause yet.
What is the boot time requirement in your project? If it is not very aggressive, we probably can achieve it without using falcon boot.
Hi Tran,
The root cause of the issue is that kernel Image is loaded to 0x80080000 in falcon boot which is not 2MB aligned.
Here is how to fix the issue:
Apply the following patch to ATF source code and rebuild ATF. This patch changes the kernel image load address from 0x80080000 to 0x80200000.
diff --git a/plat/ti/k3/common/k3_bl31_setup.c b/plat/ti/k3/common/k3_bl31_setup.c index bbfb5bbfce1c..08fb296e7811 100644 --- a/plat/ti/k3/common/k3_bl31_setup.c +++ b/plat/ti/k3/common/k3_bl31_setup.c @@ -80,6 +80,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, bl33_image_ep_info.pc = PRELOADED_BL33_BASE; bl33_image_ep_info.spsr = k3_get_spsr_for_bl33_entry(); SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE); + NOTICE("BL33 base: 0x%x\n", PRELOADED_BL33_BASE); #ifdef K3_HW_CONFIG_BASE /* diff --git a/plat/ti/k3/platform.mk b/plat/ti/k3/platform.mk index bce9ef176b3c..f1a008ed4251 100644 --- a/plat/ti/k3/platform.mk +++ b/plat/ti/k3/platform.mk @@ -13,7 +13,7 @@ include ${PLAT_PATH}/board/${TARGET_BOARD}/board.mk BL32_BASE ?= 0x9e800000 $(eval $(call add_define,BL32_BASE)) -PRELOADED_BL33_BASE ?= 0x80080000 +PRELOADED_BL33_BASE ?= 0x80200000 $(eval $(call add_define,PRELOADED_BL33_BASE)) K3_HW_CONFIG_BASE ?= 0x82000000
Copy the new ATF binary bl31.bin to the location where tispl.bin for falcon boot is generated, and modify tispl.its to update kernel load address from 0x80080000 to 0x80200000 as shown below.
--- tispl.its.orig 2024-05-13 10:24:36.778898086 -0500 +++ tispl.its 2024-05-31 13:38:19.486587979 -0500 @@ -42,8 +42,8 @@ os = "Linux"; arch = "arm64"; compression = "none"; - load = <0x80080000>; - entry = <0x80080000>; + load = <0x80200000>; + entry = <0x80200000>; }; fdt1 { description = "kernel fdt";