Some Arm Fixed Virtual Platforms (FVPs) require CPU-specific initialization routines to boot Linux successfully. The Trusted Firmware-A cpu_ops
framework provides these routines.
The cpu_ops
framework in Trusted Firmware-A contains functions to:
Each CPU type has its own implementation, defined in files such as:
lib/cpus/aarch64/cortex_a55.S
lib/cpus/aarch64/cortex_a53.S
If the firmware is built without the proper cpu_ops, you’ll hit an assertion failure like:
ASSERT: File lib/cpus/aarch64/cpu_helpers.S Line 00035
This means that the required CPU operation routines are missing from the build.
To include the correct cpu_ops
, you need to set TF-A build options depending on the CPU, using the build flags.
Add the following line to your TF-A build script:
ARM_TF_BUILD_FLAGS="$ARM_TF_BUILD_FLAGS HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0"
These flags enable hardware-assisted cache coherency and disable use of coherent memory, which is typical for Cortex-A55 FVPs.
Add the following line to your TF-A build script:
ARM_TF_BUILD_FLAGS="$ARM_TF_BUILD_FLAGS HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0 CTX_INCLUDE_AARCH32_REGS=0"
USE_COHERENT_MEM=1 cannot be used with HW_ASSISTED_COHERENCY=1.
This configuration disables 32-bit context registers (specific to AArch64-only CPUs like Cortex-A78) and applies the same coherency settings as above.
Run the following commands to rebuild TF-A and integrate it into the BusyBox image:
./build-scripts/build-arm-tf.sh -p aemfvp-a -f busybox clean
./build-scripts/build-arm-tf.sh -p aemfvp-a -f busybox build
./build-scripts/aemfvp-a/build-test-busybox.sh -p aemfvp-a package
Once the build completes, your firmware will include the correct CPU operation routines, allowing Linux to boot correctly on the target FVP.
After packaging, you can boot the updated firmware on your FVP and verify that Linux reaches userspace without triggering early boot assertions.