Hi Rebecca,
No problem asking.
Not immediately related to the TF-A log, but the image specified as BL32 shall rather be the secure Hafnium build (hafnium/out/reference/secure_aem_v8a_fvp_clang/hafnium.bin).
The TF-A boot log suggests that the first secure partition is not found within the FIP image. So there is a problem in terms of provisioning the SP into the FIP and have the BL2 loader finding it. It can be a mismatch with UUIDs, or related to the contents of the json layout file. If that's an information you can share, let us know the nature of the secure partition image you wish to have TF-A loaded and booted by Hafnium.
If you wish to reproduce a known working setup you can use below command lines using master for each tree:
TF-a-tests: make CROSS_COMPILE=aarch64-none-elf- PLAT=fvp DEBUG=1 TESTS=spm -j8
Hafnium: make PROJECT=reference
TF-A: make CROSS_COMPILE=aarch64-none-elf- SPD=spmd CTX_INCLUDE_EL2_REGS=1 ARM_ARCH_MINOR=5 BRANCH_PROTECTION=1 CTX_INCLUDE_PAUTH_REGS=1 PLAT=fvp DEBUG=1 BL33=../tf-a-tests/build/fvp/debug/tftf.bin BL32=../hafnium/out/reference/secure_aem_v8a_fvp_clang/hafnium.bin SP_LAYOUT_FILE=../tf-a-tests/build/fvp/debug/sp_layout.json all fip
Run the model: <path-to-fvp>/FVP_Base_RevC-2xAEMv8A -C pctl.startup=0.0.0.0 -C cluster0.NUM_CORES=4 -C cluster1.NUM_CORES=4 -C bp.secure_memory=1 -C bp.secureflashloader.fname=trusted-firmware-a/build/fvp/debug/bl1.bin -C bp.flashloader0.fname=trusted-firmware-a/build/fvp/debug/fip.bin -C cluster0.has_arm_v8-5=1 -C cluster1.has_arm_v8-5=1 -C cluster0.has_branch_target_exception=1 -C cluster1.has_branch_target_exception=1 -C cluster0.has_pointer_authentication=2 -C cluster1.has_pointer_authentication=2 -C cluster0.restriction_on_speculative_execution=2 -C cluster1.restriction_on_speculative_execution=2 -C pci.pci_smmuv3.mmu.SMMU_AIDR=2 -C pci.pci_smmuv3.mmu.SMMU_IDR0=0x0046123B -C pci.pci_smmuv3.mmu.SMMU_IDR1=0x00600002 -C pci.pci_smmuv3.mmu.SMMU_IDR3=0x1714 -C pci.pci_smmuv3.mmu.SMMU_IDR5=0xFFFF0472 -C pci.pci_smmuv3.mmu.SMMU_S_IDR1=0xA0000002 -C pci.pci_smmuv3.mmu.SMMU_S_IDR2=0 -C pci.pci_smmuv3.mmu.SMMU_S_IDR3=0
It should end up with the following test results:
******************************* Summary *******************************
Test suite 'FF-A Version'
Passed
Test suite 'FF-A RXTX Mapping'
Passed
Test suite 'FF-A Direct messaging'
Passed
Test suite 'FF-A Power management'
Passed
Test suite 'FF-A Memory Sharing'
Passed
Test suite 'FF-A features'
Passed
Test suite 'SIMD,SVE Registers context'
Passed
Test suite 'FF-A Interrupt'
Passed
Test suite 'SMMUv3 tests'
Passed ================================= Tests Skipped : 0 Tests Passed : 20 Tests Failed : 0 Tests Crashed : 0 Total tests : 20 ================================= NOTICE: Exiting tests.
Regards, Olivier.
From: Hafnium hafnium-bounces@lists.trustedfirmware.org on behalf of Rebecca Cran via Hafnium hafnium@lists.trustedfirmware.org Sent: 25 May 2021 19:43 To: hafnium@lists.trustedfirmware.org hafnium@lists.trustedfirmware.org Subject: [Hafnium] Problems running Hafnium at S-EL2 with TF-A master I'm having problems running TF-A / Hafnium with S-EL2 support.
I can run Hafnium fine using the prebuilt TF-A binary in prebuilts/linux-aarch64/trusted-firmware-a-trusty/ but it doesn't work if I use TF-A master.
I'm building TF-A with:
make PLAT=fvp LOG_LEVEL=80 DEBUG=1 SPD=spmd CTX_INCLUDE_EL2_REGS=1 ARM_ARCH_MINOR=5 BRANCH_PROTECTION=1 CTX_INCLUDE_PAUTH_REGS=1 all fip BL32=../hafnium/out/reference/aem_v8a_fvp_clang/hafnium.bin BL33=../uefi/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/FV/FVP_AARCH64_EFI.fd SP_LAYOUT_FILE=sp_layout.json
And running it with:
../Base_RevC_AEMv8A_pkg/models/Linux64_GCC-6.4/FVP_Base_RevC-2xAEMv8A \ -C pctl.startup=0.0.0.0 \ -C cluster0.NUM_CORES=4 -C cluster1.NUM_CORES=4 -C bp.secure_memory=1 \ -C bp.secureflashloader.fname=../trusted-firmware-a/build/fvp/debug/bl1.bin \ -C bp.flashloader0.fname=../trusted-firmware-a/build/fvp/debug/fip.bin \ -C bp.pl011_uart0.out_file=fvp-uart0.log -C bp.pl011_uart1.out_file=fvp-uart1.log \ -C bp.pl011_uart2.out_file=fvp-uart2.log \ -C cluster0.has_arm_v8-5=1 -C cluster1.has_arm_v8-5=1 -C pci.pci_smmuv3.mmu.SMMU_AIDR=2 \ -C pci.pci_smmuv3.mmu.SMMU_IDR0=0x0046123B -C pci.pci_smmuv3.mmu.SMMU_IDR1=0x00600002 \ -C pci.pci_smmuv3.mmu.SMMU_IDR3=0x1714 -C pci.pci_smmuv3.mmu.SMMU_IDR5=0xFFFF0472 \ -C pci.pci_smmuv3.mmu.SMMU_S_IDR1=0xA0000002 -C pci.pci_smmuv3.mmu.SMMU_S_IDR2=0 \ -C pci.pci_smmuv3.mmu.SMMU_S_IDR3=0 \ -C cluster0.has_branch_target_exception=1 \ -C cluster1.has_branch_target_exception=1 \ -C cluster0.restriction_on_speculative_execution=2 \ -C cluster1.restriction_on_speculative_execution=2
TF-A prints this and then stops for a minute or two before resetting:
INFO: Loading image id=5 at address 0x88000000 INFO: Image id=5 loaded: 0x88000000 - 0x88280000 INFO: BL2: Skip loading image id 27 INFO: BL2: Loading image id 34 VERBOSE: Using Memmap VERBOSE: FIP header looks OK. VERBOSE: Trying alternative IO
I'm fairly new to working with Hafnium, TF-A _and_ Arm's FVP so there's probably something obvious I'm doing wrong?
hafnium@lists.trustedfirmware.org