imx8mm ddr4 could not use the whole ddr

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

imx8mm ddr4 could not use the whole ddr

928 Views
jiangyaqiang
Contributor IV

HI :

   In my case , the board is usinge IMX8MM, and ddr is DDR4 512M.

   but when boot up to uboot, it says ddr size is 480M.

   I have search the code , it seems that TEE is using.

  How to set to use the whole 512M ddr ?

  BTW , my board IMX8MM + LPDDR have no such problem with the same uboot(just change the ddr config, and build config).

 uboot is from yocto-4.14.98

 log as bellow:

U-Boot SPL 2018.03-00016-gdd07b44-dirty (Mar 18 2020 - 15:12:28 +0800)
power_bd71837_init
Can't find PMIC:BD71837
DRAM PHY training for 2400MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 400MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
DRAM PHY training for 2400MTS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
Normal Boot
Trying to boot from MMC1


U-Boot 2018.03-00016-gdd07b44-dirty (Mar 18 2020 - 15:12:28 +0800)

CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 41C
Reset cause: POR
Model: FSL i.MX8MM DDR4 EVK board
DRAM: ram_size:1e000000 rom:2000000
480 MiB
NAND: 0 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

any help/comment will be appreciated.

Thanks.

0 Kudos
2 Replies

776 Views
igorpadykov
NXP Employee
NXP Employee

Hi jiang

one can try to disable OP-TEE using sect.5.6.11 OP-TEE enablement

attached Yocto Guide.

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

0 Kudos

776 Views
jiangyaqiang
Contributor IV

HI igor:

Thank you for your reply.

But after disable TEE, the uboot detect 512M ddr , but the kernel could not boot up (the kernel boot up success with enable TEE).

log:

U-Boot SPL 2018.03-imx_v2018.03_4.14.98_2.0.0_ga+g87a19df (Mar 20 2020 - 11:53:33 +0800)

power_bd71837_init

Can't find PMIC:BD71837

DRAM PHY training for 2400MTS

check ddr4_pmu_train_imem code

check ddr4_pmu_train_imem code pass

check ddr4_pmu_train_dmem code

check ddr4_pmu_train_dmem code pass

Training PASS

DRAM PHY training for 400MTS

check ddr4_pmu_train_imem code

check ddr4_pmu_train_imem code pass

check ddr4_pmu_train_dmem code

check ddr4_pmu_train_dmem code pass

Training PASS

DRAM PHY training for 2400MTS

check ddr4_pmu_train_imem code

check ddr4_pmu_train_imem code pass

check ddr4_pmu_train_dmem code

check ddr4_pmu_train_dmem code pass

Training PASS

Normal Boot

Trying to boot from MMC1

U-Boot 2018.03-imx_v2018.03_4.14.98_2.0.0_ga+g87a19df (Mar 20 2020 - 11:53:33 +0800)

CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)

CPU: Commercial temperature grade (0C to 95C) at 52C

Reset cause: POR

Model: FSL i.MX8MM DDR4 EVK board

DRAM: 512 MiB

NAND: 0 MiB

MMC: FSL_SDHC: 0, FSL_SDHC: 1

Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)

No panel detected: default to MIPI2HDMI

adv7535_init: Can't find device id=0x3d, on bus 1

Display: MIPI2HDMI (1920x1080)

Video: 1920x1080x24

In: serial

Out: serial

Err: serial

BuildInfo:

- ATF 1cb68fa

- U-Boot 2018.03-imx_v2018.03_4.14.98_2.0.0_ga+g87a19df

BOOT_EMMC:

flash target is MMC:0

Net: No ethernet found.

Fastboot: Normal

Normal Boot

Hit any key to stop autoboot: 0

switch to partitions #0, OK

mmc0(part 0) is current device

    • Unable to read file boot.scr **

23691776 bytes read in 299 ms (75.6 MiB/s)

Booting from mmc ...

37673 bytes read in 9 ms (4 MiB/s)

    1. Flattened Device Tree blob at 43000000

Booting using the fdt blob at 0x43000000

Using Device Tree in place at 0000000043000000, end 000000004300c328

Starting kernel ...

Booting Linux on physical CPU 0x0

Linux version 4.14.98-05991-g1dca39c-dirty (hms@ubuntu-server) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Wed Mar 18 16:02:29 CST 2020

Boot CPU: AArch64 Processor

Machine model: FSL i.MX8MM DDR4 EVK board

earlycon: ec_imx6q0 at MMIO 0x0000000030860000 (options '115200')

bootconsole enabled

efi: Getting EFI parameters from FDT:

efi: UEFI not found.

Reserved memory: created CMA memory pool at 0x000000005c000000, size 64 MiB

OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool

NUMA: No NUMA configuration found

NUMA: Faking a node at

NUMA: NODE_DATA

Zone ranges:

DMA

Normal empty

Movable zone start for each node

Early memory node ranges

node 0:

Initmem setup node 0

psci: probing for conduit method from DT.

psci: PSCIv1.1 detected in firmware.

psci: Using standard PSCI v0.2 function IDs

psci: MIGRATE_INFO_TYPE not supported.

psci: SMC Calling Convention v1.1

percpu: Embedded 24 pages/cpu @ffff80001bf63000 s57624 r8192 d32488 u98304

Detected VIPT I-cache on CPU0

CPU features: enabling workaround for ARM erratum 845719

Speculative Store Bypass Disable mitigation not required

Built 1 zonelists, mobility grouping on. Total pages: 129024

Policy zone: DMA

Kernel command line: console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 root=/dev/mmcblk0p2 rootwait rw

PID hash table entries: 2048 (order: 2, 16384 bytes)

Memory: 418084K/524288K available (13820K kernel code, 1824K rwdata, 6172K rodata, 1280K init, 435K bss, 40668K reserved, 65536K cma-reserved)

Virtual kernel memory layout:

modules : 0xffff000000000000 - 0xffff000008000000 ( 128 MB)

vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000 (129022 GB)

.text : 0xffff000008080000 - 0xffff000008e00000 ( 13824 KB)

.rodata : 0xffff000008e00000 - 0xffff000009410000 ( 6208 KB)

.init : 0xffff000009410000 - 0xffff000009550000 ( 1280 KB)

.data : 0xffff000009550000 - 0xffff000009718200 ( 1825 KB)

.bss : 0xffff000009718200 - 0xffff0000097850d0 ( 436 KB)

fixed : 0xffff7dfffe7f9000 - 0xffff7dfffec00000 ( 4124 KB)

PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000 ( 16 MB)

vmemmap : 0xffff7e0000000000 - 0xffff800000000000 ( 2048 GB maximum)

0xffff7e0000000000 - 0xffff7e0000800000 ( 8 MB actual)

memory : 0xffff800000000000 - 0xffff800020000000 ( 512 MB)

SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

Preemptible hierarchical RCU implementation.

RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.

Tasks RCU enabled.

RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4

NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0

GICv3: GIC: Using split EOI/Deactivate mode

GICv3: no VLPI support, no direct LPI support

ITS: No ITS available, not enabling LPIs

GICv3: CPU0: found redistributor 0 region 0:0x0000000038880000

i.MX8MM clock driver init done

arch_timer: cp15 timer(s) running at 8.00MHz (phys).

clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns

sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns

system counter timer init

sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns

clocksource: imx sysctr: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns

Console: colour dummy device 80x25

Calibrating delay loop (skipped), value calculated using timer frequency.. 16.00 BogoMIPS (lpj=32000)

pid_max: default: 32768 minimum: 301

Security Framework initialized

Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)

Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)

Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)

Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)

ASID allocator initialised with 32768 entries

Hierarchical SRCU implementation.

Cannot find MU entry in device tree

CPU identified as i.MX8MM, silicon rev 1.0

EFI services will not be available.

smp: Bringing up secondary CPUs ...

Detected VIPT I-cache on CPU1

GICv3: CPU1: found redistributor 1 region 0:0x00000000388a0000

CPU1: Booted secondary processor

Detected VIPT I-cache on CPU2

GICv3: CPU2: found redistributor 2 region 0:0x00000000388c0000

CPU2: Booted secondary processor

Detected VIPT I-cache on CPU3

GICv3: CPU3: found redistributor 3 region 0:0x00000000388e0000

CPU3: Booted secondary processor

smp: Brought up 1 node, 4 CPUs

SMP: Total of 4 processors activated.

CPU features: detected feature: GIC system register CPU interface

CPU features: detected feature: 32-bit EL0 Support

CPU features: detected feature: Kernel page table isolation (KPTI)

CPU: All CPU(s) started at EL2

alternatives: patching kernel code

devtmpfs: initialized

random: get_random_u32 called from bucket_table_alloc+0x108/0x260 with crng_init=0

clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns

futex hash table entries: 1024 (order: 5, 131072 bytes)

pinctrl core: initialized pinctrl subsystem

DMI not present or invalid.

NET: Registered protocol family 16

cpuidle: using governor menu

vdso: 2 pages (1 code @ ffff000008e06000, 1 data @ ffff000009554000)

hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.

DMA: preallocated 256 KiB pool for atomic allocations

Serial: AMBA PL011 UART driver

imx rpmsg driver is registered.

imx8mm-pinctrl 30330000.pinctrl: Invalid fsl,pins or pins property in node /pinctrl@30330000/imx8mm-evk/synaptics_dsx_iogrp

imx8mm-pinctrl 30330000.pinctrl: Invalid fsl,pins or pins property in node /pinctrl@30330000/imx8mm-evk/pwm1grp

imx8mm-pinctrl 30330000.pinctrl: initialized IMX pinctrl driver

MU is ready for cross core communication!

Unable to handle kernel NULL pointer dereference at virtual address 00000000

Mem abort info:

Exception class = DABT (current EL), IL = 32 bits

SET = 0, FnV = 0

EA = 0, S1PTW = 0

Data abort info:

ISV = 0, ISS = 0x00000004

CM = 0, WnR = 0

user address but active_mm is swapper

Internal error: Oops: 96000004 PREEMPT SMP

Modules linked in:

CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.98-05991-g1dca39c-dirty #1

Hardware name: FSL i.MX8MM DDR4 EVK board (DT)

task: ffff800018168000 task.stack: ffff000008038000

PC is at get_partial_node.isra.25+0x50/0x348

LR is at get_partial_node.isra.25+0x48/0x348

pc : [] pstate: a00000c5

sp : ffff00000803b2a0

x29: ffff00000803b2a0 x28: ffff800018000f80

x27: ffff800018003c80 x26: ffff800018003c80

x25: ffff0000081d2278 x24: ffff800018003db8

x23: ffff800018000f90 x22: 00000000ffffffff

x21: 0000000000210d00 x20: 0000000000000001

x19: 0000000000000000 x18: 0000000000000000

x17: 0000000000000001 x16: 0000000000007bc0

x15: ffffffffffffffff x14: 0140000000000000

x13: ffff000008034000 x12: ffff800000000100

x11: ffff000008b2c158 x10: ffff000008034000

x9 : 0000000000000000 x8 : ffff800018530280

x7 : 0000000000000000 x6 : 000000000000003f

x5 : 00f9000000000000 x4 : ffff80001bfa3160

x3 : 0000000000000000 x2 : 0000000000000000

x1 : 0000000000000000 x0 : ffff800018000f80

Process swapper/0 (pid: 1, stack limit = 0xffff000008038000)

Call trace:

Exception stack(0xffff00000803b160 to 0xffff00000803b2a0)

b160: ffff800018000f80 0000000000000000 0000000000000000 0000000000000000

b180: ffff80001bfa3160 00f9000000000000 000000000000003f 0000000000000000

b1a0: ffff800018530280 0000000000000000 ffff000008034000 ffff000008b2c158

b1c0: ffff800000000100 ffff000008034000 0140000000000000 ffffffffffffffff

b1e0: 0000000000007bc0 0000000000000001 0000000000000000 0000000000000000

b200: 0000000000000001 0000000000210d00 00000000ffffffff ffff800018000f90

b220: ffff800018003db8 ffff0000081d2278 ffff800018003c80 ffff800018003c80

b240: ffff800018000f80 ffff00000803b2a0 ffff0000081f3a18 ffff00000803b2a0

b260: ffff0000081f3a20 00000000a00000c5 00000000000152c0 0000000000000000

b280: ffffffffffffffff 0000000000000000 ffff00000803b2a0 ffff0000081f3a20

[] get_partial_node.isra.25+0x50/0x348

[] ___slab_alloc+0x360/0x5e8

[] __slab_alloc.isra.23+0x24/0x38

[] kmem_cache_alloc_node+0xd0/0x218

[] alloc_vmap_area+0x60/0x330

[] __get_vm_area_node+0xa4/0x1b8

[] get_vm_area_caller+0x38/0x40

[] __ioremap_caller+0x68/0xf0

[] __ioremap+0x10/0x18

[] imx_rpmsg_find_vqs+0x130/0x298

[] rpmsg_probe+0xd0/0x480

[] virtio_dev_probe+0x158/0x200

[] driver_probe_device+0x210/0x2d0

[] __device_attach_driver+0x9c/0xf8

[] bus_for_each_drv+0x4c/0x98

[] __device_attach+0xc0/0x138

[] device_initial_probe+0x10/0x18

[] bus_probe_device+0x94/0xa0

[] device_add+0x3b0/0x5b8

[] device_register+0x1c/0x28

[] register_virtio_device+0xe4/0x100

[] imx_rpmsg_probe+0x344/0x7d8

[] platform_drv_probe+0x58/0xb8

[] driver_probe_device+0x210/0x2d0

[] __device_attach_driver+0x9c/0xf8

[] bus_for_each_drv+0x4c/0x98

[] __device_attach+0xc0/0x138

[] device_initial_probe+0x10/0x18

[] bus_probe_device+0x94/0xa0

[] device_add+0x3b0/0x5b8

[] of_device_add+0x48/0x60

[] of_platform_device_create_pdata+0x84/0xe8

[] of_platform_bus_create+0x120/0x348

[] of_platform_bus_create+0x168/0x348

[] of_platform_populate+0x7c/0xe8

[] of_platform_default_populate_init+0x64/0x78

[] do_one_initcall+0x38/0x128

[] kernel_init_freeable+0x188/0x22c

[] kernel_init+0x10/0x108

[] ret_from_fork+0x10/0x18

Code: f90037a2 942ff003 f8410ef3 eb1302ff (f85e0675)

--

note: swapper/0[1] exited with preempt_count 1

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

SMP: stopping secondary CPUs

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

0 Kudos