Xtest fails on HiKey960


#1

Hi all,

I’m getting a failure while running xtest on Hikey960.

I follow the instructions on github

“make” and “make flash” was completed.
But xtest fails.

# xtest
Run test suite with level=0

TEE test application started with device [(null)]
######################################################
#
# regression
#
######################################################
 
* regression_1001 Core self tests
E/TC:6 0 tee_entry_std:536 Bad arg address 0x217061000
regression_1000.c:246: res has an unexpected value: 0xffff000e = 
TEEC_ERROR_COMMUNICATION, expected 0x0 = TEEC_SUCCESS
Segmentation fault

How can I fix this problem?
Thank you.


#2

@tateoka Please share if you have used a specific OP-TEE branch to fetch source code.


#3

Hi,

Not specified.

I did it as follows.

repo init -u https://github.com/OP-TEE/manifest.git -m hikey960.xml

repo sync

Thank you.


#4

@tateoka I will suggest you to use one of the OP-TEE release branch as those are tested ones. So to use latest release branch (v3.3.0), use following commands:

repo init -u https://github.com/OP-TEE/manifest.git -m hikey960.xml -b 3.3.0

repo sync

#5

Thank you for your help.
I installed v3.3.0.
As a result, it seems to work fine!

BTW.
Today, I noticed the package says “this is 4GB model.”
Do I need additional configuration etc?

Thank you.


#6

It looks like you need to enable CFG_DRAM_SIZE_GB=4 while building optee_os. So for auto-build you need to apply following patch to “build” repo:

diff --git a/hikey960.mk b/hikey960.mk
index fbb91e2..0395d4e 100644
--- a/hikey960.mk
+++ b/hikey960.mk
@@ -178,7 +178,8 @@ linux-cleaner: linux-cleaner-common
 ################################################################################
 OPTEE_OS_COMMON_FLAGS += PLATFORM=hikey-hikey960 \
                        CFG_CONSOLE_UART=$(CFG_CONSOLE_UART) \
-                       CFG_SECURE_DATA_PATH=n
+                       CFG_SECURE_DATA_PATH=n \
+                       CFG_DRAM_SIZE_GB=4
 OPTEE_OS_CLEAN_COMMON_FLAGS += PLATFORM=hikey-hikey960
 
 .PHONY: optee-os

BTW, it won’t have any impact on OP-TEE TA execution until you use dynamic (registered) shared memory.