Andrew Walbran | 066ee71 | 2019-11-15 16:54:37 +0000 | [diff] [blame] | 1 | # Running Hafnium under Arm FVP |
Andrew Walbran | fe7d32d | 2019-08-05 14:25:56 +0100 | [diff] [blame] | 2 | |
| 3 | Arm offers a series of emulators known as Fixed Virtual Platforms (FVPs), which |
| 4 | simulate various processors. They are generally more accurate to the hardware |
| 5 | than QEMU, at the cost of being considerably slower. We support running |
| 6 | [tests](Testing.md) on the FVP as well as QEMU. |
| 7 | |
| 8 | ## Set up |
| 9 | |
| 10 | 1. Download the |
| 11 | [Armv8-A Base Platform FVP](https://developer.arm.com/products/system-design/fixed-virtual-platforms) |
| 12 | from Arm. |
| 13 | 1. Unzip it to a directory called `fvp` alongside the root directory of your |
| 14 | Hafnium checkout. |
| 15 | |
| 16 | ## Running tests |
| 17 | |
| 18 | To run tests with the FVP instead of QEMU, from the root directory of your |
| 19 | Hafnium checkout: |
| 20 | |
| 21 | ```shell |
Andrew Walbran | 219ceaf | 2020-01-10 15:44:29 +0000 | [diff] [blame] | 22 | $ make && kokoro/test.sh --fvp |
Andrew Walbran | fe7d32d | 2019-08-05 14:25:56 +0100 | [diff] [blame] | 23 | ``` |
| 24 | |
Andrew Walbran | 05e5edc | 2020-06-17 16:50:45 +0100 | [diff] [blame^] | 25 | See the `FvpDriver` class in [`hftest.py`](../test/hftest/hftest.py) for details |
Andrew Walbran | fe7d32d | 2019-08-05 14:25:56 +0100 | [diff] [blame] | 26 | on how this works. |
| 27 | |
| 28 | ## Other resources |
| 29 | |
| 30 | When running tests under the FVP we also use a prebuilt version of TF-A, which |
| 31 | is checked in under |
Andrew Walbran | 05e5edc | 2020-06-17 16:50:45 +0100 | [diff] [blame^] | 32 | [`prebuilts/linux-aarch64/arm-trusted-firmware/`](https://review.trustedfirmware.org/plugins/gitiles/hafnium/prebuilts/+/refs/heads/master/linux-aarch64/arm-trusted-firmware/). |
Andrew Walbran | fe7d32d | 2019-08-05 14:25:56 +0100 | [diff] [blame] | 33 | The |
Andrew Walbran | 05e5edc | 2020-06-17 16:50:45 +0100 | [diff] [blame^] | 34 | [README](https://review.trustedfirmware.org/plugins/gitiles/hafnium/prebuilts/+/refs/heads/master/linux-aarch64/arm-trusted-firmware/README.md) |
Andrew Walbran | fe7d32d | 2019-08-05 14:25:56 +0100 | [diff] [blame] | 35 | there has details on how it was built. The source code is available from the |
Andrew Walbran | 05e5edc | 2020-06-17 16:50:45 +0100 | [diff] [blame^] | 36 | [Arm Trusted Firmware site](https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git). |
Andrew Walbran | fe7d32d | 2019-08-05 14:25:56 +0100 | [diff] [blame] | 37 | |
| 38 | Documentation of the FVP (including memory maps) is |
Andrew Walbran | 05e5edc | 2020-06-17 16:50:45 +0100 | [diff] [blame^] | 39 | [available from Arm](https://developer.arm.com/docs/100966/latest). |