native crash and low mem when take monkey test with LPDDR 4GB in imx8Mq evk

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

native crash and low mem when take monkey test with LPDDR 4GB in imx8Mq evk

5,605件の閲覧回数
94393400
Contributor III

native crash and low mem when take monkey test with LPDDR 4GB in imx8Mq evk

Hi,

our device use:

Android release is:  p9.0.0_2.0.0-ga

Linux version 4.14.98

the uboot is 3GB in default, and we do changes to 4GB as blew:

1、use the MX8M_LPDDR4_RPA_v24.xlsx and  datasheet to make .ds file;

2、use the mscale_ddr_tool_v3.10  to do stress test and generate the lpddr4_timing.c 

3、copy the lpddr4_timing to uboot-imx\board\freescale\imx8mq_evk directory.

4、change the codes:

      (1) add codes in imx8mq_evk.c

 --- a/board/freescale/imx8mq_evk/imx8mq_evk.c
+++ b/board/freescale/imx8mq_evk/imx8mq_evk.c
@@ -97,6 +97,27 @@ int dram_init(void)
gd->ram_size = PHYS_SDRAM_SIZE - rom_pointer[1];
else
gd->ram_size = PHYS_SDRAM_SIZE;
+
+#if CONFIG_NR_DRAM_BANKS > 1
+ gd->ram_size += PHYS_SDRAM_2_SIZE;
+#endif
+
+
+ return 0;
+}
+
+int dram_init_banksize(void)
+{
+ gd->bd->bi_dram[0].start = PHYS_SDRAM;
+ if (rom_pointer[1])
+ gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE -rom_pointer[1];
+ else
+ gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+
+#if CONFIG_NR_DRAM_BANKS > 1
+ gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+ gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+#endif

return 0;
}
@@ -392,3 +413,11 @@ int get_imx8m_baseboard_id(void)
return IMX8M_REF_3G;
}
#endif
+
+phys_size_t get_effective_memsize(void)
+{
+ if (rom_pointer[1])
+ return (PHYS_SDRAM_SIZE - rom_pointer[1]);
+ else
+ return PHYS_SDRAM_SIZE;
+}

      (2)  add two banks in imx8mq_evk.h

--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -212,7 +212,9 @@
#define CONFIG_SYS_SDRAM_BASE 0x40000000
#define PHYS_SDRAM 0x40000000
#define PHYS_SDRAM_SIZE 0xC0000000 /* 3GB DDR */
-#define CONFIG_NR_DRAM_BANKS 1
+#define PHYS_SDRAM_2 0x100000000
+#define PHYS_SDRAM_2_SIZE 0x40000000 /* 1GB DDR */
+#define CONFIG_NR_DRAM_BANKS 2

and then build a firmware load into the device.

There is no error to use the mscale_ddr_tool_v3.10 do Calibration and stress test

*************************************************************************
ARM clock(CA53) rate: 800MHz
DDR Clock: 1600MHz

============================================
DDR configuration
DDR type is LPDDR4
Data width: 32, bank num: 8
Row size: 16, col size: 10
Two chip selects are used
Number of DDR controllers used on the SoC: 1
Density per chip select: 2048MB
Density per controller is: 4096MB
Total density detected on the board is: 4096MB

============ Step 1: DDRPHY Training... ============
---DDR 1D-Training @1600Mhz...
[Process] End of CA training
[Process] End of initialization
[Process] End of read enable training
[Process] End of fine write leveling
[Process] End of read DQ deskew training
[Process] End of MPR read delay center optimization
[Process] End of Write Leveling coarse delay
[Process] End of write delay center optimization
[Process] End of read delay center optimization
[Process] End of max read latency training
[Result] PASS
---DDR 1D-Training @200Mhz...
[Process] End of CA training
[Process] End of initialization
[Process] End of read enable training
[Process] End of fine write leveling
[Process] End of MPR read delay center optimization
[Process] End of Write Leveling coarse delay
[Process] End of write delay center optimization
[Process] End of read delay center optimization
[Process] End of max read latency training
[Result] PASS
---DDR 1D-Training @50Mhz...
[Process] End of CA training
[Process] End of initialization
[Process] End of read enable training
[Process] End of fine write leveling
[Process] End of MPR read delay center optimization
[Process] End of Write Leveling coarse delay
[Process] End of write delay center optimization
[Process] End of read delay center optimization
[Process] End of max read latency training
[Result] PASS
---DDR 2D-Training @1600Mhz...
[Process] End of initialization
[Process] End of 2D read delay/voltage center optimization
[Process] End of 2D read delay/voltage center optimization
[Process] End of 2D write delay/voltage center optimization
[Process] End of 2D write delay/voltage center optimization
[Result] PASS

============ Step 2: DDR memory accessing... ============
Verifying DDR frequency point0@1600MHz.......Pass
Verifying DDR frequency point1@200MHz.......Pass
Verifying DDR frequency point2@50MHz.......Pass
[Result] OK

============ Step 3: DDR parameters processing... ============
[Result] Done

Success: DDR Calibration completed!!!

But when we use monkey test app to test, there is a native crash and low mem

Process: system_server
Subject: Low on memory -- 500MB total / 120MB system / 40MB systemui / 5MB WebViewLoader-arm64-v8a 5MB bluetooth / 40MB pinyin
Build: Android/kwe1901/kwe1901:9/2.0.0-ga-rc4/v0.0:userdebug/dev-keys

Low on memory:500MB.total$120MB.system$40MB.systemui$5MB.WebViewLoader-arm64-v8a$5MB.bluetooth:
at 40MB.pinyin(Foreground:0)
ntv ?? 51867: zygote (pid 9568) native
ntv ?? 46467: zygote64 (pid 9567) native
ntv ?? 28213: surfaceflinger (pid 3058) native
ntv ?? 11043: media.codec (pid 3079) native
ntv ?? 10443: audioserver (pid 9569) native
ntv ?? 7921: media.extractor (pid 3072) native
ntv ?? 6436: android.hardware.audio@2.0-service (pid 9574) native
ntv ?? 5711: mediaserver (pid 9571) native
ntv ?? 5671: qca_wpa_supplicant (pid 3764) native

isPrevious: true
Build: Android/kwe1901/kwe1901:9/2.0.0-ga-rc4/v0.0:userdebug/dev-keys
Hardware: EVK
Revision: 0
Bootloader: unknown
Radio:
Kernel: Linux version 4.14.98-07251-g17818da-dirty (yangzhulin@ubuntu00) (gcc version 4.9.x 20150123 (prerelease) (GCC)) #7 SMP PREEMPT Thu Apr 23 19:23:47 CST 2020

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Android/kwe1901/kwe1901:9/2.0.0-ga-rc4/v0.0:userdebug/dev-keys'
Revision: '0'
ABI: 'arm64'
pid: 3190, tid: 3198, name: FinalizerDaemon >>> system_server <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'decStrong() called on 0xf0563551f8e0 too many times'
x0 0000000000000000 x1 0000000000000c7e x2 0000000000000006 x3 0000000000000008
x4 feffef5550bb15b7 x5 feffef5550bb15b7 x6 feffef5550bb15b7 x7 7f7fff7f7fff7fff
x8 0000000000000083 x9 0000f05651bf9a68 x10 fffffff87ffffbdf x11 0000000000000001
x12 0000f056446439d0 x13 ffffffffffffffff x14 ffffffffff000000 x15 ffffffffffffffff
x16 0000f05651c322c8 x17 0000f05651b702d8 x18 0000f056446431ba x19 0000000000000c76
x20 0000000000000c7e x21 0000000000000083 x22 0000000012fc0788 x23 0000000012fc0788
x24 000000006fd9a680 x25 0000000012fcf8d8 x26 000000000000319b x27 0000f056503e0048
x28 0000f05644644588 x29 0000f056446438f0
sp 0000f056446438b0 lr 0000f05651b64a90 pc 0000f05651b64abc

backtrace:
#00 pc 0000000000021abc /system/lib64/libc.so (abort+124)
#01 pc 00000000000080f8 /system/lib64/liblog.so (__android_log_assert+296)
#02 pc 000000000000bdb8 /system/lib64/libutils.so (android::RefBase::decStrong(void const*) const+168)
#03 pc 000000000008ab04 /system/lib64/libgui.so (android::SurfaceControl::destroy()+132)
#04 pc 000000000008aa08 /system/lib64/libgui.so (android::SurfaceControl::~SurfaceControl()+32)
#05 pc 000000000008ab30 /system/lib64/libgui.so (android::SurfaceControl::~SurfaceControl()+16)
#06 pc 000000000000bd80 /system/lib64/libutils.so (android::RefBase::decStrong(void const*) const+112)
#07 pc 000000000010352c /system/lib64/libandroid_runtime.so (android::nativeRelease(_JNIEnv*, _jclass*, long)+76)
#08 pc 00000000003cd278 /system/framework/arm64/boot-framework.oat (offset 0x3cc000) (android.app.backup.BackupDataInput.dtor [DEDUPED]+152)
#09 pc 0000000000c5a3a8 /system/framework/arm64/boot-framework.oat (offset 0x3cc000) (android.view.SurfaceControl.finalize+104)
#10 pc 0000000000182664 /system/framework/arm64/boot-core-libart.oat (offset 0x78000) (java.lang.Daemons$FinalizerDaemon.doFinalize+100)
#11 pc 00000000001828ec /system/framework/arm64/boot-core-libart.oat (offset 0x78000) (java.lang.Daemons$FinalizerDaemon.runInternal+492)
#12 pc 000000000011085c /system/framework/arm64/boot-core-libart.oat (offset 0x78000) (java.lang.Daemons$Daemon.run+76)

ラベル(2)
0 件の賞賛
返信
11 返答(返信)

5,188件の閲覧回数
kentwway
Contributor I

Hi zhulin:

Is your problem fixed? I also encountered the same problem.

0 件の賞賛
返信

5,188件の閲覧回数
94393400
Contributor III

upgrade to android Q, the problem is fixed on android Q

0 件の賞賛
返信

5,188件の閲覧回数
jeanniewillia44
Contributor I

Fails to boot up device with 4GB LPDDR on iMX8QXP-B0 under eMMC boot mode,however uuu flashing is ok under serial mode TelltheBell

0 件の賞賛
返信

5,187件の閲覧回数
94393400
Contributor III

Hi Curtis Jonas ,

           what‘’s your mean?  my device can be boot up with 4GB LPDDR, only have system server native crash when doing monkey test. 

0 件の賞賛
返信

5,187件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

please use latest C0 revision, old B0 is not recommended for production purposes.

0 件の賞賛
返信

5,188件の閲覧回数
94393400
Contributor III

Hi, 

      Which revision is C0 version? I saw the baseline on the NXP.COM , only has p9.0-2.0.0_ga for the imx8mq evk.

0 件の賞賛
返信

5,188件の閲覧回数
94393400
Contributor III

Hi igor

        Dose the imx8mq evk support the optee in default ? 

0 件の賞賛
返信

5,188件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

yes by default it is enabled, this is described in sect.5.6.10 OP-TEE enablement

Yocto Guide from Linux 5.4.3_1.0.0 Documentation

Best regards
igor

0 件の賞賛
返信

5,188件の閲覧回数
94393400
Contributor III

Hi igor

   How to disable the OP-TEE in imx8mq evk of android 9.0 p9.0.0_2.0.0-ga

    I see the doc said "OP-TEE is enabled by default in this release. To disable OP-TEE, go to the meta-imx/imx/meta-bsp/conf/layer.conf file and
comment out the DISTRO_FEATURES_append for OP-TEE and uncomment the removed line"

   But I can't find the directory and the file  layer.conf in  android version.

0 件の賞賛
返信

5,189件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi zhulin

one can check if mentioned below patch is included in image

GPU driver crash on i.MX8M-Mini with 4GB RAM 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

5,189件の閲覧回数
94393400
Contributor III

Hi igor,

      Thanks for your reply, I checked our code, the patch you mentioned already in our baseline now. 

      Please hlep to check my .ds file and the codes I changed to 4GB were correct or not.

0 件の賞賛
返信