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?
--
Rebecca Cran
Hi Raghu,
The second problem about FVP CI test suite goes away by applying the slight change below on top of master. I will submit an appropriate change by Monday.
diff --git a/test/hftest/hftest.py b/test/hftest/hftest.py
index 2e70abf9..c63c2d18 100755
--- a/test/hftest/hftest.py
+++ b/test/hftest/hftest.py
@@ -392,7 +392,7 @@ class FvpDriverHypervisor(FvpDriver):
Driver which runs tests in Arm FVP emulator, with hafnium as hypervisor
"""
INITRD_START= 0x84000000
- INITRD_END = 0x85000000 #Default value, however may change if initrd in args
+ INITRD_END = 0x86000000 #Default value, however may change if initrd in args
def __init__(self, args):
self.vms_in_partitions_json = args.partitions and args.partitions["VMs"]
Regards,
Olivier.
________________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of Olivier Deprez via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 30 April 2021 08:48
To: 'Raghu Krishnamurthy via Hafnium'; raghu.ncstate(a)icloud.com
Subject: Re: [Hafnium] SMMUv3 Driver issue when running FVP tests
Hi,
Can you cherry pick:
https://review.trustedfirmware.org/c/hafnium/hafnium/+/9791
This will solve this first problem.
Though I'm seeing a second failure occurring later in the test run. We're looking at it.
Regards,
Olivier.
________________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of Raghu Krishnamurthy via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 30 April 2021 02:52
To: 'Raghu Krishnamurthy via Hafnium'
Subject: [Hafnium] SMMUv3 Driver issue when running FVP tests
When I run kokoro/test.sh -fvp at the tip of the master brach(as of today),
I see the following failures when running the aarch64 tests. The test
command line that fails is:
timeout --foreground 300s ./test/hftest/hftest.py --driver=fvp --out
out/reference/aem_v8a_fvp_clang --out_initrd
out/reference/aem_v8a_fvp_vm_clang --out_partitions
out/reference/aem_v8a_fvp_vm_clang --log out/reference/kokoro_log hafnium
--initrd test/vmapi/arch/aarch64/aarch64_test
Error log is:
ERROR: SMMUv3: Linear Stream Table cannot be supported when StreamID bits >
7
ERROR: SMMUv3: Failed to initialize driver
Panic: Could not initialize IOMMUs.
Has anybody seen this issue? I'll try to debug but thought I'll send an
email in case somebody already knows the answer to this. Wondering if I'm
missing a knob in the FVP.
-Raghu
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
Hi,
Can you cherry pick:
https://review.trustedfirmware.org/c/hafnium/hafnium/+/9791
This will solve this first problem.
Though I'm seeing a second failure occurring later in the test run. We're looking at it.
Regards,
Olivier.
________________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of Raghu Krishnamurthy via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 30 April 2021 02:52
To: 'Raghu Krishnamurthy via Hafnium'
Subject: [Hafnium] SMMUv3 Driver issue when running FVP tests
When I run kokoro/test.sh -fvp at the tip of the master brach(as of today),
I see the following failures when running the aarch64 tests. The test
command line that fails is:
timeout --foreground 300s ./test/hftest/hftest.py --driver=fvp --out
out/reference/aem_v8a_fvp_clang --out_initrd
out/reference/aem_v8a_fvp_vm_clang --out_partitions
out/reference/aem_v8a_fvp_vm_clang --log out/reference/kokoro_log hafnium
--initrd test/vmapi/arch/aarch64/aarch64_test
Error log is:
ERROR: SMMUv3: Linear Stream Table cannot be supported when StreamID bits >
7
ERROR: SMMUv3: Failed to initialize driver
Panic: Could not initialize IOMMUs.
Has anybody seen this issue? I'll try to debug but thought I'll send an
email in case somebody already knows the answer to this. Wondering if I'm
missing a knob in the FVP.
-Raghu
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
When I run kokoro/test.sh -fvp at the tip of the master brach(as of today),
I see the following failures when running the aarch64 tests. The test
command line that fails is:
timeout --foreground 300s ./test/hftest/hftest.py --driver=fvp --out
out/reference/aem_v8a_fvp_clang --out_initrd
out/reference/aem_v8a_fvp_vm_clang --out_partitions
out/reference/aem_v8a_fvp_vm_clang --log out/reference/kokoro_log hafnium
--initrd test/vmapi/arch/aarch64/aarch64_test
Error log is:
ERROR: SMMUv3: Linear Stream Table cannot be supported when StreamID bits >
7
ERROR: SMMUv3: Failed to initialize driver
Panic: Could not initialize IOMMUs.
Has anybody seen this issue? I'll try to debug but thought I'll send an
email in case somebody already knows the answer to this. Wondering if I'm
missing a knob in the FVP.
-Raghu
Hi Rebecca,
Thanks for reporting.
Can you try with the updated command:
https://review.trustedfirmware.org/plugins/gitiles/hafnium/hafnium/+/refs/c…
Thanks, Olivier.
________________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of Rebecca Cran via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 21 April 2021 04:39
To: hafnium(a)lists.trustedfirmware.org
Subject: [Hafnium] Getting Started page: problem with the command under "Getting the source code"
On the Getting Started document
(https://review.trustedfirmware.org/plugins/gitiles/hafnium/hafnium/+/HEAD/d…)
there's a command listed to get the source code:
git clone --recurse-submodules
https://git.trustedfirmware.org/hafnium/hafnium.git && (cd hafnium &&
f=`git rev-parse --git-dir`/hooks/commit-msg ; curl -Lo $f
https://review.trustedfirmware.org/tools/hooks/commit-msg ; chmod +x $f
; for m in `git rev-parse --git-dir`/modules/*; do cp $f
$m/hooks/commit-msg; done)
However, on my system it's erroring out because the 'hooks' directory it
tries to write to doesn't exist:
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left Speed
100 2174 100 2174 0 0 4221 0 --:--:-- --:--:--
--:--:-- 4221
cp: cannot create regular file '.git/modules/driver/hooks/commit-msg':
No such file or directory
cp: cannot create regular file '.git/modules/project/hooks/commit-msg':
No such file or directory
cp: cannot create regular file
'.git/modules/third_party/hooks/commit-msg': No such file or directory
--
Rebecca Cran
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
On the Getting Started document
(https://review.trustedfirmware.org/plugins/gitiles/hafnium/hafnium/+/HEAD/d…)
there's a command listed to get the source code:
git clone --recurse-submodules
https://git.trustedfirmware.org/hafnium/hafnium.git && (cd hafnium &&
f=`git rev-parse --git-dir`/hooks/commit-msg ; curl -Lo $f
https://review.trustedfirmware.org/tools/hooks/commit-msg ; chmod +x $f
; for m in `git rev-parse --git-dir`/modules/*; do cp $f
$m/hooks/commit-msg; done)
However, on my system it's erroring out because the 'hooks' directory it
tries to write to doesn't exist:
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left Speed
100 2174 100 2174 0 0 4221 0 --:--:-- --:--:--
--:--:-- 4221
cp: cannot create regular file '.git/modules/driver/hooks/commit-msg':
No such file or directory
cp: cannot create regular file '.git/modules/project/hooks/commit-msg':
No such file or directory
cp: cannot create regular file
'.git/modules/third_party/hooks/commit-msg': No such file or directory
--
Rebecca Cran
Hi
I think it's a missing python lib
pip3 install fdt
may do it
Agree this needs a doc update.
Regards,
Olivier.
________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of Raghu Krishnamurthy via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 19 March 2021 18:44
To: hafnium(a)lists.trustedfirmware.org <hafnium(a)lists.trustedfirmware.org>
Subject: [Hafnium] Broken hftest.py
Hi All,
Hftest.py appears to be broken due to a recent change to "import fdt". What
package needs to be installed to be able to run this? The documentation does
not appear to be updated either to account for the new package.
Anybody know what exactly I need to install to meet that dependency?
Thanks
Raghu
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
Hi All,
Hftest.py appears to be broken due to a recent change to "import fdt". What
package needs to be installed to be able to run this? The documentation does
not appear to be updated either to account for the new package.
Anybody know what exactly I need to install to meet that dependency?
Thanks
Raghu
Hi Yinhua,
Sorry for the delay.
Assuming Hafnium, TF-A and TF-a-tests are cloned in the same workspace directory.
Instructions below permit launching a simulation with TFTF payload at NS-EL2, Hafnium at S-EL2 and three "cactus" bare metal partitions at S-EL1.
TFTF runs a number of FF-A related tests demonstrating NWd<=>SWd protocols, including sending messages back and forth to the three partitions and exercising memory sharing.
Hafnium: master
make PROJECT=reference
TF-A-tests: master
make CROSS_COMPILE=aarch64-none-elf- PLAT=fvp DEBUG=1 TESTS=spm -j8
TF-A: master
make CROSS_COMPILE=aarch64-none-elf- SPD=spmd CTX_INCLUDE_EL2_REGS=1 ARM_ARCH_MINOR=4 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 FVP with:
<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-4=1 -C cluster1.has_arm_v8-4=1
Regards,
Olivier.
________________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of yinhua_chen--- via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 04 March 2021 07:36
To: hafnium(a)lists.trustedfirmware.org
Subject: [Hafnium] Test setup handling multiple bare metal SPs
Hi all,
Can anyone please provide with a test setup handling multiple bare metal SPs (TF-A-tests framework) ?
This is the part I am most interested in, but it is very hard for myself to build the multiple-SPs-model from the documents and source code.
Sincerely,
Yinhua
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
Notice this information is shared in the TF-A documentation: https://trustedfirmware-a.readthedocs.io/en/latest/components/secure-partit…
________________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of Olivier Deprez via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 04 March 2021 09:10
To: hafnium(a)lists.trustedfirmware.org; yinhua_chen(a)outlook.com
Subject: Re: [Hafnium] Test setup handling multiple bare metal SPs
Hi Yinhua,
Sorry for the delay.
Assuming Hafnium, TF-A and TF-a-tests are cloned in the same workspace directory.
Instructions below permit launching a simulation with TFTF payload at NS-EL2, Hafnium at S-EL2 and three "cactus" bare metal partitions at S-EL1.
TFTF runs a number of FF-A related tests demonstrating NWd<=>SWd protocols, including sending messages back and forth to the three partitions and exercising memory sharing.
Hafnium: master
make PROJECT=reference
TF-A-tests: master
make CROSS_COMPILE=aarch64-none-elf- PLAT=fvp DEBUG=1 TESTS=spm -j8
TF-A: master
make CROSS_COMPILE=aarch64-none-elf- SPD=spmd CTX_INCLUDE_EL2_REGS=1 ARM_ARCH_MINOR=4 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 FVP with:
<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-4=1 -C cluster1.has_arm_v8-4=1
Regards,
Olivier.
________________________________________
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of yinhua_chen--- via Hafnium <hafnium(a)lists.trustedfirmware.org>
Sent: 04 March 2021 07:36
To: hafnium(a)lists.trustedfirmware.org
Subject: [Hafnium] Test setup handling multiple bare metal SPs
Hi all,
Can anyone please provide with a test setup handling multiple bare metal SPs (TF-A-tests framework) ?
This is the part I am most interested in, but it is very hard for myself to build the multiple-SPs-model from the documents and source code.
Sincerely,
Yinhua
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium