blob: bc82ae526fb077dd021e937b4010cb51c02d4b5a [file] [log] [blame]
Paul Beesley23cfacc2019-10-04 10:37:48 +00001QEMU SBSA Target
2================
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +02003
4Trusted Firmware-A (TF-A) implements the EL3 firmware layer for QEMU SBSA
5Armv8-A. While running Qemu from command line, we need to supply two Flash
6images. First Secure BootRom is supplied by -pflash argument. This Flash image
7is made by EDK2 build system by composing BL1 and FIP. Second parameter for Qemu
8is responsible for Non-secure rom which also given with -pflash argument and
9contains of UEFI and EFI variables (also made by EDK2 build system). Semihosting
10is not used
11
12When QEMU starts all CPUs are released simultaneously, BL1 selects a
13primary CPU to handle the boot and the secondaries are placed in a polling
14loop to be released by normal world via PSCI.
15
16BL2 edits the FDT, generated by QEMU at run-time to add a node describing PSCI
17and also enable methods for the CPUs.
18
19Current limitations:
20
21- Only cold boot is supported
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +020022
23To build TF-A:
24
25::
26
27 git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa
28 cd tfa
Masahisa Kojima099064b2020-06-11 21:46:44 +090029 export CROSS_COMPILE=aarch64-none-elf-
Radoslaw Biernacki1201aba2018-05-17 22:52:49 +020030 make PLAT=qemu_sbsa all fip
31
Masahisa Kojima099064b2020-06-11 21:46:44 +090032To 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 Biernacki1201aba2018-05-17 22:52:49 +020041Images will be placed at build/qemu_sbsa/release (bl1.bin and fip.bin).
42Need 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
49Those images cannot be used by itself (no semihosing support). Flash images are built by
50EDK2 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