Manual build instructions for TF-RMM, TF-A and host EDK2 for QEMU-sbsa

Base repository and Virtual Disk Structure

All the instructions below are executed from the $(BASE) directory.

mkdir $BASE cd $BASE mkdir -p images/disks/virtual/efi/boot

TF-RMM

The Realm Management Monitor (RMM) connects KVM and the Realm guest.

RMM gets loaded into NS DRAM (because there isn't enough space in Secure RAM). TF-A carves out 1GB of memory for the RMM, and tells other software about it using a device-tree reserved memory node. The RMM is located at the base of the system RAM, i.e 0x10000000000, and the device tree move upward by 1GB. Modifications to the device tree are made dynamically by TF-A’s BL31.

Status: QEMU support has been merged. Additional patches are needed until PMUv3p7 is supported by QEMU.

Repo: extra patches are at https://git.codelinaro.org/linaro/dcap/rmm branch cca/v3
official repo is https://git.trustedfirmware.org/TF-RMM/tf-rmm.git/

Build:

git clone -b cca/v3 https://git.codelinaro.org/linaro/dcap/rmm.git cd rmm git submodule update --init --recursive export CROSS_COMPILE=aarch64-none-elf- cmake -DCMAKE_BUILD_TYPE=Debug -DRMM_CONFIG=qemu_sbsa_defcfg -B build-sbsa cmake --build build-sbsa cp build-sbsa/Debug/rmm.img ../images/

EDK2-NON-OSI

git clone https://github.com/tianocore/edk2-non-osi.git

TF-A

TF-A loads the RMM and bridges RMM and KVM. It also owns the Granule Protection Table (GPT).

Status: QEMU support is currently under review.

Repo: currently at https://git.codelinaro.org/linaro/dcap/tf-a/trusted-firmware-a branch cca/v3
official is https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/

Build:

EDK2-PLATFORMS

Host EDK2

Repo: https://github.com/tianocore/edk2.git

Build:

UEFI SHELL

The UEFI Shell is needed to start the Linux kernel without manual intervention.

UEFI Vitual Disk boot structure

UEFI uses a virtual disk to store the Linux kernel image and the startup arguments. The Linux image is compiled as part of the steps depicted in the common instructions.

Follow the rest of the manual build steps in the common section to complete the process.