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 |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 22 | |
| 23 | To build TF-A: |
| 24 | |
| 25 | :: |
| 26 | |
| 27 | git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa |
| 28 | cd tfa |
Masahisa Kojima | 099064b | 2020-06-11 21:46:44 +0900 | [diff] [blame] | 29 | export CROSS_COMPILE=aarch64-none-elf- |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 30 | make PLAT=qemu_sbsa all fip |
| 31 | |
Masahisa Kojima | 099064b | 2020-06-11 21:46:44 +0900 | [diff] [blame] | 32 | To build TF-A with BL32 and SPM enabled(StandaloneMM as a Secure Payload): |
| 33 | |
| 34 | :: |
| 35 | |
| 36 | git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa |
| 37 | cd tfa |
| 38 | export CROSS_COMPILE=aarch64-none-elf- |
| 39 | make PLAT=qemu_sbsa BL32=../STANDALONE_MM.fd SPM_MM=1 EL3_EXCEPTION_HANDLING=1 all fip |
| 40 | |
Radoslaw Biernacki | 1201aba | 2018-05-17 22:52:49 +0200 | [diff] [blame] | 41 | Images will be placed at build/qemu_sbsa/release (bl1.bin and fip.bin). |
| 42 | Need to copy them into top directory for EDK2 compilation. |
| 43 | |
| 44 | :: |
| 45 | |
| 46 | cp build/qemu_sbsa/release/bl1.bin ../ |
| 47 | cp build/qemu_sbsa/release/fip.bin ../ |
| 48 | |
| 49 | Those images cannot be used by itself (no semihosing support). Flash images are built by |
| 50 | EDK2 build system, refer to edk2-platform repo for full build instructions. |
| 51 | |
| 52 | :: |
| 53 | |
| 54 | git clone https://github.com/tianocore/edk2-platforms.git |
| 55 | Platform/Qemu/SbsaQemu/Readme.md |
| 56 | |