1*91f16700SchasingluluQEMU SBSA Target 2*91f16700Schasinglulu================ 3*91f16700Schasinglulu 4*91f16700SchasingluluTrusted Firmware-A (TF-A) implements the EL3 firmware layer for QEMU SBSA 5*91f16700SchasingluluArmv8-A. While running Qemu from command line, we need to supply two Flash 6*91f16700Schasingluluimages. First Secure BootRom is supplied by -pflash argument. This Flash image 7*91f16700Schasingluluis made by EDK2 build system by composing BL1 and FIP. Second parameter for Qemu 8*91f16700Schasingluluis responsible for Non-secure rom which also given with -pflash argument and 9*91f16700Schasinglulucontains of UEFI and EFI variables (also made by EDK2 build system). Semihosting 10*91f16700Schasingluluis not used 11*91f16700Schasinglulu 12*91f16700SchasingluluWhen QEMU starts all CPUs are released simultaneously, BL1 selects a 13*91f16700Schasingluluprimary CPU to handle the boot and the secondaries are placed in a polling 14*91f16700Schasinglululoop to be released by normal world via PSCI. 15*91f16700Schasinglulu 16*91f16700SchasingluluBL2 edits the FDT, generated by QEMU at run-time to add a node describing PSCI 17*91f16700Schasingluluand also enable methods for the CPUs. 18*91f16700Schasinglulu 19*91f16700SchasingluluCurrent limitations: 20*91f16700Schasinglulu 21*91f16700Schasinglulu- Only cold boot is supported 22*91f16700Schasinglulu 23*91f16700SchasingluluTo build TF-A: 24*91f16700Schasinglulu 25*91f16700Schasinglulu:: 26*91f16700Schasinglulu 27*91f16700Schasinglulu git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa 28*91f16700Schasinglulu cd tfa 29*91f16700Schasinglulu export CROSS_COMPILE=aarch64-none-elf- 30*91f16700Schasinglulu make PLAT=qemu_sbsa all fip 31*91f16700Schasinglulu 32*91f16700SchasingluluTo build TF-A with BL32 and SPM enabled(StandaloneMM as a Secure Payload): 33*91f16700Schasinglulu 34*91f16700Schasinglulu:: 35*91f16700Schasinglulu 36*91f16700Schasinglulu git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa 37*91f16700Schasinglulu cd tfa 38*91f16700Schasinglulu export CROSS_COMPILE=aarch64-none-elf- 39*91f16700Schasinglulu make PLAT=qemu_sbsa BL32=../STANDALONE_MM.fd SPM_MM=1 EL3_EXCEPTION_HANDLING=1 all fip 40*91f16700Schasinglulu 41*91f16700SchasingluluImages will be placed at build/qemu_sbsa/release (bl1.bin and fip.bin). 42*91f16700SchasingluluNeed to copy them into top directory for EDK2 compilation. 43*91f16700Schasinglulu 44*91f16700Schasinglulu:: 45*91f16700Schasinglulu 46*91f16700Schasinglulu cp build/qemu_sbsa/release/bl1.bin ../ 47*91f16700Schasinglulu cp build/qemu_sbsa/release/fip.bin ../ 48*91f16700Schasinglulu 49*91f16700SchasingluluThose images cannot be used by itself (no semihosing support). Flash images are built by 50*91f16700SchasingluluEDK2 build system, refer to edk2-platform repo for full build instructions. 51*91f16700Schasinglulu 52*91f16700Schasinglulu:: 53*91f16700Schasinglulu 54*91f16700Schasinglulu git clone https://github.com/tianocore/edk2-platforms.git 55*91f16700Schasinglulu Platform/Qemu/SbsaQemu/Readme.md 56*91f16700Schasinglulu 57