From bd637723f0cf00e7ef69c3f5d051186ff6dab960 Mon Sep 17 00:00:00 2001 From: Ben Horgan Date: Tue, 22 Nov 2022 15:30:23 +0000 Subject: [PATCH 1/2] tc2: Instructions on how to build the mali DDK This does not include the creation of the android device profile. Change-Id: I24711ae9f588c1776b815aa0d003d0863ca8a7d9 --- docs/totalcompute/tc2/user-guide.rst | 81 ++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/docs/totalcompute/tc2/user-guide.rst b/docs/totalcompute/tc2/user-guide.rst index 7e926ce..c6b2306 100755 --- a/docs/totalcompute/tc2/user-guide.rst +++ b/docs/totalcompute/tc2/user-guide.rst @@ -426,6 +426,87 @@ Switch between SCP and AP .. figure:: Switch_Cores.png +Building the Mali GPU DDK +######################### + +The Mali GPU DDK is not part of this release and hence needs to be +obtained separately. Also, note that the GPU is not modelled in the +FVP. The version that has been tested is r40p0_01eac0. These +instructions assume you have the Mali DDK in the directory $MALI_DDK +with all submodules. These instructions assume you are building the +DDK for Android but do not cover device profile changes. The three +components of the DDK build are the linux device driver, the CSF +firmware and gralloc. + +Building the linux driver +------------------------- +The driver, mali_kbase.ko, must be build as a module. One method is to do this in-tree. + +#. cp -R $MALI_DDK/product/kernel/drivers $MALI_DDK/product/kernel/include src/linux +#. Edit the kbuild system to include the driver as described by this patch. + +:: + diff --git a/drivers/Kconfig b/drivers/Kconfig + index e346c35f42b4..978e083d1427 100644 + --- a/drivers/Kconfig + +++ b/drivers/Kconfig + @@ -238,4 +238,6 @@ source "drivers/interconnect/Kconfig" + source "drivers/counter/Kconfig" + + source "drivers/most/Kconfig" + +source "drivers/base/arm/Kconfig" + +source "drivers/gpu/arm/midgard/Kconfig" + endmenu + diff --git a/drivers/base/Makefile b/drivers/base/Makefile + index ef8e44a7d288..1151ad6ff861 100644 + --- a/drivers/base/Makefile + +++ b/drivers/base/Makefile + @@ -33,3 +33,4 @@ ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG + # define_trace.h needs to know how to find our header + CFLAGS_trace.o := -I$(src) + obj-$(CONFIG_TRACING) += trace.o + +obj-y += arm/ + diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile + index 835c88318cec..37888b7ecf31 100644 + --- a/drivers/gpu/Makefile + +++ b/drivers/gpu/Makefile + @@ -6,3 +6,4 @@ obj-$(CONFIG_TEGRA_HOST1X) += host1x/ + obj-y += drm/ vga/ + obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/ + obj-$(CONFIG_TRACE_GPU_MEM) += trace/ + +obj-y += arm/ + +Building the csf firmware +------------------------- + +#. cd $MALI_DDK +#. export KERNEL_DIR=/bsp/src/linux +#. mkdir -p build_cfw +#. export BUILDDIR=$PWD/build_cfw +#. bldsys/bootstrap_linux.bash +#. build_cfw/config LINUX=y CSFFW=y EGL=y GPU_TTIX=y RELEASE=y DEBUG=n SYMBOLS=n GLES=y CL=n VULKAN=y TARGET_GNU_PREFIX=/bsp/tools/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- KERNEL_DIR=$KERNEL_DIR +#. build_cfw/buildme csffw + +Incorporate this in an Android build: + +#. mkdir -p /android/vendor/arm/mali/product/firmware +#. cp build_cfw/install/bin/mali_csffw.bin firmware_prebuilt/ttix + +Building gralloc +---------------- + +Copy or clone the Mali DDK into the android tree at /android/vendor/arm/mali/ +This assumes a lunch target 'tc2_hwr' has been created. + +#. cd /android/ +#. source build/envsetup.sh +#. lunch tc2_hwr +#. cd vendor/arm/mali/product +#. ./setup_android ANDROID=y CSFFW=n EGL=y GPU_TTIX=y RELEASE=y DEBUG=n SYMBOLS=n GLES=y CL=n VULKAN=y INSTRUMENTATION_GFX=y KERNEL_DIR=$KERNEL_DIR KERNEL_COMPILER=/bsp/tools/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- KERNEL_CC=$TC2_ANDROID/prebuilts/clang/host/linux-x86/clang-r416183b/bin/clang USES_REFERENCE_GRALLOC=y REFERENCE_GRALLOC_XML=y +#. ./android/gralloc/configure +#. mmm +#. mm + -------------- *Copyright (c) 2022, Arm Limited. All rights reserved.* -- GitLab From 374dabd5d3a1a574dec15ae0c12ce7e06f42b4e2 Mon Sep 17 00:00:00 2001 From: Anders Dellien Date: Tue, 22 Nov 2022 14:27:13 +0000 Subject: [PATCH 2/2] tc2: Update documentation for 2022.12.01 release Signed-off-by: Anders Dellien Change-Id: I67a2f59a1a298710c7716f2710b797055d94877a --- docs/totalcompute/readme.rst | 2 ++ docs/totalcompute/tc2/change-log.rst | 11 ++++++ docs/totalcompute/tc2/release_notes.rst | 16 +++++---- docs/totalcompute/tc2/user-guide.rst | 48 ++++++++++++++++++++++--- 4 files changed, 66 insertions(+), 11 deletions(-) diff --git a/docs/totalcompute/readme.rst b/docs/totalcompute/readme.rst index 8b32df1..6bd5a67 100644 --- a/docs/totalcompute/readme.rst +++ b/docs/totalcompute/readme.rst @@ -10,6 +10,8 @@ Total Compute focuses on optimizing Performance, Security, and Developer Access TC2 release tags ================ +`TC2-2022.12.01 `_ + `TC2-2022.08.12 `_ TC1 release tags diff --git a/docs/totalcompute/tc2/change-log.rst b/docs/totalcompute/tc2/change-log.rst index 6a6ffdf..87ed3ef 100644 --- a/docs/totalcompute/tc2/change-log.rst +++ b/docs/totalcompute/tc2/change-log.rst @@ -8,6 +8,17 @@ Change Log This document contains a summary of the new features, changes and fixes in each release of TC2 software stack. +Version 2022.12.01 +------------------ + +Features added +~~~~~~~~~~~~~~ +- Added support for MTE3/EPAN +- Added support for Firmware Update +- Enabled VHE support in Hafnium to support S-EL0 partitions +- Enabled S2 translation for GPU and DPU using SMMU-700 +- Enabled protected nVHE support for pKVM hypervisor + Version 2022.08.12 ------------------ diff --git a/docs/totalcompute/tc2/release_notes.rst b/docs/totalcompute/tc2/release_notes.rst index 5986be2..dd9ba95 100755 --- a/docs/totalcompute/tc2/release_notes.rst +++ b/docs/totalcompute/tc2/release_notes.rst @@ -1,13 +1,13 @@ .. _docs/totalcompute/tc2/release_notes: -Release notes - 2022.08.12 +Release notes - 2022.12.01 ========================== .. contents:: Release tag ----------- -The manifest tag for this release is TC2-2022.08.12 +The manifest tag for this release is TC2-2022.12.01 Components ---------- @@ -39,6 +39,7 @@ Software Features - Android Common Kernel 5.15 - With Android AOSP master support, the KVM default mode of operation is set to ``protected``, thus effectively enabling pKVM on the system. This is a nVHE based mode with kernel running at EL1. - Microdroid based pVM support in Android + - GPU and DPU using S2 translation with SMMU-700 - Trusted Firmware-A & Hafnium v2.7 - OP-TEE 3.18.0 with support for PAC/MTE/BTI - Trusty with FF-A messaging @@ -46,7 +47,7 @@ Software Features - Support secure boot based on TBBR specification https://developer.arm.com/documentation/den0006/latest - System Control Processor (SCP) firmware v2.10 - Build system based on scripts which improves build times compared to Yocto - - U-Boot bootloader v2022.01 + - U-Boot bootloader v2022.04 - Power management features: cpufreq and cpuidle. - SCMI (System Control and Management Interface) support. - Verified u-boot for authenticating fit image (containing kernel + ramdisk) during Buildroot boot. @@ -61,16 +62,17 @@ Software Features - Shim Layer at S-EL1 running on top of S-EL2 SPMC (Hafnium) used by Trusted Services running in S-EL0. - Tracing - Added support for ETE and TRBE v1.0 in TF-A, kernel and simpleperf. Traces can be captured with simpleperf. However, to enable tracing, the libete plugin has to be loaded while executing the FVP with ``--plugin /libete-plugin.so`` - Example implementation of a HW Root of Trust based on the TF-M RSS subsystem. For non-RSS based boot, please refer to the TC0/TC1 boot flows. + - Firmware update support Platform Support ---------------- - - This Software release is tested on TC2 Fast Model platform (FVP). - - Supported Fast model version for this release is 11.18.28 + - The Buildroot configuration of this software release is tested on TC2 Fast Model platform (FVP). + - Supported Fast model version for this release is 11.19.25 Known issues or Limitations --------------------------- - #. Android takes several hours to boot. - #. We see occasional FVP crashes when booting Android. This issue is currently being investigated, please contact support if you need more information. + #. Android boot has not been tested on the FVP and is not guaranteed to work. + All validation of Android has been done on internal FPGA platforms. #. At the U-Boot prompt press enter and type "boot" to continue booting else wait for ~15 secs for boot to continue automatically. This is because of the time difference in CPU frequency and FVP operating frequency. diff --git a/docs/totalcompute/tc2/user-guide.rst b/docs/totalcompute/tc2/user-guide.rst index c6b2306..b5e88ca 100755 --- a/docs/totalcompute/tc2/user-guide.rst +++ b/docs/totalcompute/tc2/user-guide.rst @@ -60,7 +60,7 @@ For ubuntu 20.04 and higher: Syncing and building the source code ------------------------------------ -There are two distros supported in the TC2 software stack: buildroot (a minimal distro containing busybox) and android. +There are two distros supported in the TC2 software stack: buildroot (a minimal distro containing busybox) and Android. Syncing code ############ @@ -70,7 +70,7 @@ in these instructions. :: mkdir cd - export TC2_RELEASE=refs/tags/TC2-2022.08.12 + export TC2_RELEASE=refs/tags/TC2-2022.12.01 To sync BSP only without Android, run the following repo command. :: @@ -243,7 +243,7 @@ Based on `Trusted Services `__). +The component responsible for building a 5.15 version of the Android Common kernel (`ACK `__). +--------+-----------------------------------------------------------------------------------------------+ | Script | /build-scripts/build-linux.sh | @@ -507,6 +507,46 @@ This assumes a lunch target 'tc2_hwr' has been created. #. mmm #. mm --------------- + +Firmware Update +--------------- + +Creating Capsule +################ + +Firmware Update in the total compute platform uses the capsule update mechanism. Hence, the Firmware Image Package (FIP) binary +has to be converted to a capsule. This can be done with ``GenerateCapsule`` which is present in ``BaseTools/BinWrappers/PosixLike`` +of the `edk2 project `__. + +:: + + GenerateCapsule -e -o efi_capsule --fw-version 1 --lsv 0 --guid 0d5c011f-0776-5b38-8e81-36fbdf6743e2 --verbose --update-image-index 0 --verbose fip-tc.bin + +| "fip-tc.bin" is the input fip file that has the firmware binaries of the total compute platform +| "efi_capsule" is the name of capsule to be generated +| "0d5c011f-0776-5b38-8e81-36fbdf6743e2" is the image type UUID for the FIP image + +Loading Capsule +############### + +The capsule generated using the above steps has to be loaded into memory during the execution of the model by providing the below FVP arguments. + +:: + + --data board.dram=/efi_capsule@0x2000000 + +This loads the capsule to be updated at address 0x82000000 + +Updating Firmware +################# + +During the normal boot of the platform, stop at the U-Boot prompt and execute the below commands. + +:: + + TOTAL_COMPUTE# efidebug capsule update -v 0x82000000 + +This will update the firmware. After it is completed, reboot the platform using the FVP GUI + *Copyright (c) 2022, Arm Limited. All rights reserved.* -- GitLab