Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame^] | 1 | Running Tests |
| 2 | ============= |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 3 | |
| 4 | Refer to the sections `Running the software on FVP`_ and `Running the software |
| 5 | on Juno`_ in `TF-A User Guide`_. The same instructions mostly apply to run the |
| 6 | TF-A Tests on those 2 platforms. The difference is that the following images are |
| 7 | not needed here: |
| 8 | |
| 9 | - Normal World bootloader. The TFTF replaces it in the boot flow; |
| 10 | |
| 11 | - Linux Kernel; |
| 12 | |
| 13 | - Device tree; |
| 14 | |
| 15 | - Filesystem. |
| 16 | |
| 17 | In other words, only the following software images are needed: |
| 18 | |
| 19 | - ``BL1`` firmware image; |
| 20 | |
| 21 | - ``FIP`` image containing the following images: |
| 22 | |
| 23 | - ``BL2``; |
| 24 | - ``SCP_BL2`` if required by the platform (e.g. Juno); |
| 25 | - ``BL31``; |
| 26 | - ``BL32`` (optional); |
| 27 | - ``tftf.bin`` (standing as the BL33 image). |
| 28 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame^] | 29 | Running Manual Tests on FVP |
| 30 | --------------------------- |
| 31 | |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 32 | The manual tests rely on storing state in non-volatile memory (NVM) across |
| 33 | reboot. On FVP the NVM is not persistent across reboots, so the following |
| 34 | flag must be used to write the NVM to a file when the model exits. |
| 35 | |
| 36 | :: |
| 37 | |
| 38 | -C bp.flashloader0.fnameWrite=[filename] |
| 39 | |
| 40 | To ensure the model exits on shutdown the following flag must be used: |
| 41 | |
| 42 | :: |
| 43 | |
| 44 | -C bp.ve_sysregs.exit_on_shutdown=1 |
| 45 | |
| 46 | After the model has been shutdown, this file must be fed back in to continue |
| 47 | the test. Note this flash file includes the FIP image, so the original fip.bin |
| 48 | does not need to be passed in. The following flag is used: |
| 49 | |
| 50 | :: |
| 51 | |
| 52 | -C bp.flashloader0.fname=[filename] |
| 53 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame^] | 54 | Running Firmware Update (FWU) Tests |
| 55 | ----------------------------------- |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 56 | |
| 57 | As previously mentioned in section `Putting it all together`_, there are a |
| 58 | couple of extra images involved when running the FWU tests. They need to be |
| 59 | loaded at the right addresses, which depend on the platform. |
| 60 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame^] | 61 | On FVP |
| 62 | ^^^^^^ |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 63 | |
| 64 | In addition to the usual BL1 and FIP images, the following extra images must be |
| 65 | loaded: |
| 66 | |
| 67 | - ``NS_BL1U`` image at address ``0x0BEB8000`` (i.e. NS_BL1U_BASE macro in TF-A) |
| 68 | - ``FWU_FIP`` image at address ``0x08400000`` (i.e. NS_BL2U_BASE macro in TF-A) |
| 69 | - ``Backup FIP`` image at address ``0x09000000`` (i.e. FIP_BKP_ADDRESS macro in |
| 70 | TF-A tests). |
| 71 | |
| 72 | An example script is provided in `scripts/run_fwu_fvp.sh`_. |
| 73 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame^] | 74 | On Juno |
| 75 | ^^^^^^^ |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 76 | |
| 77 | The same set of extra images and load addresses apply for Juno as for FVP. |
| 78 | |
| 79 | The new images must be programmed in flash memory by adding some entries in the |
| 80 | ``SITE1/HBI0262x/images.txt`` configuration file on the Juno SD card (where |
| 81 | ``x`` depends on the revision of the Juno board). Refer to the `Juno Getting |
| 82 | Started Guide`_, section 2.3 "Flash memory programming" for more |
| 83 | information. Users should ensure these do not overlap with any other entries in |
| 84 | the file. |
| 85 | |
| 86 | Addresses in this file are expressed as an offset from the base address of the |
| 87 | flash (that is, ``0x08000000``). |
| 88 | |
| 89 | :: |
| 90 | |
| 91 | NOR10UPDATE: AUTO ; Image Update:NONE/AUTO/FORCE |
| 92 | NOR10ADDRESS: 0x00400000 ; Image Flash Address |
| 93 | NOR10FILE: \SOFTWARE\fwu_fip.bin ; Image File Name |
| 94 | NOR10LOAD: 00000000 ; Image Load Address |
| 95 | NOR10ENTRY: 00000000 ; Image Entry Point |
| 96 | |
| 97 | NOR11UPDATE: AUTO ; Image Update:NONE/AUTO/FORCE |
| 98 | NOR11ADDRESS: 0x03EB8000 ; Image Flash Address |
| 99 | NOR11FILE: \SOFTWARE\ns_bl1u.bin ; Image File Name |
| 100 | NOR11LOAD: 00000000 ; Image Load Address |
| 101 | NOR11ENTRY: 00000000 ; Image Load Address |
| 102 | |
| 103 | NOR12UPDATE: AUTO ; Image Update:NONE/AUTO/FORCE |
| 104 | NOR12ADDRESS: 0x01000000 ; Image Flash Address |
| 105 | NOR12FILE: \SOFTWARE\backup_fip.bin ; Image File Name |
| 106 | NOR12LOAD: 00000000 ; Image Load Address |
| 107 | NOR12ENTRY: 00000000 ; Image Entry Point |
| 108 | |
| 109 | -------------- |
| 110 | |
| 111 | *Copyright (c) 2019, Arm Limited. All rights reserved.* |
| 112 | |
| 113 | .. _scripts/run_fwu_fvp.sh: ../scripts/run_fwu_fvp.sh |
| 114 | .. _Juno Getting Started Guide: http://infocenter.arm.com/help/topic/com.arm.doc.dui0928e/DUI0928E_juno_arm_development_platform_gsg.pdf |
| 115 | .. _Running the software on FVP: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/about/docs/user-guide.rst#running-the-software-on-fvp |
| 116 | .. _Running the software on Juno: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/about/docs/user-guide.rst#running-the-software-on-juno |