Paul Beesley | 23cfacc | 2019-10-04 10:37:48 +0000 | [diff] [blame] | 1 | QEMU SBSA Target |
| 2 | ================ |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 3 | |
| 4 | Trusted Firmware-A (TF-A) implements the EL3 firmware layer for QEMU SBSA |
| 5 | Armv8-A. While running Qemu from command line, we need to supply two Flash |
| 6 | images. First Secure BootRom is supplied by -pflash argument. This Flash image |
| 7 | is made by EDK2 build system by composing BL1 and FIP. Second parameter for Qemu |
| 8 | is responsible for Non-secure rom which also given with -pflash argument and |
| 9 | contains of UEFI and EFI variables (also made by EDK2 build system). Semihosting |
| 10 | is not used |
| 11 | |
| 12 | When QEMU starts all CPUs are released simultaneously, BL1 selects a |
| 13 | primary CPU to handle the boot and the secondaries are placed in a polling |
| 14 | loop to be released by normal world via PSCI. |
| 15 | |
| 16 | BL2 edits the FDT, generated by QEMU at run-time to add a node describing PSCI |
| 17 | and also enable methods for the CPUs. |
| 18 | |
| 19 | Current limitations: |
| 20 | |
| 21 | - Only cold boot is supported |
| 22 | - No instructions for how to load a BL32 (Secure Payload) |
| 23 | |
| 24 | To build TF-A: |
| 25 | |
| 26 | :: |
| 27 | |
| 28 | git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa |
| 29 | cd tfa |
Mark Dykes | ef3a456 | 2020-01-08 20:37:18 +0000 | [diff] [blame] | 30 | export CROSS_COMPILE=aarch64-linux-gnu- |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 31 | make PLAT=qemu_sbsa all fip |
| 32 | |
| 33 | Images will be placed at build/qemu_sbsa/release (bl1.bin and fip.bin). |
| 34 | Need to copy them into top directory for EDK2 compilation. |
| 35 | |
| 36 | :: |
| 37 | |
| 38 | cp build/qemu_sbsa/release/bl1.bin ../ |
| 39 | cp build/qemu_sbsa/release/fip.bin ../ |
| 40 | |
| 41 | Those images cannot be used by itself (no semihosing support). Flash images are built by |
| 42 | EDK2 build system, refer to edk2-platform repo for full build instructions. |
| 43 | |
| 44 | :: |
| 45 | |
| 46 | git clone https://github.com/tianocore/edk2-platforms.git |
| 47 | Platform/Qemu/SbsaQemu/Readme.md |
| 48 | |