Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 1 | Runtime Instrumentation Testing - N1SDP |
| 2 | ======================================= |
| 3 | |
| 4 | For this test we used the N1 System Development Platform (`N1SDP`_), which |
| 5 | contains an SoC consisting of two dual-core Arm N1 clusters. |
| 6 | |
| 7 | The following source trees and binaries were used: |
| 8 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 9 | - `TF-A v2.11-rc0`_ |
| 10 | - `TFTF v2.11-rc0`_ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 11 | - SCP/MCP `Prebuilt Images`_ |
| 12 | |
Thaddeus Serna | 8709cc9 | 2023-08-14 13:28:59 -0500 | [diff] [blame] | 13 | Please see the Runtime Instrumentation :ref:`Testing Methodology |
| 14 | <Runtime Instrumentation Methodology>` page for more details. |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 15 | |
| 16 | Procedure |
| 17 | --------- |
| 18 | |
| 19 | #. Build TFTF with runtime instrumentation enabled: |
| 20 | |
| 21 | .. code:: shell |
| 22 | |
| 23 | make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ |
| 24 | TESTS=runtime-instrumentation all |
| 25 | |
| 26 | #. Build TF-A with the following build options: |
| 27 | |
| 28 | .. code:: shell |
| 29 | |
| 30 | make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ |
| 31 | ENABLE_RUNTIME_INSTRUMENTATION=1 fiptool all |
| 32 | |
| 33 | #. Fetch the SCP firmware images: |
| 34 | |
| 35 | .. code:: shell |
| 36 | |
| 37 | curl --fail --connect-timeout 5 --retry 5 \ |
| 38 | -sLS -o build/n1sdp/release/scp_rom.bin \ |
| 39 | https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-bl1.bin |
| 40 | curl --fail --connect-timeout 5 \ |
| 41 | --retry 5 -sLS -o build/n1sdp/release/scp_ram.bin \ |
| 42 | https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-bl2.bin |
| 43 | |
| 44 | #. Fetch the MCP firmware images: |
| 45 | |
| 46 | .. code:: shell |
| 47 | |
| 48 | curl --fail --connect-timeout 5 --retry 5 \ |
| 49 | -sLS -o build/n1sdp/release/mcp_rom.bin \ |
| 50 | https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-mcp-bl1.bin |
| 51 | curl --fail --connect-timeout 5 --retry 5 \ |
| 52 | -sLS -o build/n1sdp/release/mcp_ram.bin \ |
| 53 | https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-mcp-bl2.bin |
| 54 | |
| 55 | #. Using the fiptool, create a new FIP package and append the SCP ram image onto |
| 56 | it. |
| 57 | |
| 58 | .. code:: shell |
| 59 | |
| 60 | ./tools/fiptool/fiptool create --blob \ |
| 61 | uuid=cfacc2c4-15e8-4668-82be-430a38fad705,file=build/n1sdp/release/bl1.bin \ |
| 62 | --scp-fw build/n1sdp/release/scp_ram.bin build/n1sdp/release/scp_fw.bin |
| 63 | |
| 64 | #. Append the MCP image to the FIP. |
| 65 | |
| 66 | .. code:: shell |
| 67 | |
| 68 | ./tools/fiptool/fiptool create \ |
| 69 | --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file=build/n1sdp/release/mcp_ram.bin \ |
| 70 | build/n1sdp/release/mcp_fw.bin |
| 71 | |
| 72 | #. Then, add TFTF as the Non-Secure workload in the FIP image: |
| 73 | |
| 74 | .. code:: shell |
| 75 | |
| 76 | make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ |
| 77 | ENABLE_RUNTIME_INSTRUMENTATION=1 SCP_BL2=/dev/null \ |
| 78 | BL33=<path/to/tftf.bin> fip |
| 79 | |
| 80 | #. Load the following images onto the development board: ``fip.bin``, |
| 81 | ``scp_rom.bin``, ``scp_ram.bin``, ``mcp_rom.bin``, and ``mcp_ram.bin``. |
| 82 | |
| 83 | .. note:: |
| 84 | |
| 85 | These instructions presume you have a complete firmware stack. The N1SDP |
| 86 | `user guide`_ provides a detailed explanation on how to get setup from |
| 87 | scratch. |
| 88 | |
| 89 | Results |
| 90 | ------- |
| 91 | |
| 92 | ``CPU_SUSPEND`` to deepest power level |
| 93 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 94 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 95 | .. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in parallel (v2.11) |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 96 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 97 | +---------+------+----------------+--------+----------------+ |
| 98 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 99 | +---------+------+----------------+--------+----------------+ |
| 100 | | 0 | 0 | 3.0 (+41.51%) | 23.14 | 1.2 (+185.71%) | |
| 101 | +---------+------+----------------+--------+----------------+ |
| 102 | | 0 | 0 | 4.6 | 35.86 | 0.3 | |
| 103 | +---------+------+----------------+--------+----------------+ |
| 104 | | 1 | 0 | 3.68 (+33.33%) | 33.36 | 0.3 | |
| 105 | +---------+------+----------------+--------+----------------+ |
| 106 | | 1 | 0 | 3.7 (+40.15%) | 38.1 | 0.28 | |
| 107 | +---------+------+----------------+--------+----------------+ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 108 | |
| 109 | .. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 110 | parallel (v2.10) |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 111 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 112 | +---------+------+----------------+------------------+-----------------+ |
| 113 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 114 | +---------+------+----------------+------------------+-----------------+ |
| 115 | | 0 | 0 | 2.12 | 23.94 (+137.50%) | 0.42 (-47.50%) | |
| 116 | +---------+------+----------------+------------------+-----------------+ |
| 117 | | 0 | 0 | 3.52 | 42.08 (+164.32%) | 0.26 (+62.50%) | |
| 118 | +---------+------+----------------+------------------+-----------------+ |
| 119 | | 1 | 0 | 2.76 (-25.00%) | 38.3 (+195.52%) | 0.26 (+62.50%) | |
| 120 | +---------+------+----------------+------------------+-----------------+ |
| 121 | | 1 | 0 | 2.64 | 44.56 (+139.83%) | 0.36 (+100.00%) | |
| 122 | +---------+------+----------------+------------------+-----------------+ |
| 123 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 124 | .. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in serial (v2.11) |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 125 | |
| 126 | +---------+------+-----------+--------+-------------+ |
| 127 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 128 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 129 | | 0 | 0 | 1.7 | 22.46 | 0.3 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 130 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 131 | | 0 | 0 | 2.28 | 22.5 | 0.3 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 132 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 133 | | 1 | 0 | 2.14 | 21.5 | 0.32 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 134 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 135 | | 1 | 0 | 2.24 | 22.66 | 0.3 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 136 | +---------+------+-----------+--------+-------------+ |
| 137 | |
| 138 | .. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in |
| 139 | serial (v2.10) |
| 140 | |
| 141 | +---------+------+-----------+------------------+----------------+ |
| 142 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 143 | +---------+------+-----------+------------------+----------------+ |
| 144 | | 0 | 0 | 1.74 | 23.7 (+138.91%) | 0.3 | |
| 145 | +---------+------+-----------+------------------+----------------+ |
| 146 | | 0 | 0 | 2.08 | 23.96 (+128.63%) | 0.26 (-27.78%) | |
| 147 | +---------+------+-----------+------------------+----------------+ |
| 148 | | 1 | 0 | 1.9 | 23.62 (+143.00%) | 0.28 (+75.00%) | |
| 149 | +---------+------+-----------+------------------+----------------+ |
| 150 | | 1 | 0 | 2.06 | 23.92 (+129.12%) | 0.26 (+62.50%) | |
| 151 | +---------+------+-----------+------------------+----------------+ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 152 | |
| 153 | ``CPU_SUSPEND`` to power level 0 |
| 154 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 155 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 156 | .. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in parallel (v2.11) |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 157 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 158 | +---------+------+----------------+--------+-------------+ |
| 159 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 160 | +---------+------+----------------+--------+-------------+ |
| 161 | | 0 | 0 | 0.94 (-37.33%) | 30.36 | 0.3 | |
| 162 | +---------+------+----------------+--------+-------------+ |
| 163 | | 0 | 0 | 2.12 | 33.12 | 0.28 | |
| 164 | +---------+------+----------------+--------+-------------+ |
| 165 | | 1 | 0 | 2.08 | 32.56 | 0.3 | |
| 166 | +---------+------+----------------+--------+-------------+ |
| 167 | | 1 | 0 | 2.14 | 21.92 | 0.28 | |
| 168 | +---------+------+----------------+--------+-------------+ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 169 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 170 | .. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in |
| 171 | parallel (v2.10) |
| 172 | |
| 173 | +---------+------+---------------+------------------+----------------+ |
| 174 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 175 | +---------+------+---------------+------------------+----------------+ |
| 176 | | 0 | 0 | 1.5 (+70.45%) | 35.02 (+184.25%) | 0.24 | |
| 177 | +---------+------+---------------+------------------+----------------+ |
| 178 | | 0 | 0 | 1.92 | 38.12 (+160.74%) | 0.28 | |
| 179 | +---------+------+---------------+------------------+----------------+ |
| 180 | | 1 | 0 | 1.88 | 38.1 (+169.45%) | 0.26 (+62.50%) | |
| 181 | +---------+------+---------------+------------------+----------------+ |
| 182 | | 1 | 0 | 2.04 | 23.1 (+144.70%) | 0.24 | |
| 183 | +---------+------+---------------+------------------+----------------+ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 184 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 185 | .. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial (v2.11) |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 186 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 187 | +---------+------+-----------+--------+-------------+ |
| 188 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 189 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 190 | | 0 | 0 | 1.64 | 21.88 | 0.34 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 191 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 192 | | 0 | 0 | 2.42 | 21.76 | 0.34 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 193 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 194 | | 1 | 0 | 2.02 | 21.14 | 0.32 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 195 | +---------+------+-----------+--------+-------------+ |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 196 | | 1 | 0 | 2.18 | 22.3 | 0.34 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 197 | +---------+------+-----------+--------+-------------+ |
| 198 | |
| 199 | .. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial (v2.10) |
| 200 | |
| 201 | +---------+------+-----------+------------------+-----------------+ |
| 202 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 203 | +---------+------+-----------+------------------+-----------------+ |
| 204 | | 0 | 0 | 1.52 | 23.08 (+145.53%) | 0.3 | |
| 205 | +---------+------+-----------+------------------+-----------------+ |
| 206 | | 0 | 0 | 1.98 | 23.68 (+141.63%) | 0.28 (+55.56%) | |
| 207 | +---------+------+-----------+------------------+-----------------+ |
| 208 | | 1 | 0 | 1.84 | 23.86 (+148.54%) | 0.28 (+100.00%) | |
| 209 | +---------+------+-----------+------------------+-----------------+ |
| 210 | | 1 | 0 | 1.98 | 23.68 (+142.13%) | 0.28 (+55.56%) | |
| 211 | +---------+------+-----------+------------------+-----------------+ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 212 | |
| 213 | ``CPU_OFF`` on all non-lead CPUs |
| 214 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 215 | |
| 216 | ``CPU_OFF`` on all non-lead CPUs in sequence then, ``CPU_SUSPEND`` on the lead |
| 217 | core to the deepest power level. |
| 218 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 219 | .. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs (v2.11) |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 220 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 221 | +---------+------+-----------+--------+----------------+ |
| 222 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 223 | +---------+------+-----------+--------+----------------+ |
| 224 | | 0 | 0 | 1.96 | 22.44 | 0.38 | |
| 225 | +---------+------+-----------+--------+----------------+ |
| 226 | | 0 | 0 | 13.76 | 30.34 | 0.26 | |
| 227 | +---------+------+-----------+--------+----------------+ |
| 228 | | 1 | 0 | 13.46 | 28.28 | 0.24 | |
| 229 | +---------+------+-----------+--------+----------------+ |
| 230 | | 1 | 0 | 13.84 | 30.06 | 0.28 (-60.00%) | |
| 231 | +---------+------+-----------+--------+----------------+ |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 232 | |
| 233 | .. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs (v2.10) |
| 234 | |
| 235 | +---------+------+-----------+------------------+----------------+ |
| 236 | | Cluster | Core | Powerdown | Wakeup | Cache Flush | |
| 237 | +---------+------+-----------+------------------+----------------+ |
| 238 | | 0 | 0 | 1.78 | 23.7 (+138.43%) | 0.3 | |
| 239 | +---------+------+-----------+------------------+----------------+ |
| 240 | | 0 | 0 | 13.96 | 31.16 (+137.86%) | 0.34 (-32.00%) | |
| 241 | +---------+------+-----------+------------------+----------------+ |
| 242 | | 1 | 0 | 13.54 | 30.24 (+144.66%) | 0.26 (-38.10%) | |
| 243 | +---------+------+-----------+------------------+----------------+ |
| 244 | | 1 | 0 | 14.46 | 31.12 (+134.69%) | 0.7 (+34.62%) | |
| 245 | +---------+------+-----------+------------------+----------------+ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 246 | |
| 247 | ``CPU_VERSION`` in parallel |
| 248 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 249 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 250 | .. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores (v2.11) |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 251 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 252 | +-------------+--------+--------------+ |
| 253 | | Cluster | Core | Latency | |
| 254 | +-------------+--------+--------------+ |
| 255 | | 0 | 0 | 0.12 | |
| 256 | +-------------+--------+--------------+ |
| 257 | | 0 | 0 | 0.24 | |
| 258 | +-------------+--------+--------------+ |
| 259 | | 1 | 0 | 0.2 | |
| 260 | +-------------+--------+--------------+ |
| 261 | | 1 | 0 | 0.26 | |
| 262 | +-------------+--------+--------------+ |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 263 | |
| 264 | .. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores (v2.10) |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 265 | |
Harrison Mutai | 480f0f6 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 266 | +----------------------------------------------+ |
| 267 | | test_rt_instr_psci_version_parallel (latest) | |
| 268 | +-------------+--------+-----------------------+ |
| 269 | | Cluster | Core | Latency | |
| 270 | +-------------+--------+-----------------------+ |
| 271 | | 0 | 0 | 0.14 (+75.00%) | |
| 272 | +-------------+--------+-----------------------+ |
| 273 | | 0 | 0 | 0.22 | |
| 274 | +-------------+--------+-----------------------+ |
| 275 | | 1 | 0 | 0.2 | |
| 276 | +-------------+--------+-----------------------+ |
| 277 | | 1 | 0 | 0.26 | |
| 278 | +-------------+--------+-----------------------+ |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 279 | |
| 280 | -------------- |
| 281 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 282 | *Copyright (c) 2023-2024, Arm Limited. All rights reserved.* |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 283 | |
Harrison Mutai | e210274 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 284 | .. _TF-A v2.11-rc0: https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/tags/v2.11-rc0 |
| 285 | .. _TFTF v2.11-rc0: https://review.trustedfirmware.org/plugins/gitiles/TF-A/tf-a-tests/+/refs/tags/v2.11-rc0 |
Harrison Mutai | fa2fd89 | 2023-05-11 09:50:31 +0100 | [diff] [blame] | 286 | .. _user guide: https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/n1sdp/user-guide.rst |
| 287 | .. _Prebuilt Images: https://downloads.trustedfirmware.org/tf-a/css_scp_2.11.0/n1sdp/release/ |
| 288 | .. _N1SDP: https://developer.arm.com/documentation/101489/latest |