Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: Introduction to Arm Ecosystem Fixed Virtual Platforms
weight: 2

### FIXED, DO NOT MODIFY
layout: learningpathall
---

Arm Ecosystem Fixed Virtual Platforms (FVPs) model hardware subsystems target different market segments and applications.

FVPs use binary translation technology to deliver fast, functional simulations of Arm-based systems, including processor, memory, and peripherals. They implement a programmer's view suitable for software development and enable execution of full software stacks, providing a widely available platform ahead of silicon.

Arm provides different types of FVPs. There are several freely available, pre-built Armv8‑A FVPs for download from [Arm Ecosystem Models](https://developer.arm.com/Tools%20and%20Software/Fixed%20Virtual%20Platforms) on Arm Developer website. You can use these FVPs without a license. For example, the AEMv8-A Base Platform RevC FVP is freely available, and it supports the latest Armv8‑A architecture versions up to v8.7 and Armv9-A.

The [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) is based on the above RevC model. However, some Armv8 FVPs with a fixed number of cores are replaced by FVPs with a configurable number of cores, for example:

* FVP_Base_Cortex-A55x4
* FVP_Base_Cortex-A78x4
* FVP_Base_Cortex-X1x4
* FVP_Base_Cortex-X2x4
* FVP_Base_Cortex-A78AEx2
* FVP_Base_Cortex-A76x4
* FVP_Base_Neoverse-N2x1
* FVP_Base_Neoverse-N1x4
* FVP_Base_Cortex-A510x4
* FVP_Base_Cortex-A53x4
* FVP_Base_Cortex-A76x4

### Set up the environment

The [Arm reference software](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) stack is the codebase. Follow the [Armv-A Base AEM FVP Platform Software User Guide](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) to set up the environment, download the software stack, and get the toolchain.

he FVP_Base_Cortex-\<xxx> FVP is available for you to build and run Linux host environments. Contact Arm Support [support@arm.com](mailto:support@arm.com) to request access.

This document supports running the software stack on the following FVPs:

* FVP_Base_Cortex-A510x4
* FVP_Base_Cortex-A510x4+Cortex-A710x4
* FVP_Base_Cortex-A53x4
* FVP_Base_Cortex-A55x4
* FVP_Base_Cortex-A55x4+Cortex-A75x4
* FVP_Base_Cortex-A55x4+Cortex-A78x4
* FVP_Base_Cortex-A57x2-A35x4
* FVP_Base_Cortex-A57x2-A53x4
* FVP_Base_Cortex-A57x4
* FVP_Base_Cortex-A57x4-A35x4
* FVP_Base_Cortex-A57x4-A53x4
* FVP_Base_Cortex-A65AEx4
* FVP_Base_Cortex-A65AEx4+Cortex-A76AEx4
* FVP_Base_Cortex-A65x4
* FVP_Base_Cortex-A710x4
* FVP_Base_Cortex-A72x2-A53x4
* FVP_Base_Cortex-A72x4
* FVP_Base_Cortex-A72x4-A53x4
* FVP_Base_Cortex-A73x2-A53x4
* FVP_Base_Cortex-A73x4
* FVP_Base_Cortex-A73x4-A53x4
* FVP_Base_Cortex-A75x4
* FVP_Base_Cortex-A76AEx4
* FVP_Base_Cortex-A76x4
* FVP_Base_Cortex-A77x4
* FVP_Base_Cortex-A78AEx4
* FVP_Base_Cortex-A78Cx4
* FVP_Base_Cortex-A78x4
* FVP_Base_Cortex-X1Cx4
* FVP_Base_Cortex-X1x4
* FVP_Base_Cortex-X2x4
* FVP_Base_Neoverse-E1x4
* FVP_Base_Neoverse-N1x4

However, this is not a full list. This blog might apply to more FVP platforms, but no test is done for these platforms, for example:

* FVP_Base_Cortex-A55x1
* FVP_Base_Cortex-A55x2
* FVP_Base_Cortex-A55x1+Cortex-A75x1
* FVP_Base_Cortex-A55x4+Cortex-A76x2
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Set up the environment
weight: 3

### FIXED, DO NOT MODIFY
layout: learningpathall
---

The [Arm reference software](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) stack is the codebase. Follow the [Armv-A Base AEM FVP Platform Software User Guide](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) to set up the environment, download the software stack, and get the toolchain.

he FVP_Base_Cortex-\<xxx> FVP is available for you to build and run Linux host environments. Contact Arm Support [support@arm.com](mailto:support@arm.com) to request access.

This document supports running the software stack on the following FVPs:

* FVP_Base_Cortex-A510x4
* FVP_Base_Cortex-A510x4+Cortex-A710x4
* FVP_Base_Cortex-A53x4
* FVP_Base_Cortex-A55x4
* FVP_Base_Cortex-A55x4+Cortex-A75x4
* FVP_Base_Cortex-A55x4+Cortex-A78x4
* FVP_Base_Cortex-A57x2-A35x4
* FVP_Base_Cortex-A57x2-A53x4
* FVP_Base_Cortex-A57x4
* FVP_Base_Cortex-A57x4-A35x4
* FVP_Base_Cortex-A57x4-A53x4
* FVP_Base_Cortex-A65AEx4
* FVP_Base_Cortex-A65AEx4+Cortex-A76AEx4
* FVP_Base_Cortex-A65x4
* FVP_Base_Cortex-A710x4
* FVP_Base_Cortex-A72x2-A53x4
* FVP_Base_Cortex-A72x4
* FVP_Base_Cortex-A72x4-A53x4
* FVP_Base_Cortex-A73x2-A53x4
* FVP_Base_Cortex-A73x4
* FVP_Base_Cortex-A73x4-A53x4
* FVP_Base_Cortex-A75x4
* FVP_Base_Cortex-A76AEx4
* FVP_Base_Cortex-A76x4
* FVP_Base_Cortex-A77x4
* FVP_Base_Cortex-A78AEx4
* FVP_Base_Cortex-A78Cx4
* FVP_Base_Cortex-A78x4
* FVP_Base_Cortex-X1Cx4
* FVP_Base_Cortex-X1x4
* FVP_Base_Cortex-X2x4
* FVP_Base_Neoverse-E1x4
* FVP_Base_Neoverse-N1x4

However, this is not a full list. This blog might apply to more FVP platforms, but no test is done for these platforms, for example:

* FVP_Base_Cortex-A55x1
* FVP_Base_Cortex-A55x2
* FVP_Base_Cortex-A55x1+Cortex-A75x1
* FVP_Base_Cortex-A55x4+Cortex-A76x2
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
title: Use TF-A extra build options to build cpu_ops into images
weight: 4

### FIXED, DO NOT MODIFY
layout: learningpathall
---

### 1. Why build cpu_ops into images

If you build the software without any modification, you might get the following error message after running the software stack:

```
ASSERT: File lib/cpus/aarch64/cpu_helpers.S Line 00035
```

The previous error message is issued because the TF-A does not build the cpu_ops into the images:

```
31 /* Get the matching cpu_ops pointer */

32 bl get_cpu_ops_ptr

33 #if ENABLE_ASSERTIONS

34 cmp x0, #0

35 ASM_ASSERT(ne)

36 #endif
```


The cpu_ops are defined in the source file as follows:

```
lib/cpus/aarch64/cortex_a510.S
lib/cpus/aarch64/cortex_a53.S
lib/cpus/aarch64/cortex_a55.S
lib/cpus/aarch64/cortex_a57.S
lib/cpus/aarch64/cortex_a65.S
lib/cpus/aarch64/cortex_a65ae.S
lib/cpus/aarch64/cortex_a710.S
lib/cpus/aarch64/cortex_a715.S
lib/cpus/aarch64/cortex_a72.S
lib/cpus/aarch64/cortex_a73.S
```

Check the Makefile (plat/arm/board/fvp/platform.mk) of the FVP platform. You can find the following code:

```
ifeq (${HW_ASSISTED_COHERENCY}, 0)
# Cores used without DSU
FVP_CPU_LIBS += lib/cpus/aarch64/cortex_a35.S \
lib/cpus/aarch64/cortex_a53.S \
lib/cpus/aarch64/cortex_a57.S \
lib/cpus/aarch64/cortex_a72.S \
lib/cpus/aarch64/cortex_a73.S
else
# Cores used with DSU only
ifeq (${CTX_INCLUDE_AARCH32_REGS}, 0)
# AArch64-only cores
FVP_CPU_LIBS += lib/cpus/aarch64/cortex_a76.S \
lib/cpus/aarch64/cortex_a76ae.S \
lib/cpus/aarch64/cortex_a77.S \
lib/cpus/aarch64/cortex_a78.S \
lib/cpus/aarch64/neoverse_n_common.S \
lib/cpus/aarch64/neoverse_n1.S \
lib/cpus/aarch64/neoverse_n2.S \
lib/cpus/aarch64/neoverse_e1.S \
lib/cpus/aarch64/neoverse_v1.S \
lib/cpus/aarch64/neoverse_v2.S \
lib/cpus/aarch64/cortex_a78_ae.S \
lib/cpus/aarch64/cortex_a510.S \
lib/cpus/aarch64/cortex_a710.S \
lib/cpus/aarch64/cortex_a715.S \
lib/cpus/aarch64/cortex_x3.S \
lib/cpus/aarch64/cortex_a65.S \
lib/cpus/aarch64/cortex_a65ae.S \
lib/cpus/aarch64/cortex_a78c.S \
lib/cpus/aarch64/cortex_hayes.S \
lib/cpus/aarch64/cortex_hunter.S \
lib/cpus/aarch64/cortex_x2.S \
lib/cpus/aarch64/neoverse_poseidon.S
endif
# AArch64/AArch32 cores
FVP_CPU_LIBS += lib/cpus/aarch64/cortex_a55.S \
lib/cpus/aarch64/cortex_a75.S
endif
```

HW_ASSISTED_COHERENCY = 0 and CTX_INCLUDE_AARCH32_REGS =1 are default build options.

### 2. Required build options

Building the cpu_ops into the TF-A image requires different build options, depending on the CPU type. For example, different platforms require different build options when building the TF-A:

* For the A55 CPU FVP, add the HW_ASSISTED_COHERENCY=1 and USE_COHERENT_MEM=0 build options.
* For the A78 CPU FVP, add the HW_ASSISTED_COHERENCY=1, USE_COHERENT_MEM=0, and CTX_INCLUDE_AARCH32_REGS=0 build options.
* For the A53 CPU FVP, you do not need extra build options.

Note: The build option USE_COHERENT_MEM cannot be enabled with HW_ASSISTED_COHERENCY=1.


### 3. Steps to build cpu_ops into the TF-A image

Perform the following steps to build cpu_ops into the TF-A image:

3.1 Modify the following build script to add build options. The [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) uses the [build-scripts](https://gitlab.arm.com/arm-reference-solutions/build-scripts) to build the TF-A.

```
build-scripts/ configs/aemfvp-a/aemfvp-a
```

3.2 Add TF-A build options, depending on the CPU type. For example:

* For A55 CPU FVP, add the following line:

```
ARM_TF_BUILD_FLAGS="$ARM_TF_BUILD_FLAGS HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0 "
```

* For A78 CPU FVP, add the following line:

```
ARM_TF_BUILD_FLAGS="$ARM_TF_BUILD_FLAGS HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0 CTX_INCLUDE_AARCH32_REGS=0"
```

3.3 Rebuild the TF-A by using the following commands:

```
./build-scripts/build-arm-tf.sh -p aemfvp-a -f busybox clean

./build-scripts/build-arm-tf.sh -p aemfvp-a -f busybox build
```

3.4 Package the built TF-A into the BusyBox disk image by using the following command:

```
./build-scripts/aemfvp-a/build-test-busybox.sh -p aemfvp-a package
```

Loading