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.

[AM6442]how to start op-tee from SD ?

the latest LSDK:08_02_00_23

compile cmd:

Getting the OP-TEE Source Code
$ git clone https://github.com/OP-TEE/optee_os.git

Getting Security Dev Tool

$ git clone git://git.ti.com/security-development-tools/core-secdev-k3.git -b master
$ export TI_SECURE_DEV_PKG=`pwd`/core-secdev-k3

Building OP-TEE
on GP
$ make CROSS_COMPILE64=aarch64-linux-gnu- PLATFORM=k3-am65x CFG_ARM64_core=y

out:./out/arm-plat-k3/core/tee-pager_v2.bin

then:
A53
$ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am64x_evm_a53_defconfig O=<output directory>/a53
$ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=./bl31.bin TEE=./tee-pager_v2.bin  O=<output directory>/a53

copy tispl.bin, u-boot.img from output/a53 to sd part

then power on the board:

U-Boot SPL 2021.01-00001-g769f9bc72e (Aug 04 2022 - 10:17:41 +0800)
SYSFW ABI: 3.1 (firmware rev 0x0016 '22.1.1--v2022.01 (Terrific Llam')
SPL initial stack usage: 13392 bytes
Trying to boot from MMC2
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.5(release):08.03.00.002
NOTICE:  BL31: Built : 10:10:15, Aug  4 2022
I/TC:
I/TC: OP-TEE version: 3.18.0-33-g7d716171-dev (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #4 Thu Aug  4 07:10:04 UTC 2022 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check optee.readthedocs.io/.../porting_guidelines.html
I/TC: Primary CPU initializing
Unhandled Exception in EL3.
x30            = 0x00000000701c0e6c
x0             = 0x0000000000000000
x1             = 0x000000009e871708
x2             = 0x000000009b207000
x3             = 0x0000000000000000
x4             = 0x0000000032400000
x5             = 0x00000000000fffff
x6             = 0x0000000032505fff
x7             = 0x0000000000200000
x8             = 0x0000000000000011
x9             = 0x000000009e871b40
x10            = 0x0000000000000000
x11            = 0x0000000000000000
x12            = 0x000000009e8990d0
x13            = 0x000000000000000a
x14            = 0x00000000ffffffff
x15            = 0x0000000000000020
x16            = 0x000000009e810a04
x17            = 0x0000000000000000
x18            = 0x0000000000000000
x19            = 0x0000000000000000
x20            = 0x0000000000000000
x21            = 0x000000009e899328
x22            = 0x000000009e871708
x23            = 0x0000000000000000
x24            = 0x0000000000000000
x25            = 0x0000000000000000
x26            = 0x0000000000000000
x27            = 0x0000000000000000
x28            = 0x0000000000000000
x29            = 0x000000009e899210
scr_el3        = 0x0000000000000e38
sctlr_el3      = 0x0000000030cd183f
cptr_el3       = 0x0000000000000000
tcr_el3        = 0x0000000080803520
daif           = 0x00000000000002c0
mair_el3       = 0x00000000004404ff
spsr_el3       = 0x00000000600003c4
elr_el3        = 0x000000009e80a998
ttbr0_el3      = 0x00000000701cd780
esr_el3        = 0x0000000092000010
far_el3        = 0x000000009b207000
spsr_el1       = 0x0000000000000000
elr_el1        = 0x0000000000000000
spsr_abt       = 0x0000000000000000
spsr_und       = 0x0000000000000000
spsr_irq       = 0x0000000000000000
spsr_fiq       = 0x0000000000000000
sctlr_el1      = 0x0000000030d8180d
actlr_el1      = 0x0000000000000000
cpacr_el1      = 0x0000000000000000
csselr_el1     = 0x0000000000000000
sp_el1         = 0x000000009e871460
esr_el1        = 0x0000000000000000
ttbr0_el1      = 0x000000009e891000
ttbr1_el1      = 0x0000000000000000
mair_el1       = 0x00000000ff00ff04
amair_el1      = 0x0000000000000000
tcr_el1        = 0x0000000080803fa0
tpidr_el1      = 0x0000000000000000
tpidr_el0      = 0x0000000000000000
tpidrro_el0    = 0x0000000000000000
par_el1        = 0x0400000032406900
mpidr_el1      = 0x0000000080000000
afsr0_el1      = 0x0000000000000000
afsr1_el1      = 0x0000000000000000
contextidr_el1 = 0x0000000000000000
vbar_el1       = 0x000000009e802000
cntp_ctl_el0   = 0x0000000000000000
cntp_cval_el0  = 0x0000000000000000
cntv_ctl_el0   = 0x0000000000000000
cntv_cval_el0  = 0x0000000000000000
cntkctl_el1    = 0x0000000000000000
sp_el0         = 0x000000009e899210
isr_el1        = 0x0000000000000000
dacr32_el2     = 0x0000000000000000
ifsr32_el2     = 0x0000000000000000
cpuectlr_el1   = 0x0000000000000040
cpumerrsr_el1  = 0x000000000310062f
l2merrsr_el1   = 0x0000000010345798

  • the reason is  that PLATFORM is error.

    on GP
    $ make CROSS_COMPILE64=aarch64-linux-gnu- PLATFORM=k3-am64x CFG_ARM64_core=y 

    the board can start and generate other questions;
    E/TC:0 0
    E/TC:0 0 Core data-abort at address 0x10 (translation fault)
    E/TC:0 0  esr 0x96000005  ttbr0 0x9e891000   ttbr1 0x00000000   cidr 0x0
    E/TC:0 0  cpu #0          cpsr 0x800001c4
    E/TC:0 0  x0  000000009e864000 x1  0000000000000010
    E/TC:0 0  x2  0000000000000000 x3  0000000000000000
    E/TC:0 0  x4  000000009e81d3d4 x5  0000000000ffffff
    E/TC:0 0  x6  0000000000000002 x7  000000000019e000
    E/TC:0 0  x8  0000000000000004 x9  000000009e871b40
    E/TC:0 0  x10 0000000000000000 x11 0000000000000000
    E/TC:0 0  x12 0000000000000000 x13 0000000000000000
    E/TC:0 0  x14 0000000000000000 x15 0000000000000000
    E/TC:0 0  x16 000000009e8097a4 x17 0000000000000000
    E/TC:0 0  x18 0000000000000000 x19 000000009c601000
    E/TC:0 0  x20 000000009c601010 x21 0000000000000004
    E/TC:0 0  x22 000000009e870000 x23 000000009e87060c
    E/TC:0 0  x24 0000000100000000 x25 0000000000000000
    E/TC:0 0  x26 0000000000000000 x27 0000000000000000
    E/TC:0 0  x28 0000000000000000 x29 000000009e899100
    E/TC:0 0  x30 000000009e80bad0 elr 000000009e80baf0
    E/TC:0 0  sp_el0 000000009e899100
    E/TC:0 0 TEE load address @ 0x9e800000
    E/TC:0 0 Call stack:
    E/TC:0 0  0x9e80baf0
    E/TC:0 0  0x9e816e6c
    E/TC:0 0  0x9e81311c
    E/TC:0 0  0x9e81db20
    E/TC:0 0  0x9e8064f4
    E/TC:0 0  0x9e806668
    E/TC:0 0  0x9e806cd4
    E/TC:0 0 Panic 'unhandled pageable abort' at core/arch/arm/kernel/abort.c:561 <abort_handler>
    E/TC:0 0 TEE load address @ 0x9e800000
    E/TC:0 0 Call stack:
    E/TC:0 0  0x9e8082b0
    E/TC:0 0  0x9e811e34
    E/TC:0 0  0x9e8079a8
    E/TC:0 0  0x9e805030
  • Hi! The subject owner is currently out of the office. Please allow a couple of days for a response. Thanks.

  • Hello,
    Please let us know which board and SoC (GP or HS) you're testing with?
    There's an early e2e post on OPTEE to see if it helps.
    e2e.ti.com/.../4161644
    Best,
    -Hong