Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | COMPATIBLE_MACHINE:qemuarm64-secureboot = "qemuarm64-secureboot" |
| 2 | COMPATIBLE_MACHINE:qemu-generic-arm64 = "qemu-generic-arm64" |
| 3 | COMPATIBLE_MACHINE:qemuarm-secureboot = "qemuarm-secureboot" |
| 4 | |
| 5 | #FIXME - clang fails to build tfa for qemuarm-secureboot, and possibly other |
| 6 | # arm/aarch32. This is a known testing hole in TF-A. |
| 7 | TOOLCHAIN:qemuarm-secureboot = "gcc" |
| 8 | |
| 9 | TFA_PLATFORM:qemuarm64-secureboot = "qemu" |
| 10 | TFA_PLATFORM:qemu-generic-arm64 = "qemu_sbsa" |
| 11 | TFA_PLATFORM:qemuarm-secureboot = "qemu" |
| 12 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 13 | # Trusted Services secure partitions require arm-ffa machine feature. |
| 14 | # Enabling Secure-EL1 Payload Dispatcher (SPD) in this case |
| 15 | TFA_SPD:qemuarm64-secureboot = "${@bb.utils.contains('MACHINE_FEATURES', 'arm-ffa', 'spmd', 'opteed', d)}" |
| 16 | # Configure tf-a accordingly to TS requirements if included |
| 17 | EXTRA_OEMAKE:append:qemuarm64-secureboot = "${@bb.utils.contains('MACHINE_FEATURES', 'arm-ffa', ' CTX_INCLUDE_EL2_REGS=0 SPMC_OPTEE=1 ', '' , d)}" |
| 18 | # Cortex-A57 supports Armv8.0 (no S-EL2 execution state). |
| 19 | # The SPD SPMC component should run at the S-EL1 execution state. |
| 20 | TFA_SPMD_SPM_AT_SEL2:qemuarm64-secureboot = "0" |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 21 | |
| 22 | TFA_UBOOT:qemuarm64-secureboot = "1" |
| 23 | TFA_UBOOT:qemuarm-secureboot = "1" |
| 24 | TFA_BUILD_TARGET:aarch64:qemuall = "all fip" |
| 25 | TFA_BUILD_TARGET:arm:qemuall = "all fip" |
| 26 | |
| 27 | TFA_INSTALL_TARGET:qemuarm64-secureboot = "flash.bin" |
| 28 | TFA_INSTALL_TARGET:qemu-generic-arm64 = "bl1 fip" |
| 29 | TFA_INSTALL_TARGET:qemuarm-secureboot = "flash.bin" |
| 30 | |
| 31 | DEPENDS:append:aarch64:qemuall = " optee-os" |
| 32 | DEPENDS:append:arm:qemuall = " optee-os" |
| 33 | |
| 34 | EXTRA_OEMAKE:append:aarch64:qemuall = " \ |
| 35 | BL32=${STAGING_DIR_TARGET}${nonarch_base_libdir}/firmware/tee-header_v2.bin \ |
| 36 | BL32_EXTRA1=${STAGING_DIR_TARGET}${nonarch_base_libdir}/firmware/tee-pager_v2.bin \ |
| 37 | BL32_EXTRA2=${STAGING_DIR_TARGET}${nonarch_base_libdir}/firmware/tee-pageable_v2.bin \ |
| 38 | BL32_RAM_LOCATION=tdram \ |
| 39 | " |
| 40 | |
| 41 | EXTRA_OEMAKE:append:arm:qemuall = " \ |
| 42 | BL32=${STAGING_DIR_TARGET}${nonarch_base_libdir}/firmware/tee-header_v2.bin \ |
| 43 | BL32_EXTRA1=${STAGING_DIR_TARGET}${nonarch_base_libdir}/firmware/tee-pager_v2.bin \ |
| 44 | BL32_EXTRA2=${STAGING_DIR_TARGET}${nonarch_base_libdir}/firmware/tee-pageable_v2.bin \ |
| 45 | ARM_ARCH_MAJOR=7 \ |
| 46 | ARCH=aarch32 \ |
| 47 | BL32_RAM_LOCATION=tdram \ |
| 48 | AARCH32_SP=optee \ |
| 49 | " |
| 50 | |
| 51 | do_compile:append:qemuarm64-secureboot() { |
| 52 | # Create a secure flash image for booting AArch64 Qemu. See: |
| 53 | # https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/docs/plat/qemu.rst |
| 54 | dd if=${BUILD_DIR}/bl1.bin of=${BUILD_DIR}/flash.bin bs=4096 conv=notrunc |
| 55 | dd if=${BUILD_DIR}/fip.bin of=${BUILD_DIR}/flash.bin seek=64 bs=4096 conv=notrunc |
| 56 | } |
| 57 | |
| 58 | do_compile:append:qemuarm-secureboot() { |
| 59 | # Create a secure flash image for booting AArch64 Qemu. See: |
| 60 | # https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/docs/plat/qemu.rst |
| 61 | dd if=${BUILD_DIR}/bl1.bin of=${BUILD_DIR}/flash.bin bs=4096 conv=notrunc |
| 62 | dd if=${BUILD_DIR}/fip.bin of=${BUILD_DIR}/flash.bin seek=64 bs=4096 conv=notrunc |
| 63 | } |