qemu-sbsa.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. QEMU SBSA Target
  2. ================
  3. Trusted Firmware-A (TF-A) implements the EL3 firmware layer for QEMU SBSA
  4. Armv8-A. While running Qemu from command line, we need to supply two Flash
  5. images. First Secure BootRom is supplied by -pflash argument. This Flash image
  6. is made by EDK2 build system by composing BL1 and FIP. Second parameter for Qemu
  7. is responsible for Non-secure rom which also given with -pflash argument and
  8. contains of UEFI and EFI variables (also made by EDK2 build system). Semihosting
  9. is not used
  10. When QEMU starts all CPUs are released simultaneously, BL1 selects a
  11. primary CPU to handle the boot and the secondaries are placed in a polling
  12. loop to be released by normal world via PSCI.
  13. BL2 edits the FDT, generated by QEMU at run-time to add a node describing PSCI
  14. and also enable methods for the CPUs.
  15. Current limitations:
  16. - Only cold boot is supported
  17. To build TF-A:
  18. ::
  19. git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa
  20. cd tfa
  21. export CROSS_COMPILE=aarch64-none-elf-
  22. make PLAT=qemu_sbsa all fip
  23. To build TF-A with BL32 and SPM enabled(StandaloneMM as a Secure Payload):
  24. ::
  25. git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git tfa
  26. cd tfa
  27. export CROSS_COMPILE=aarch64-none-elf-
  28. make PLAT=qemu_sbsa BL32=../STANDALONE_MM.fd SPM_MM=1 EL3_EXCEPTION_HANDLING=1 all fip
  29. Images will be placed at build/qemu_sbsa/release (bl1.bin and fip.bin).
  30. Need to copy them into top directory for EDK2 compilation.
  31. ::
  32. cp build/qemu_sbsa/release/bl1.bin ../
  33. cp build/qemu_sbsa/release/fip.bin ../
  34. Those images cannot be used by itself (no semihosing support). Flash images are built by
  35. EDK2 build system, refer to edk2-platform repo for full build instructions.
  36. ::
  37. git clone https://github.com/tianocore/edk2-platforms.git
  38. Platform/Qemu/SbsaQemu/Readme.md