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