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.

SA LLD Example run on 66ak2h linux user space fail

Other Parts Discussed in Thread: 66AK2H14

Hi,sir,

I want to test sa function on 66ak2h,now copy saBasicExample_k2h.out from rootfs prebuild by ti.

I only run rmServer.out and saBasicExample_k2h.out. Maybe I lost some action to init environment need by SA??

The error message as follow.


root@k2hk-evm:~#

rmServer.out /usr/bin/device/k2h/global-resource-list.dtb /usr/bin/device/k2h/policy_dsp_arm.dtb
Starting rmServer.out
Daemon returned 0 as return value.
root@k2hk-evm:~# 
root@k2hk-evm:~# 
root@k2hk-evm:~#

root@k2hk-evm:~# ./saBasicExample_k2h.out


------- SA Basic Example Starting ---------


Initialized RM_Client0

initQmss: Initialized Free Descriptors. 
Unable to open below cppi tx channels...presuming linux has already enabled it 
0 1 2 3 4 5 6 8 
Unable to open below cppi Rx channels...presuming linux has already enabled it 
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
Instantiating SALLD ... DONE

Instantiating SALLD Channel 0 ...
DONE

Opening SALLD Channel 0 ...
SALLD Channel 0: General Configuration
SALLD Channel 0: Key Configuration
SALLD Channel 0: Enable Tx
SALLD Channel 0: Enable Rx
SALLD channel 0: Register SA Info
DONE

Routing Pkt 1 to PA: BufPtr = 0xb6cfb200, pkt at 0xb6cb6006, size = 170
SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.14-r2.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950 
Routing Pkt 2 to PA: BufPtr = 0xb6cfb400, pkt at 0xb6cb60b6, size = 170
SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.14-r2.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950 
Routing Pkt 3 to PA: BufPtr = 0xb6cfb500, pkt at 0xb6cb6166, size = 170
SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.14-r2.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950 
Routing Pkt 4 to PA: BufPtr = 0xb6cfb600, pkt at 0xb6cb6216, size = 170
SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.14-r2.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950 
Routing Pkt 5 to PA: BufPtr = 0xb6cfb700, pkt at 0xb6cb62c6, size = 170
SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.14-r2.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950 
SALLD channel 0: Send Null Packet
SALLD channel 0: Send Null Packet
salldSim_get_stats: Stats is not available in time
Chan 0 (IPSEC) Statistics:
----------------------------------------------------
numPktsEncHi = 0x00000000
numPktsEncLo = 0x00000000
numPktsDecHi = 0x00000000
numPktsDecLo = 0x00000000
numBytesEncHi = 0x00000000
numBytesEncLo = 0x00000000
numBytesDecHi = 0x00000000
numBytesDecLo = 0x00000000
numReplayOld = 0
numReplayDup = 0
numAuthFail = 0
txESN = 0x22222220
txSN = 0x12121212
rxESN = 0x11111110
Closing SALLD Channel 0 ...
SALLD channel 0: Send Null Packet
SALLD channel 0: UnRegister Sw Info
SALLD channel 0: Send Null Packet
DONE

SA IPSEC ESP test: PASSED
verifyTestFramework: Expected 64 entry count in the free descriptor queue (900), found 60
verifyTestFramework: Expected 16 entry count in linked buffer queue 1 (903), found 15
topLevelTest (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.14-r2.1/git/ti/drv/sa/example/SaBasicExample/src/armv7/linux/fw_main.c:424): verifyTestFramework returned error after test SA IPSEC ESP test. Exiting.
root@k2hk-evm:~#

  • Hi Sen,

    I've forwarded this to the Linux experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi, Sen,

    Where do you get the prebuilt example binary from? I can't locate it in the Linux filesystem. Are you following the instructijon in ti-processor-sdk-rtos-k2hk-evm-03.0x.0x.0x/pdk_k2hk_x_x_x/packages/ti/drv/sa/doc/UserGuide_SA_LLD.pdf?

    Rex
  • Hi, Sen,

    Which release do you use? If not the latest ProcSDK 3.2, please give it a try using ProcSDK 3.2. I got the same errors as yours using ProcSDK 3.1, but after upgrading to ProcSDK 3.2, I don't see the issue.

    Rex
  • Hi,Rex ,

    The process sdk  I used is ti-processor-sdk-linux-rt-k2hk-evm-03.00.00.04-Linux-x86-Install.bin, and the probuild binary include in tisdk-server-rootfs-image-k2hk-evm/usr/bin.

    I will try process sdk 3.02 again.

    thanks!!

  • Hi,Rex,

    I have tried processor sdk 3.2(ti-processor-sdk-linux-rt-k2hk-evm-03.02.00.05-Linux-x86-Install.bin)on k2hevm board,do follow  tests, but get the same errors.

    Could you tell me your rootfs and linux kernel version?

    First,I use tisdk-server-rootfs-image-k2hk-evm.ubi provide in filesystem fold,but  dont   saBasicExample_k2h.out,use prebuild binary in   tisdk-server-extra-rootfs-image-k2hk-evm.tar.xz  /usr/bin

    Then,try to create rootfs by sh,My operation is:

    1.run setup.sh in ti-processor-sdk-3.2, and I get a targetNFS. Because K2HEVM nand flash size is 512MB, i need to delete some file to create a small rootfs.

    so, I delele targetNFS\usr\include fold,and targetNFS\usr\share\ti\example

    2. run create-ubifs.sh, get a ubi file,custom-k2hk-evm-rootfs.ubi

    3.Burn u-boot-spi-k2hk-evm.gph to spi, and Burn ubi file to nand.

    4.Boot from spi.

    5.run rmServer.out and saBasicExample_k2h.out in /usr/bin fold.

    Arago Project http://arago-project.org k2hk-evm ttyS0

    Arago 2016.10 k2hk-evm ttyS0

    k2hk-evm login: root
    root@k2hk-evm:~# cat [ 31.825645] keystone-rapidio 2900000.rapidio: RIO port register timeout, port mask 0x1 not ready
    /proc/version
    Linux version 4.4.32-rt41-ge26c84b0ac (gtbldadm@ubuntu-16) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #1 SMP PREEMPT RT Wed Dec 14 19:45:38 EST 2016
    root@k2hk-evm:~# cd /usr/bin/
    root@k2hk-evm:/usr/bin# rmServer.out /usr/bin/device/k2h/global-resource-list.dtb /usr/bin/device/k2h/policy_dsp_arm.dtb
    [ 60.798910] random: nonblocking pool is initialized
    Starting rmServer.out
    Daemon returned 0 as return value.
    root@k2hk-evm:/usr/bin# ./sa
    saBasicExample_k2h.out saBasicExample_so_k2h.out saCoreDumpUtil_k2h.out saMCExample_k2h.out saMCExample_so_k2h.out
    saBasicExample_k2k.out saBasicExample_so_k2k.out saCoreDumpUtil_k2k.out saMCExample_k2k.out saMCExample_so_k2k.out
    root@k2hk-evm:/usr/bin# ./sa
    saBasicExample_k2h.out saBasicExample_so_k2h.out saCoreDumpUtil_k2h.out saMCExample_k2h.out saMCExample_so_k2h.out
    saBasicExample_k2k.out saBasicExample_so_k2k.out saCoreDumpUtil_k2k.out saMCExample_k2k.out saMCExample_so_k2k.out
    root@k2hk-evm:/usr/bin# ./saBasicExample_k2h.out


    ------- SA Basic Example Starting ---------


    Initialized RM_Client0

    initQmss: Initialized Free Descriptors.
    Unable to open below cppi tx channels...presuming linux has already enabled it
    0 1 2 3 4 5 6 8
    Unable to open below cppi Rx channels...presuming linux has already enabled it
    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    Instantiating SALLD ... DONE

    Instantiating SALLD Channel 0 ...
    DONE

    Opening SALLD Channel 0 ...
    SALLD Channel 0: General Configuration
    SALLD Channel 0: Key Configuration
    SALLD Channel 0: Enable Tx
    SALLD Channel 0: Enable Rx
    SALLD channel 0: Register SA Info
    DONE

    Routing Pkt 1 to PA: BufPtr = 0xb6ce9200, pkt at 0xb6ca4006, size = 170
    SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.16-r0.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950
    Routing Pkt 2 to PA: BufPtr = 0xb6ce9400, pkt at 0xb6ca40b6, size = 170
    SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.16-r0.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950
    Routing Pkt 3 to PA: BufPtr = 0xb6ce9500, pkt at 0xb6ca4166, size = 170
    SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.16-r0.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950
    Routing Pkt 4 to PA: BufPtr = 0xb6ce9600, pkt at 0xb6ca4216, size = 170
    SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.16-r0.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950
    Routing Pkt 5 to PA: BufPtr = 0xb6ce9700, pkt at 0xb6ca42c6, size = 170
    SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.16-r0.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950
    SALLD channel 0: Send Null Packet
    SALLD channel 0: Send Null Packet
    salldSim_get_stats: Stats is not available in time
    Chan 0 (IPSEC) Statistics:
    ----------------------------------------------------
    numPktsEncHi = 0x00000000
    numPktsEncLo = 0x00000000
    numPktsDecHi = 0x00000000
    numPktsDecLo = 0x00000000
    numBytesEncHi = 0x00000000
    numBytesEncLo = 0x00000000
    numBytesDecHi = 0x00000000
    numBytesDecLo = 0x00000000
    numReplayOld = 0
    numReplayDup = 0
    numAuthFail = 0
    txESN = 0x22222220
    txSN = 0x12121212
    rxESN = 0x11111110
    Closing SALLD Channel 0 ...
    SALLD channel 0: Send Null Packet
    SALLD channel 0: UnRegister Sw Info
    SALLD channel 0: Send Null Packet
    DONE

    SA IPSEC ESP test: PASSED
    verifyTestFramework: Expected 64 entry count in the free descriptor queue (900), found 60
    verifyTestFramework: Expected 16 entry count in linked buffer queue 1 (903), found 15
    topLevelTest (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.16-r0.1/git/ti/drv/sa/example/SaBasicExample/src/armv7/linux/fw_main.c:424): verifyTestFramework returned error after test SA IPSEC ESP test. Exiting.
    root@k2hk-evm:/usr/bin#
    root@k2hk-evm:/usr/bin#

  • Hi, Rex ,

    We do the test on K2EVM-HK,call function Sa_coreDump()  to get some SA register  value, but   the PID and other register all are 0x00.

    We found in the 66AK2H14 data sheet say "The Security Accelerator function is subject to export control and will be enabled only for approved device shipments", see highline.

    it means that some device maybe not support, we need to use SA module,what we need to do??

    And can you give me a .out file which you test ok on 66ak2h linux platform?Thanks.

  • Hi, Sen,

    I am checking internally on what channel to go through for the device with SA.

    The .out files I used are from Linux ProcSDK 3.2 release in filesystem/tisdk-server-extra-rootfs-image-k2hk-evm.tar.xz. Untar the tarball, and they are in usr/bin directory. I booted the EVM with the filesystem NFS mounted, and executed them right off the filesystem.

    a0850461local@uda0850461:~/work/ti-processor-sdk-linux-k2hk-evm-03.02.00.05/filesystem/extra/usr/bin$ ls -l rmServer*
    -rwxr-xr-x 1 a0850461local a0850461local 64700 Dec 14 19:30 rmServer.out
    -rwxr-xr-x 1 a0850461local a0850461local 18444 Dec 14 19:30 rmServer_so.out
    a0850461local@uda0850461:~/work/ti-processor-sdk-linux-k2hk-evm-03.02.00.05/filesystem/extra/usr/bin$ ls -l saBasicExample*
    -rwxr-xr-x 1 a0850461local a0850461local 335840 Dec 14 19:50 saBasicExample_k2h.out
    -rwxr-xr-x 1 a0850461local a0850461local 335840 Dec 14 19:50 saBasicExample_k2k.out
    -rwxr-xr-x 1 a0850461local a0850461local 139260 Dec 14 19:50 saBasicExample_so_k2h.out
    -rwxr-xr-x 1 a0850461local a0850461local 139260 Dec 14 19:50 saBasicExample_so_k2k.out

  • Hi, Rex,

    Thank you for your reply.

    I tested it as  your description,the same errors occurred.

    Is there a way to make sure that SA is supported and enabled? Or our K2HEVM board need some license?

    Routing Pkt 1 to PA: BufPtr = 0xb6d04200, pkt at 0xb6cbf006, size = 170
    SA IPSEC ESP test (/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/k2hk_evm-linux-gnueabi/sa-lld-test/03.00.00.16-r0.1/git/ti/drv/sa/example/SaBasicExample/src/tests/test1.c:401): Did not find SA reply in queue 950 

    ......

    Thanks~~~~

  • Hi, Sen,

    K2HEVM does not have SA. If yours is a K2HEVM, then reading SA registers showing all 0 including PID should be the right behavior for SA being disabled. You will need to either get a K2HEVMX, or a XTCIEVMK2X.

    Rex