reboot issue of imx8mp android 13

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

reboot issue of imx8mp android 13

556 Views
leotang
Contributor II

Dear Sir,

Our company have designed a board based on imx8mp reference design.Now,We have an issue with 2G RAM

if we use 4G LPDDR4 RAM and flash android 13 image, and we issue a reboot command in the console port.Then,the board reboot without any problem.But if we use 2G LPDDR4 RAM and flash android 13 image.

It will show the error message blow.How can I fix the problem?

What cause the problem?

Thx

[ 63.865262][ T121] init: Received sys.powerctl='reboot,shell' from pid: 1834 (reboot)
[ 63.873275][ T121] init: sys.powerctl: do_shutdown: 0 IsShuttingDown: 0
[ 63.880616][ T1] init: Got shutdown_command 'reboot,shell' Calling HandlePowerctlMessage()
[ 63.890651][ T1] init: Clear action queue and start shutdown trigger
[ 63.897550][ T1] init: Entering shutdown mode
[ 63.902467][ T1] init: processing action (shutdown_done) from (<Builtin Action>:0)
[ 63.910432][ T1] init: Reboot start, reason: reboot,shell, reboot_target: shell
[ 63.918124][ T1] init: Shutdown timeout: 6000 ms
[ 63.923046][ T1] init: Create reboot monitor thread.
[ 63.929197][ T1835] init: shutdown_timeout_timespec.tv_sec: 369
[ 64.048641][ T57] Unable to handle kernel paging request at virtual address ffffff80a0000000
[ 64.057362][ T57] Mem abort info:
[ 64.060953][ T57] ESR = 0x96000045
[ 64.064745][ T57] EC = 0x25: DABT (current EL), IL = 32 bits
[ 64.070825][ T57] SET = 0, FnV = 0
[ 64.074645][ T57] EA = 0, S1PTW = 0
[ 64.078531][ T57] FSC = 0x05: level 1 translation fault
[ 64.084147][ T57] Data abort info:
[ 64.087769][ T57] ISV = 0, ISS = 0x00000045
[ 64.092368][ T57] CM = 0, WnR = 1
[ 64.096064][ T57] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000042a46000
[ 64.103499][ T57] [ffffff80a0000000] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[ 64.112950][ T57] Internal error: Oops: 96000045 [#1] PREEMPT SMP
[ 64.119249][ T57] Modules linked in: brcmfmac(E) dwmac_imx(E) dwmac_generic(E) stmmac_platform(E) stmmac(E) pcs_xpcs(E) realtek(E) fec(E) pci_imx6(E) rtc_snvs(E) rtc_ds1307(E) snd_sof_imx8m(E) imx_common(E) snd_sof_xtensa_dsp(E) snd_sof_of(E) snd_sof(E) imx_dsp(E) snd_soc_imx_rpmsg(E) snd_soc_imx_pcm512x_rpmsg(E) imx_audio_rpmsg(E) snd_soc_fsl_rpmsg(E) imx_pcm_rpmsg(E) i2c_rpmsg_imx(E) imx_dsp_rproc(E) imx_rproc(E) virtio_rpmsg_bus(E) rpmsg_ns(E) imx_mailbox(E) vsiv4l2(E) hantrodec_845s(E) hx280enc_vc8000e(E) snd_soc_fsl_asoc_card(E) snd_soc_imx_audmux(E) snd_soc_rt5651(E) snd_soc_imx_hdmi(E) snd_soc_imx_card(E) snd_soc_simple_card(E) snd_soc_simple_card_utils(E) snd_soc_bt_sco(E) snd_soc_hdmi_codec(E) dw_hdmi_gp_audio(E) dw_hdmi_cec(E) snd_soc_fsl_sai(E) snd_soc_fsl_easrc(E) snd_soc_fsl_asrc(E) snd_soc_fsl_aud2htx(E) snd_soc_fsl_micfil(E) imx_pcm_dma(E) imx8mm_thermal(E) galcore(E) brcmutil(E) pl2303(E) spi_nxp_fspi(E) spi_imx(E) spi_bitbang(E) spidev(E) st_lsm6dsx_i2c(E)
[ 64.119405][ T57] st_lsm6dsx(E) kfifo_buf(E) simcom_wwan(E) option(E) usb_wwan(E) usbserial(E) gpio_pcf857x(E) leds_gpio(E) mac80211(E) cfg80211(E) vvcam_video(OE) vvcam_isp(OE) vvcam_dwe(OE) imx8_media_dev(CE) os08a20(OE) basler_camera_driver_vvcam(OE) trusty_virtio(E) trusty_ipc(E) trusty_log(E) trusty_irq(E) imx_sdma(E) imx8_mipi_csi2_sam(CE) imx8_capture(CE) imx8_isi_capture(CE) imx8_isi_mem2mem(CE) imx8_isi_hw(CE) ov5640(E) v4l2_fwnode(E) v4l2_async(E) imx_cpufreq_dt(E) cpufreq_dt(E) fsl_imx8_ddr_perf(E) device_cooling(E) nvmem_imx_ocotp(E) dummy_battery(E) gpio_switch(E) dwc3_imx8mp(E) panel_simple(E) drm_dp_aux_bus(E) panel_raydium_rm67191(E) sec_mipi_dsim_imx(E) imx_lcdifv3_crtc(E) imx_lcdifv3_core(E) imx_lcdif_crtc(E) imx8mp_ldb(E) dw_hdmi_imx(E) imx8mp_hdmi_pavi(E) imxdrm(E) cdns_mhdp_imx(E) dw_hdmi(E) sec_dsim(E) fsl_imx_ldb(E) cdns_mhdp_drmcore(E) imx_lcdif_core(E) synaptics_dsx_i2c(E) goodix(E) snvs_pwrkey(E) phy_fsl_imx8_pcie(E) phy_fsl_imx8mq_usb(E)
[ 64.205905][ T57] phy_fsl_samsung_hdmi(E) phy_fsl_imx8mp_lvds(E) reset_imx7(E) dma_buf_imx(E) dsp_heap(E) secure_heap(E) cma_heap(E) system_heap(E) sdhci_esdhc_imx(E) pwm_bl(E) pwm_imx27(E) pca9450_regulator(E) i2c_dev(E) i2c_imx(E) imx2_wdt(E) imx(E) gpio_mxc(E) pinctrl_imx8mp(E) pinctrl_imx(E) irq_imx_irqsteer(E) trusty_core(E) busfreq_imx8mq(E) timer_imx_sysctr(E) imx8m_pm_domains(E) clk_blk_ctrl(E) clk_imx8mp(E) mxc_clk(E) mx8_mu(E) soc_imx8m(E) zram(E) zsmalloc(E)
[ 64.333398][ T57] CPU: 3 PID: 57 Comm: dmabuf-deferred Tainted: G C OE 5.15.74-g0092b8bfbf74 #1
[ 64.343332][ T57] Hardware name: NXP i.MX8MPlus EVK board (DT)
[ 64.349359][ T57] pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 64.357038][ T57] pc : __memset+0x16c/0x188
[ 64.361424][ T57] lr : secure_heap_zero_buffer+0xb0/0x12c [secure_heap]
[ 64.368240][ T57] sp : ffffffc00b5b3d10
[ 64.372259][ T57] x29: ffffffc00b5b3d30 x28: 0000000000000000 x27: ffffff800384a440
[ 64.380114][ T57] x26: ffffff800368a400 x25: 0000000000001800 x24: ffffffc00a8100a0
[ 64.387967][ T57] x23: 0000000000000800 x22: ffffff80206c1878 x21: ffffffc0012d6234
[ 64.395822][ T57] x20: ffffff800368a410 x19: ffffff800368a400 x18: ffffffc00aca5028
[ 64.403676][ T57] x17: 0000000000000000 x16: 0000000000000179 x15: 00000000efe4b99a
[ 64.411534][ T57] x14: 0000000000000010 x13: 0000000000007ff3 x12: 0000000000800000
[ 64.419384][ T57] x11: 0000000000000000 x10: 0000000000000001 x9 : 0000000000000000
[ 64.427234][ T57] x8 : ffffff80a0000000 x7 : 0000000000000000 x6 : 000000000000003f
[ 64.435083][ T57] x5 : 0000000000000040 x4 : 0000000000000000 x3 : 0000000000000004
[ 64.442932][ T57] x2 : 0000000000000fc0 x1 : 0000000000000000 x0 : ffffff80a0000000
[ 64.450783][ T57] Call trace:
[ 64.453938][ T57] __memset+0x16c/0x188
[ 64.457962][ T57] secure_heap_buf_free+0x2c/0xa0 [secure_heap]
[ 64.464077][ T57] free_one_item+0xd0/0x10c
[ 64.468453][ T57] deferred_free_thread+0x5c/0x10c
[ 64.473437][ T57] kthread+0x170/0x1dc
[ 64.477374][ T57] ret_from_fork+0x10/0x20
[ 64.481660][ T57] Code: 91010108 54ffff4a 8b040108 cb050042 (d50b7428)
[ 64.488466][ T57] ---[ end trace 856c6cbffd6a983c ]---
[ 64.507107][ T57] Kernel panic - not syncing: Oops: Fatal exception
[ 64.513566][ T57] SMP: stopping secondary CPUs
[ 64.518215][ T57] Kernel Offset: disabled
[ 64.522410][ T57] CPU features: 0x0,00004003,20000846
[ 64.527640][ T57] Memory Limit: none

 

Tags (1)
0 Kudos
Reply
11 Replies

537 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

From the error log, the system is accessing NULL address, so we suspect that the system not know the real dram range, can you check your porting steps?

Best Regards
Zhiming

0 Kudos
Reply

532 Views
leotang
Contributor II

Dear Zhiming,

         I just changed the RAM SIZE and the lpddr4 timing for 2G in the u-boot.So which part shoud I check?Could you point me the specific part I should check ,as I have no idea how to check

Thx

 

BRs,

leo

0 Kudos
Reply

528 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

Need to modify kernel device tree with 2GB.

For example,

--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi

+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi

@@ -186,8 +186,8 @@

                linux,cma {

                        compatible = "shared-dma-pool";

                        reusable;

-                       size = <0 0x3c000000>;

-                       alloc-ranges = <0 0x40000000 0 0xC0000000>;

+                       size = <0 0x14000000>;

+                       alloc-ranges = <0 0x40000000 0 0x40000000>;

                        linux,cma-default;

                };

 

@@ -2315,7 +2315,7 @@

        mix_gpu_ml: mix_gpu_ml {

                compatible = "fsl,imx8mp-gpu", "fsl,imx8-gpu-ss";

                cores = <&gpu_3d>, <&ml_vipsi>, <&gpu_2d>;

-               reg = <0x0 0x40000000 0x0 0xC0000000>, <0x0 0x0 0x0 0x10000000>;

+               reg = <0x0 0x40000000 0x0 0x40000000>, <0x0 0x0 0x0 0x10000000>;

                reg-names = "phys_baseaddr", "contiguous_mem";

                status = "disabled";

        };



Best Regards
Zhiming

0 Kudos
Reply

513 Views
leotang
Contributor II

Dear Zhiming,

          I have modified the device tree as your example.

But I have got the same result.

The attachment is the full bootlog for reference.

How do I check the next step?

Thx

BRs,

leo

 

0 Kudos
Reply

507 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

Can you share modifications about PHYS_SDRAM_2_SIZE and PHYS_SDRAM_SIZE ?

Best Regards
Zhiming

0 Kudos
Reply

505 Views
leotang
Contributor II

Below is my define for PHYS_SDRAM_SIZE

But I don't define PHYS_SDRAM_2_SIZE

#define CONFIG_SYS_SDRAM_BASE 0x40000000
#define PHYS_SDRAM 0x40000000
#define PHYS_SDRAM_SIZE 0x80000000 /* 2 GB */
#define PHYS_SDRAM_2 0x100000000

0 Kudos
Reply

471 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @leotang 

Please try to modify memory node in dts referring below screenshot.

Zhiming_Liu_0-1726100332485.png

 



Best Regards
Zhiming

0 Kudos
Reply

350 Views
leotang
Contributor II

Dear Zhiming,

I have modified the porting you suggest

But it seems the same result.I have added the full boot log in the attachment for your reference.

Thx

0 Kudos
Reply

322 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @leotang 

 

Current aosp on my side is Android14, in order to be able to quickly test, i use it to test.

Here is my test  on evk board, try to limint DDR size on software.

Zhiming_Liu_1-1726817514337.png

 

Zhiming_Liu_0-1726817500717.png

vk_8mp:/ $ [  198.506824][  T419] healthd: battery l=85 v=3600 t=35.0 h=2 st=2 c=400000 fc=4000000 cc=32 chg=au
[  230.343882][  T134] init: Received sys.powerctl='reboot,shell' from pid: 2118 (reboot)
[  230.352385][    T1] init: Got shutdown_command 'reboot,shell' Calling HandlePowerctlMessage()
[  230.364579][    T1] init: Clear action queue and start shutdown trigger
[  230.372022][    T1] init: Entering shutdown mode
[  230.376994][    T1] init: processing action (shutdown_done) from (<Builtin Action>:0)
[  230.385108][    T1] init: Reboot start, reason: reboot,shell, reboot_target: shell
[  230.392795][    T1] init: Shutdown timeout: 6000 ms
[  230.397736][    T1] init: Create reboot monitor thread.
[  230.403736][ T2120] init: shutdown_timeout_timespec.tv_sec: 536
[  230.427900][    T1] init: service 'ueventd' requested start, but it is already running (flags: 2084)
[  230.547330][ T1148] launcher-loader (1148) used greatest stack depth: 8896 bytes left
[  230.582435][  T195] servicemanager: Found android.hardware.thermal.IThermal/default in device VINTF manifest.
[  230.642792][  T195] servicemanager: Could not find android.hardware.light.ILights/default in the VINTF manifest.
[  231.225112][  T193] binder: undelivered TRANSACTION_COMPLETE
[  231.230928][  T193] binder: undelivered transaction 104321, process died.
[  231.243998][  T193] binder: undelivered TRANSACTION_COMPLETE
[  231.260411][  T193] binder: undelivered transaction 104324, process died.
[  231.280128][  T193] binder: undelivered death notification, b400007b267027e0
[  231.287345][  T193] binder: undelivered death notification, b400007b26771de0
[  231.352565][  T212] binder: 212:212 cannot find target node
[  231.358187][  T212] binder: 212:212 transaction async to 0:0 failed 104347/29189/-22, size 100-0 line 3259
[  231.452420][  T224] printk: binder:212_4: 10 output lines suppressed due to ratelimiting
[  231.503342][   T55] android_work: sent uevent USB_STATE=DISCONNECTED
[  231.505343][  T533] dwc3 38100000.usb: request 0000000000000000 was not queued to ep0out
[  231.538704][  T203] printk: logd.reader: 33 output lines suppressed due to ratelimiting
[  231.649262][ T2124] apexd: Unmount all subcommand detected
[  231.655914][ T2124] apexd-unmount-all: Populating APEX database from mounts...
[  231.664777][ T2124] apexd-unmount-all: Found "/apex/com.android.btservices@340090000" backed by file /system/apex/com.android.btservices.apex
[  231.677742][ T2124] apexd-unmount-all: Found "/apex/com.android.tzdata@340090000" backed by file /system/apex/com.android.tzdata.apex
[  231.689954][ T2124] apexd-unmount-all: Found "/apex/com.android.vndk.v34@1" backed by file /system/apex/com.android.vndk.current.apex
[  231.702135][ T2124] apexd-unmount-all: Found "/apex/com.android.apex.cts.shim@1" backed by file /system/apex/com.android.apex.cts.shim.apex
[  231.714790][ T2124] apexd-unmount-all: Found "/apex/com.android.devicelock@1" backed by file /system/apex/com.android.devicelock.apex
[  231.726963][ T2124] apexd-unmount-all: Found "/apex/com.android.os.statsd@340090000" backed by file /system/apex/com.android.os.statsd.apex
[  231.739628][ T2124] apexd-unmount-all: Found "/apex/com.android.i18n@1" backed by file /system/apex/com.android.i18n.apex
[  231.750736][ T2124] apexd-unmount-all: Found "/apex/com.android.healthfitness@340090000" backed by file /system/apex/com.android.healthfitness.apex
[  231.776950][ T2124] EXT4-fs (dm-40): unmounting filesystem.
[  231.846226][ T2124] EXT4-fs (dm-28): unmounting filesystem.
[  231.896767][ T2124] EXT4-fs (loop7): unmounting filesystem.
[  231.907114][ T2124] EXT4-fs (dm-39): unmounting filesystem.
[  231.980384][ T2124] EXT4-fs (dm-36): unmounting filesystem.
[  232.027293][ T2124] EXT4-fs (loop4): unmounting filesystem.
[  232.039620][ T2124] EXT4-fs (dm-22): unmounting filesystem.
[  232.087606][ T2124] EXT4-fs (dm-32): unmounting filesystem.
[  232.125090][ T2124] EXT4-fs (dm-31): unmounting filesystem.
[  232.171057][ T2124] EXT4-fs (loop9): unmounting filesystem.
[  232.182554][ T2124] EXT4-fs (dm-35): unmounting filesystem.
[  232.229332][ T2124] EXT4-fs (loop11): unmounting filesystem.
[  232.242289][ T2124] EXT4-fs (loop8): unmounting filesystem.
[  232.251957][ T2124] EXT4-fs (dm-25): unmounting filesystem.
[  232.309007][ T2124] EXT4-fs (dm-17): unmounting filesystem.
[  232.371337][ T2124] EXT4-fs (dm-41): unmounting filesystem.
[  232.430648][ T2124] EXT4-fs (dm-24): unmounting filesystem.
[  232.475538][ T2124] EXT4-fs (dm-23): unmounting filesystem.
[  232.528491][ T2124] EXT4-fs (dm-21): unmounting filesystem.
[  232.576009][ T2124] EXT4-fs (loop10): unmounting filesystem.
[  232.589972][ T2124] EXT4-fs (dm-33): unmounting filesystem.
[  232.645516][ T2124] EXT4-fs (dm-20): unmounting filesystem.
[  232.700912][ T2124] EXT4-fs (loop16): unmounting filesystem.
[  232.710391][ T2124] EXT4-fs (loop12): unmounting filesystem.
[  232.718968][ T2124] EXT4-fs (dm-15): unmounting filesystem.
[  232.763967][ T2124] EXT4-fs (loop13): unmounting filesystem.
[  232.776769][ T2124] EXT4-fs (dm-13): unmounting filesystem.
[  232.815492][ T2124] EXT4-fs (loop6): unmounting filesystem.
[  232.824670][ T2124] EXT4-fs (dm-34): unmounting filesystem.
[  232.875025][ T2124] EXT4-fs (loop14): unmounting filesystem.
[  232.890064][ T2124] EXT4-fs (loop5): unmounting filesystem.
[  232.901274][ T2124] EXT4-fs (dm-42): unmounting filesystem.
[  232.963169][ T2124] printk: apexd: 57 output lines suppressed due to ratelimiting
[  233.465311][    T1] kvm: exiting hardware virtualization
[  233.503614][    T1] imx2-wdt 30280000.watchdog: Device shutdown: Expect reboot!
[  233.516721][    T1] reboot: Restarting system with command 'shell'

U-Boot SPL 2023.04-dirty (Sep 20 2024 - 11:27:32 +0900)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0:  RNG instantiated
Normal Boot
Trying to boot from MMC2
NOTICE:  Do not release JR0 to NS as it can be used by HAB
NOTICE:  BL31: v2.8(release):automotive-14.0.0_1.1.0-0-g7d5458822
NOTICE:  BL31: Built : 11:27:52, Sep 20 2024

 

modifications:

Zhiming_Liu_2-1726817644139.png

Zhiming_Liu_3-1726817664578.pngZhiming_Liu_5-1726819194401.pngZhiming_Liu_6-1726819255803.png

There is no other place need to modify for 2GB DDR porting.

You can see that the system memory is 2GB and there is no crash on EVK board. Maybe you can try to re-calibrate and stress  test the ddr.

Best Regards
Zhiming

0 Kudos
Reply

316 Views
leotang
Contributor II

Dear Zhiming,

          Thx for your support and I will try it

 

 

 

BRs,

leo

0 Kudos
Reply

268 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @leotang 

Another inspiration is that you can try to comment or reduce  gpu_reserved size in imx8mp.dtsi. The default 256MB of physical memory may be too much.

Best Regards
Zhiming

0 Kudos
Reply