blob: 0fe27d8d24c8fafc4cb5581eda25c052804445df [file] [log] [blame]
Jimmy Brissonff08d3e2020-04-02 15:19:27 -05001Running Tests
2=============
Jimmy Brisson0862f012020-04-02 15:19:12 -05003
Jimmy Brisson4844dc92020-04-02 15:19:34 -05004Refer to the `Juno and FVP platform documentation`_ in the `TF-A documentation`.
5The same instructions mostly apply to running the TF-A Tests on those two
6platforms. The difference is that the following images are not needed here:
Jimmy Brisson0862f012020-04-02 15:19:12 -05007
8- Normal World bootloader. The TFTF replaces it in the boot flow;
9
10- Linux Kernel;
11
12- Device tree;
13
14- Filesystem.
15
16In 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 Brissonff08d3e2020-04-02 15:19:27 -050028Running Manual Tests on FVP
29---------------------------
30
Jimmy Brisson0862f012020-04-02 15:19:12 -050031The manual tests rely on storing state in non-volatile memory (NVM) across
32reboot. On FVP the NVM is not persistent across reboots, so the following
33flag must be used to write the NVM to a file when the model exits.
34
35::
36
37 -C bp.flashloader0.fnameWrite=[filename]
38
39To 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
45After the model has been shutdown, this file must be fed back in to continue
46the test. Note this flash file includes the FIP image, so the original fip.bin
47does not need to be passed in. The following flag is used:
48
49::
50
51 -C bp.flashloader0.fname=[filename]
52
Jimmy Brissonff08d3e2020-04-02 15:19:27 -050053Running Firmware Update (FWU) Tests
54-----------------------------------
Jimmy Brisson0862f012020-04-02 15:19:12 -050055
Jimmy Brisson4844dc92020-04-02 15:19:34 -050056As previously mentioned in :ref:`build_putting_together`, there are a
Jimmy Brisson0862f012020-04-02 15:19:12 -050057couple of extra images involved when running the FWU tests. They need to be
58loaded at the right addresses, which depend on the platform.
59
Jimmy Brissonff08d3e2020-04-02 15:19:27 -050060On FVP
61^^^^^^
Jimmy Brisson0862f012020-04-02 15:19:12 -050062
63In addition to the usual BL1 and FIP images, the following extra images must be
64loaded:
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 Brisson4844dc92020-04-02 15:19:34 -050071An example script is provided in ``scripts/run_fwu_fvp.sh``.
Jimmy Brisson0862f012020-04-02 15:19:12 -050072
Jimmy Brissonff08d3e2020-04-02 15:19:27 -050073On Juno
74^^^^^^^
Jimmy Brisson0862f012020-04-02 15:19:12 -050075
76The same set of extra images and load addresses apply for Juno as for FVP.
77
78The 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
81Started Guide`_, section 2.3 "Flash memory programming" for more
82information. Users should ensure these do not overlap with any other entries in
83the file.
84
85Addresses in this file are expressed as an offset from the base address of the
86flash (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 Brisson0862f012020-04-02 15:19:12 -0500112.. _Juno Getting Started Guide: http://infocenter.arm.com/help/topic/com.arm.doc.dui0928e/DUI0928E_juno_arm_development_platform_gsg.pdf
Jimmy Brisson4844dc92020-04-02 15:19:34 -0500113.. _Juno and FVP platform documentation: https://trustedfirmware-a.readthedocs.io/en/latest/plat/
114.. _TF-A documentation: https://trustedfirmware-a.readthedocs.org