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