How to enable optee for imx8mm with LPDDR size 4G

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

How to enable optee for imx8mm with LPDDR size 4G

1,561 Views
shinningball
Contributor I

Hi experts:

       I've worked on imx8m mini, and optee works fine on LPDDR 2GB version. But hangs on the kernel for 4GB version. Does any one have encounter the same issue and resolve it? Thanks.

The log is as below:

U-Boot SPL 2020.04-gda20432e-dirty (Dec 21 2021 - 10:04:56 +0800)
power_pca9450_init
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC2
NOTICE: BL31: v2.2(release):rel_imx_5.4.47_2.2.0-0-gc949a888e-dirty
NOTICE: BL31: Built : 07:22:47, Dec 6 2021
D/TC:0 get_aslr_seed:1344 Bad fdt: -9
D/TC:0 add_phys_mem:586 TEE_SHMEM_START type NSEC_SHM 0xffc00000 size 0x00400000
D/TC:0 add_phys_mem:586 TA_RAM_START type TA_RAM 0xfe200000 size 0x01a00000
D/TC:0 add_phys_mem:586 VCORE_UNPG_RW_PA type TEE_RAM_RW 0xfe068000 size 0x00198000
D/TC:0 add_phys_mem:586 VCORE_UNPG_RX_PA type TEE_RAM_RX 0xfe000000 size 0x00068000
D/TC:0 add_phys_mem:586 ROUNDDOWN(0x38800000, CORE_MMU_PGDIR_SIZE) type IO_SEC 0x38800000 size 0x00200000
D/TC:0 add_phys_mem:586 ROUNDDOWN(0x30360000, CORE_MMU_PGDIR_SIZE) type IO_SEC 0x30200000 size 0x00400000
D/TC:0 add_phys_mem:586 ROUNDDOWN((0x30890000), CORE_MMU_PGDIR_SIZE) type IO_NSEC 0x30800000 size 0x00400000
D/TC:0 add_phys_mem:586 TZASC_BASE type IO_SEC 0x32f80000 size 0x00010000
D/TC:0 verify_special_mem_areas:530 NSEC DDR memory [40000000 fe000000]
D/TC:0 add_va_space:625 type RES_VASPACE size 0x00a00000
D/TC:0 add_va_space:625 type SHM_VASPACE size 0x02000000
D/TC:0 dump_mmap_table:737 type NSEC_SHM va 0xf8600000..0xf89fffff pa 0xffc00000..0xffffffff size 0x00400000 (pgdir)
D/TC:0 dump_mmap_table:737 type TA_RAM va 0xf8a00000..0xfa3fffff pa 0xfe200000..0xffbfffff size 0x01a00000 (pgdir)
D/TC:0 dump_mmap_table:737 type IO_SEC va 0xfa600000..0xfa7fffff pa 0x38800000..0x389fffff size 0x00200000 (pgdir)
D/TC:0 dump_mmap_table:737 type IO_NSEC va 0xfa800000..0xfabfffff pa 0x30800000..0x30bfffff size 0x00400000 (pgdir)
D/TC:0 dump_mmap_table:737 type IO_SEC va 0xfac00000..0xfaffffff pa 0x30200000..0x305fffff size 0x00400000 (pgdir)
D/TC:0 dump_mmap_table:737 type RES_VASPACE va 0xfb000000..0xfb9fffff pa 0x00000000..0x009fffff size 0x00a00000 (pgdir)
D/TC:0 dump_mmap_table:737 type SHM_VASPACE va 0xfbc00000..0xfdbfffff pa 0x00000000..0x01ffffff size 0x02000000 (pgdir)
D/TC:0 dump_mmap_table:737 type IO_SEC va 0xfdff0000..0xfdffffff pa 0x32f80000..0x32f8ffff size 0x00010000 (smallpg)
D/TC:0 dump_mmap_table:737 type TEE_RAM_RX va 0xfe000000..0xfe067fff pa 0xfe000000..0xfe067fff size 0x00068000 (smallpg)
D/TC:0 dump_mmap_table:737 type TEE_RAM_RW va 0xfe068000..0xfe1fffff pa 0xfe068000..0xfe1fffff size 0x00198000 (smallpg)
D/TC:0 core_mmu_entry_to_finer_grained:762 xlat tables used 1 / 7
D/TC:0 core_mmu_entry_to_finer_grained:762 xlat tables used 2 / 7
D/TC:0 core_mmu_entry_to_finer_grained:762 xlat tables used 3 / 7
I/TC:
D/TC:0 0 init_canaries:188 #Stack canaries for stack_tmp[0] with top at 0xfe09cab8
D/TC:0 0 init_canaries:188 watch *0xfe09cabc
D/TC:0 0 init_canaries:188 #Stack canaries for stack_tmp[1] with top at 0xfe09d2f8
D/TC:0 0 init_canaries:188 watch *0xfe09d2fc
D/TC:0 0 init_canaries:188 #Stack canaries for stack_tmp[2] with top at 0xfe09db38
D/TC:0 0 init_canaries:188 watch *0xfe09db3c
D/TC:0 0 init_canaries:188 #Stack canaries for stack_tmp[3] with top at 0xfe09e378
D/TC:0 0 init_canaries:188 watch *0xfe09e37c
D/TC:0 0 init_canaries:189 #Stack canaries for stack_abt[0] with top at 0xfe095d38
D/TC:0 0 init_canaries:189 watch *0xfe095d3c
D/TC:0 0 init_canaries:189 #Stack canaries for stack_abt[1] with top at 0xfe096978
D/TC:0 0 init_canaries:189 watch *0xfe09697c
D/TC:0 0 init_canaries:189 #Stack canaries for stack_abt[2] with top at 0xfe0975b8
D/TC:0 0 init_canaries:189 watch *0xfe0975bc
D/TC:0 0 init_canaries:189 #Stack canaries for stack_abt[3] with top at 0xfe0981f8
D/TC:0 0 init_canaries:189 watch *0xfe0981fc
D/TC:0 0 init_canaries:191 #Stack canaries for stack_thread[0] with top at 0xfe09a238
D/TC:0 0 init_canaries:191 watch *0xfe09a23c
D/TC:0 0 init_canaries:191 #Stack canaries for stack_thread[1] with top at 0xfe09c278
D/TC:0 0 init_canaries:191 watch *0xfe09c27c
I/TC: Non-secure external DT found
D/TC:0 0 discover_nsec_memory:1132 No non-secure memory found in FDT
D/TC:0 0 get_console_node_from_dt:70 No console directive from DTB
I/TC: OP-TEE version: 3.10.0-134-gb3914e54-dev (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)) #1 媼 12堎 21 01:52:45 UTC 2021 aarch64
I/TC: Primary CPU initializing
D/TC:0 0 paged_init_primary:1222 Executing at offset 0 with virtual load address 0xfe000000
D/TC:0 0 call_initcalls:21 level 1 register_time_source()
D/TC:0 0 call_initcalls:21 level 1 teecore_init_pub_ram()
D/TC:0 0 call_initcalls:21 level 1 crypto_driver_init()
D/TC:0 0 gic_it_set_cpu_mask:251 cpu_mask: writing 0xff0000 to 0xfa600890
D/TC:0 0 gic_it_set_cpu_mask:253 cpu_mask: 0x0
D/TC:0 0 gic_it_set_prio:266 prio: writing 0x1 to 0xfa600492
D/TC:0 0 caam_hal_sm_get_base_dt:27 CAAM Node not found err = 0xFFFFFFFF
D/TC:0 0 snvs_get_security_cfg:21 HPSR: 0x80009b00
D/TC:0 0 caam_hal_ctrl_fill_mpmr:204 is_filled = false
D/TC:0 0 caam_hal_ctrl_fill_mpmr:249 val_scfgr = 0x34000001
D/TC:0 0 call_initcalls:21 level 2 init_caam_late()
D/TC:0 0 call_initcalls:21 level 3 check_ta_store()
D/TC:0 0 check_ta_store:636 TA store: "Secure Storage TA"
D/TC:0 0 check_ta_store:636 TA store: "REE"
D/TC:0 0 call_initcalls:21 level 3 init_user_ta()
D/TC:0 0 call_initcalls:21 level 3 verify_pseudo_tas_conformance()
D/TC:0 0 call_initcalls:21 level 3 mobj_mapped_shm_init()
D/TC:0 0 mobj_mapped_shm_init:434 Shared memory address range: fbc00000, fdc00000
D/TC:0 0 call_initcalls:21 level 3 platform_security_config()
D/TC:0 0 snvs_get_security_cfg:21 HPSR: 0x80009b00
D/TC:0 0 call_initcalls:21 level 3 tee_cryp_init()
D/TC:0 0 call_initcalls:21 level 4 tee_fs_init_key_manager()
D/TC:0 0 call_initcalls:21 level 5 tzasc_init()
D/TC:0 0 imx_configure_tzasc:68 Action register: 0x1
D/TC:0 0 tzc_dump_state:334 TZC380 configuration:
D/TC:0 0 tzc_dump_state:336 security_inversion_en 0
D/TC:0 0 tzc_dump_state:342
D/TC:0 0 tzc_dump_state:343 region 1
D/TC:0 0 tzc_dump_state:346 region_base: 0x0000000000000000
D/TC:0 0 tzc_dump_state:348 region sp: f
D/TC:0 0 tzc_dump_state:350 region size: 20
D/TC:0 0 tzc_dump_state:342
D/TC:0 0 tzc_dump_state:343 region 2
D/TC:0 0 tzc_dump_state:346 region_base: 0x00000000bc000000
D/TC:0 0 tzc_dump_state:348 region sp: c
D/TC:0 0 tzc_dump_state:350 region size: 19
D/TC:0 0 tzc_dump_state:342
D/TC:0 0 tzc_dump_state:343 region 3
D/TC:0 0 tzc_dump_state:346 region_base: 0x00000000bf800000
D/TC:0 0 tzc_dump_state:348 region sp: c
D/TC:0 0 tzc_dump_state:350 region size: 16
D/TC:0 0 tzc_dump_state:342
D/TC:0 0 tzc_dump_state:343 region 4
D/TC:0 0 tzc_dump_state:346 region_base: 0x00000000bf800000
D/TC:0 0 tzc_dump_state:348 region sp: f
D/TC:0 0 tzc_dump_state:350 region size: 16
D/TC:0 0 tzc_dump_state:353 Lockdown select: 0
D/TC:0 0 tzc_dump_state:355 Lockdown range: 0
D/TC:0 0 tzc_dump_state:356 Action register: 1
D/TC:0 0 tzc_dump_state:357 exit
D/TC:0 0 call_initcalls:21 level 6 mobj_init()
D/TC:0 0 call_initcalls:21 level 6 default_mobj_init()
D/TC:0 0 call_finalcalls:40 level 1 release_external_dt()
I/TC: Primary CPU switching to normal world boot


U-Boot 2020.04-gda20432e-dirty (Dec 21 2021 - 10:04:56 +0800)

CPU: i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 40C
Cause: 0x0001
Reset cause: POR
Model: NXP i.MX8MM EVK board
DRAM: 4 GiB
Starting getting hw config ALICE
hwconfig1 0
hwconfig2 0
hwconfig3 0
hw_ver ALICE00
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
[*]-Video Link 0 (1920 x 1080)
[0] lcdif@32e00000, video
[1] mipi_dsi@32e10000, video_bridge
[2] adv7535@3d, panel
In: serial
Out: serial
Err: serial

BuildInfo:
- ATF c949a88
- U-Boot 2020.04-gda20432e-dirty

power_pca9450_init
PMIC reset source: 0x0040
recovery key 1
mode 0, 0
switch to partitions #0, OK
mmc2(part 0) is current device
flash target is MMC:2
Net:
Error: ethernet@30be0000 address not set.

Error: ethernet@30be0000 address not set.
No ethernet found.

Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
u-boot=>
u-boot=>
u-boot=> setenv loadaddr 0x40480000
u-boot=> saveenv
Saving Environment to MMC... Writing to MMC(2)... OK
u-boot=> boot
switch to partitions #0, OK
mmc2(part 0) is current device
30304768 bytes read in 215 ms (134.4 MiB/s)
Booting from mmc ...
41910 bytes read in 14 ms (2.9 MiB/s)
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Using Device Tree in place at 0000000043000000, end 000000004300d3b5

Starting kernel ...

unable to select a mode
device_remove: Device 'mmc@30b60000.blk' failed to remove, but children are gone

0 Kudos
3 Replies

1,558 Views
igorpadykov
NXP Employee
NXP Employee

Hi Cindy

 

additional details were sent via mail.

 

Best regards
igor

0 Kudos

1,142 Views
taquito
Contributor I

Hi Igor,

Can you please share the email details with the community?

Cheers

0 Kudos

1,554 Views
shinningball
Contributor I

Hi igor:

     Sorry to mention that the branch I worked with is 5.4.47.2.2.0, so the patch about tzasc.c is not in the current imx-optee-os source code, could you update the patches about this issue for branch 5.4.47.2.2.0. Also the content of chapter 5 Configuring optee in the document Linux iMX Porting Guide is out of date.

Many thanks.

0 Kudos