diff --git a/configs/AM62LX/AM62LX_linux_toc.txt b/configs/AM62LX/AM62LX_linux_toc.txt index 4dafccf30..e05b13649 100644 --- a/configs/AM62LX/AM62LX_linux_toc.txt +++ b/configs/AM62LX/AM62LX_linux_toc.txt @@ -95,7 +95,7 @@ linux/Foundational_Components/Machine_Learning/armnn linux/Foundational_Components/Machine_Learning/nnstreamer linux/Foundational_Components/Machine_Learning/onnxrt linux/Foundational_Components/Machine_Learning/tflite -#linux/Foundational_Components_OPTEE +linux/Foundational_Components_OPTEE linux/Foundational_Components_ATF linux/Foundational_Components_Virtualization linux/Foundational_Components/Virtualization/Docker diff --git a/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst index 7c65ee6bf..44eb553f7 100644 --- a/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM62AX/linux/RT_Linux_Performance_Guide.rst @@ -1,5 +1,5 @@ ====================================== - RT-linux 11.00 Performance Guide + RT-linux 11.01 Performance Guide ====================================== .. rubric:: **Read This First** @@ -57,14 +57,24 @@ Test commands used for running stress-ng and cyclictest together stress-ng --cpu-method=all -c 4 & cyclictest -m -Sp80 -D6h -h400 -i200 -M -q -The latencies where observed with this SDK are summarized below: +The following summarizes the latencies observed using the yocto based +default SDK image: + +.. note:: + + A known issue in this SDK release is affecting this benchmark. + Using OP-TEEs PRNG drivers rather than the hardware accelerated + TRNG drivers restores the context switch latencies to the values you + see here. + + More information on switching to the PRNG drivers can be found in the + Foundational Components section, here :ref:`building-optee-with-prng` .. csv-table:: :header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3" "Minimum (us)","5","5","5","5" - "Average (us)","5","6","6","5" - "Maximum (us)","68","31","34","28" + "Average (us)","6","6","6","6" + "Maximum (us)","31","29","30","30" .. image:: img/rt-cpu-method-all-latency-histogram.png - diff --git a/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png index e2f0c31c0..35c25420f 100644 Binary files a/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM62AX/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst index 9f47d9972..ab01f01af 100644 --- a/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM62LX/linux/RT_Linux_Performance_Guide.rst @@ -56,13 +56,24 @@ Test commands used for running stress-ng and cyclictest together stress-ng --cpu-method=all -c 4 & cyclictest -m -Sp80 -D6h -h400 -i200 -M -q -The latencies observed with this SDK are summarized below: +The following summarizes the latencies observed using the yocto based +default SDK image: + +.. note:: + + A known issue in this SDK release is affecting this benchmark. + Using OP-TEEs PRNG drivers rather than the hardware accelerated TRNG + drivers restores the context switch latencies to the values you see + here. + + More information on switching to the PRNG drivers can be found in the + Foundational Components section, here :ref:`building-optee-with-prng` .. csv-table:: :header: "Latencies","CPU 0","CPU 1" "Minimum (us)","5","5" - "Average (us)","6","8" - "Maximum (us)","47","53" + "Average (us)","8","7" + "Maximum (us)","57","48" .. image:: img/rt-cpu-method-all-latency-histogram.png diff --git a/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png index f1e689e0a..ef0e71a26 100644 Binary files a/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM62LX/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst index 780c34920..d02ecea29 100644 --- a/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM62PX/linux/RT_Linux_Performance_Guide.rst @@ -57,13 +57,24 @@ Test commands used for running stress-ng and cyclictest together stress-ng --cpu-method=all -c 4 & cyclictest -m -Sp80 -D6h -h400 -i200 -M -q -The latencies observed with this SDK are summarized below: +The following summarizes the latencies observed using the yocto based +default SDK image + +.. note:: + + A known issue in this SDK release is affecting this benchmark. + Using OP-TEEs PRNG drivers rather than the hardware accelerated TRNG + drivers restores the context switch latencies to the values you see + here. + + More information on switching to the PRNG drivers can be found in the + Foundational Components section, here :ref:`building-optee-with-prng` .. csv-table:: :header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3" "Minimum (usec)","5","5","5","5" - "Average (usec)","6","6","5","6" - "Maximum (usec)","30","33","31","35" + "Average (usec)","6","6","7","6" + "Maximum (usec)","36","34","37","34" .. image:: img/rt-cpu-method-all-latency-histogram.png diff --git a/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png index 6433c5b37..ce59ef96d 100644 Binary files a/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM62PX/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/devices/AM62X/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM62X/linux/RT_Linux_Performance_Guide.rst index 35de6053f..e835e18f1 100644 --- a/source/devices/AM62X/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM62X/linux/RT_Linux_Performance_Guide.rst @@ -61,13 +61,26 @@ Test commands used for running stress-ng and cyclictest together stress-ng --cpu-method=all -c 4 & cyclictest -m -Sp80 -D6h -h400 -i200 -M -q -The latencies observed with this SDK are summarized below: +The following summarizes the latencies observed using the yocto based +default SDK image using the SK-AM62B-P1_ reference board: + +.. _SK-AM62B-P1: https://www.ti.com/tool/SK-AM62B-P1 + +.. note:: + + A known issue in this SDK release is affecting this benchmark. + Using OP-TEE's PRNG drivers rather than the hardware accelerated TRNG + drivers restores the context switch latencies to the values you see + here. + + More information on switching to the PRNG drivers can be found in the + Foundational Components section, here :ref:`building-optee-with-prng` .. csv-table:: :header: "Latencies","CPU 0","CPU 1","CPU 2","CPU 3" - "Minimum (usec)","5","5","4","4" - "Average (usec)","7","5","6","6" - "Maximum (usec)","66","41","73","70" + "Minimum (usec)","5","5","5","5" + "Average (usec)","6","6","6","6" + "Maximum (usec)","62","46","47","52" .. image:: img/rt-cpu-method-all-latency-histogram.png diff --git a/source/devices/AM62X/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM62X/linux/img/rt-cpu-method-all-latency-histogram.png index a36483b58..84e30f8ac 100644 Binary files a/source/devices/AM62X/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM62X/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst b/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst index 1c0429250..64f664c69 100644 --- a/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst +++ b/source/devices/AM64X/linux/RT_Linux_Performance_Guide.rst @@ -58,14 +58,25 @@ Test commands used for running stress-ng and cyclictest together stress-ng --cpu-method=all -c 4 & cyclictest -m -Sp80 -D6h -h400 -i200 -M -q -The latencies observed with this DK are summarized below: +The following summarizes the latencies observed using the yocto based +default SDK image: + +.. note:: + + A known issue in this SDK release is affecting this benchmark. + Using OP-TEE's PRNG drivers rather than the hardware accelerated TRNG + drivers restores the context switch latencies to the values you see + here. + + More information on switching to the PRNG drivers can be found in the + Foundational Components section, here :ref:`building-optee-with-prng` .. csv-table:: :header: "Latencies","CPU 0","CPU 1" "Minimum (usec)","6","6" - "Average (usec)","8","8" - "Maximum (usec)","77","105" + "Average (usec)","10","9" + "Maximum (usec)","77","52" .. image:: img/rt-cpu-method-all-latency-histogram.png @@ -791,8 +802,8 @@ RP Message Inter-Processor Communication (IPC) Latency RP Message latency Performance ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -RP Message latency is the delay measured from sending a round trip echo message from -a Linux application to a remote processor and back. The following measurements use +RP Message latency is the delay measured from sending a round trip echo message from +a Linux application to a remote processor and back. The following measurements use a RP message length of 1 byte and 490 bytes for comparison. The Linux user space application `rpmsg_char_benchmark `__ captures these latency values. diff --git a/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png b/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png index 54a41d8d5..2e525ebf9 100644 Binary files a/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png and b/source/devices/AM64X/linux/img/rt-cpu-method-all-latency-histogram.png differ diff --git a/source/linux/Foundational_Components_OPTEE.rst b/source/linux/Foundational_Components_OPTEE.rst index 9621917f0..91c50bb74 100644 --- a/source/linux/Foundational_Components_OPTEE.rst +++ b/source/linux/Foundational_Components_OPTEE.rst @@ -3,8 +3,6 @@ OP-TEE ====== -.. rubric:: Overview - OP-TEE is a Trusted Execution Environment (TEE) designed as a companion to a non-secure Linux kernel running on Arm Cortex-A cores using the TrustZone technology. @@ -16,7 +14,8 @@ The OP-TEE binary (bl32.bin/tee-pager_v2.bin) is bundled into tispl.bin and the | -.. rubric:: Getting the OP-TEE Source Code +Getting the OP-TEE Source Code +------------------------------ The pre-built OPTEE binary should be packaged in TI Processor SDK: /board-support/prebuilt-images//bl32.bin. Use this binary since it has been tested with TI Processor SDK. @@ -32,13 +31,15 @@ Where is the OPTEE commit shown here: :ref:`optee-release-notes`. | -.. rubric:: Setting up the toolchain paths +Setting up the toolchain paths +------------------------------ .. include:: Overview/GCC_ToolChain.rst :start-after: .. start_include_yocto_toolchain_host_setup :end-before: .. end_include_yocto_toolchain_host_setup -.. rubric:: Building OP-TEE OS +Building OP-TEE OS +------------------ .. ifconfig:: CONFIG_part_variant in ('J721S2', 'J784S4','J742S2') @@ -46,19 +47,37 @@ Where is the OPTEE commit shown here: :ref:`optee-release-notes`. $ export CFG_CONSOLE_UART=0x8 -* Building the OPTEE image +Building the OP-TEE image +************************* .. parsed-literal:: $ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y -* Building the OPTEE image with debug parameters +Building the OP-TEE image with debug parameters +*********************************************** .. parsed-literal:: $ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=2 CFG_TEE_CORE_DEBUG=y -.. rubric:: Secure Storage with RPMB (For HS) +.. _building-optee-with-prng: + +Building OP-TEE with Pseudo RNG drivers +*************************************** + +In certain highly specific use-cases the true RNG drivers could have a +detrimental effect to the overall system latency. Using the +``CFG_WITH_SOFTWARE_PRNG`` flag to use OP-TEE's Pseudo RNG drivers as a source +of entropy can work around these issues. + +.. parsed-literal:: + + $ make CROSS_COMPILE="$CROSS_COMPILE_32" CROSS_COMPILE64="$CROSS_COMPILE_64" PLATFORM=k3-|__OPTEE_PLATFORM_FLAVOR__| CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y + + +Secure Storage with RPMB (For HS) +********************************* OP-TEE provides secure storage functionality. TI SoCs with HS configuration have a KEK embedded in them that is programmed across OP-TEE instances that are distributed @@ -88,7 +107,8 @@ E.g. For enabling hybrid mode of RPMB along with REE_FS OPTEE-client also needs to be updated to enable the use of real emmc instead of the virtual emmc that is enabled by default -.. rubric:: Getting OP-TEE Client source code +Getting OP-TEE Client source code +--------------------------------- .. code-block:: console @@ -105,7 +125,8 @@ in `out/export/usr` folder | -.. rubric:: Building u-boot with OP-TEE OS +Building u-boot with OP-TEE OS +------------------------------ As of Processor SDK 9.0, the signing functionality earlier provided by the TI Security Development Package, has been integrated within U-Boot itself. This means tee-pager_v2.bin does not need to be signed before being packaged