Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 1 | Change Log & Release Notes |
| 2 | ========================== |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 3 | |
| 4 | Please note that the Trusted Firmware-A Tests version follows the Trusted |
| 5 | Firmware-A version for simplicity. At any point in time, TF-A Tests version |
| 6 | `x.y` aims at testing TF-A version `x.y`. Different versions of TF-A and TF-A |
| 7 | Tests are not guaranteed to be compatible. This also means that a version |
| 8 | upgrade on the TF-A-Tests side might not necessarily introduce any new feature. |
| 9 | |
Madhukar Pappireddy | bced2f3 | 2020-04-08 15:44:38 -0500 | [diff] [blame] | 10 | Version 2.3 |
| 11 | ----------- |
| 12 | |
| 13 | New features |
| 14 | ^^^^^^^^^^^^ |
| 15 | |
| 16 | - More tests are made available in this release to help validate |
| 17 | the functionality of TF-A. |
| 18 | |
| 19 | - CI upgraded to use GCC 9.2-2019.12 toolchain for tf-a-tests. |
| 20 | |
| 21 | - Various improvements to test framework and test suite. |
| 22 | |
| 23 | TFTF |
| 24 | ~~~~ |
| 25 | |
| 26 | - Support for extended register usage as per SMCCC v1.2 specification. |
| 27 | |
| 28 | - Support for FVP platforms with SMT capabilities. |
| 29 | |
| 30 | - Improved support for documentation through addition of basic Sphinx |
| 31 | configuration and Makefile similar to TF-A repository. |
| 32 | |
| 33 | - Enhancement to libc library synchronous to TF-A code base. |
| 34 | |
| 35 | - ARMv8.3-PAuth enabled for all FWU tests in TFTF. |
| 36 | |
| 37 | - TFTF made RFC 4122 compliant by converting UUIDs to network order format. |
| 38 | |
| 39 | - Build improvement by deprecating custom AARCH64/AARCH32 macros in favor of |
| 40 | __arch64__ macro provided by compiler. |
| 41 | |
| 42 | - Support for HVC as a SMCCC conduit in TFTF. |
| 43 | |
| 44 | - New tests: |
| 45 | |
| 46 | - AArch32 tests for checking if PMU counters leak in secure world. |
| 47 | |
| 48 | - Add new debug filesystem (debugfs) test. |
| 49 | |
| 50 | - Add a SPCI direct messaging test targeting bare-metal cactus SP. |
| 51 | |
| 52 | |
| 53 | Secure partitions |
| 54 | ~~~~~~~~~~~~~~~~~ |
| 55 | |
| 56 | Cactus |
| 57 | ~~~~~~ |
| 58 | |
| 59 | - Several build improvements and symbol relocation fixup to make it position |
| 60 | independent executable. |
| 61 | |
| 62 | - Update of sample manifest to SPCI Beta1 format. |
| 63 | |
| 64 | - Support for generating JSON file as required by TF-A. |
| 65 | |
| 66 | Issues resolved since last release |
| 67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 68 | |
| 69 | - Makefile bug fix for performing parallel builds. |
| 70 | |
| 71 | - Add missing D-cache invalidation of RW memory in tftf_entrypoint to safeguard |
| 72 | against possible corruption. |
| 73 | |
| 74 | - Fixes in GIC drivers to support base addresses beyond 4G range. |
| 75 | |
| 76 | - Fix build with XML::LibXML 2.0202 Perl module |
| 77 | |
| 78 | Known issues and limitations |
| 79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 80 | |
| 81 | The sections below list the known issues and limitations of each test image |
| 82 | provided in this repository. Unless and otherwise stated, issues and limitations |
| 83 | stated in previous release continue to exist in this release. |
| 84 | |
| 85 | TFTF |
| 86 | ~~~~ |
| 87 | - NODE_HW_STATE test has been temporarily disabled for sgi575 platform due to a |
| 88 | dependency on SCP binaries version 2.5 |
| 89 | |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 90 | Version 2.2 |
| 91 | ----------- |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 92 | |
| 93 | New features |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 94 | ^^^^^^^^^^^^ |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 95 | |
| 96 | - A wide range of tests are made available in this release to help validate |
| 97 | the functionality of TF-A. |
| 98 | |
| 99 | - Various improvements to test framework and test suite. |
| 100 | |
| 101 | TFTF |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 102 | ~~~~ |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 103 | |
| 104 | - Enhancement to xlat table library synchronous to TF-A code base. |
| 105 | |
| 106 | - Enabled strict alignment checks (SCTLR.A & SCTLR.SA) in all images. |
| 107 | |
| 108 | - Support for a simple console driver. Currently it serves as a placeholder |
| 109 | with empty functions. |
| 110 | |
| 111 | - A topology helper API is added in the framework to get parent node info. |
| 112 | |
| 113 | - Support for FVP with clusters having upto 8 CPUs. |
| 114 | |
| 115 | - Enhanced linker script to separate code and RO data sections. |
| 116 | |
| 117 | - Relax SMC calls tests. The SMCCC specification recommends Trusted OSes to |
| 118 | mitigate the risk of leaking information by either preserving the register |
| 119 | state over the call, or returning a constant value, such as zero, in each |
| 120 | register. Tests only allowed the former behaviour and have been extended to |
| 121 | allow the latter as well. |
| 122 | |
| 123 | - Pointer Authentication enabled on warm boot path with individual APIAKey |
| 124 | generation for each CPU. |
| 125 | |
| 126 | - New tests: |
| 127 | |
| 128 | - Basic unit tests for xlat table library v2. |
| 129 | |
| 130 | - Tests for validating SVE support in TF-A. |
| 131 | |
| 132 | - Stress tests for dynamic xlat table library. |
| 133 | |
| 134 | - PSCI test to measure latencies when turning ON a cluster. |
| 135 | |
| 136 | - Series of AArch64 tests that stress the secure world to leak sensitive |
| 137 | counter values. |
| 138 | |
| 139 | - Test to validate PSCI SYSTEM_RESET call. |
| 140 | |
| 141 | - Basic tests to validate Memory Tagging Extensions are being enabled and |
| 142 | ensuring no undesired leak of sensitive data occurs. |
| 143 | |
| 144 | - Enhanced tests: |
| 145 | |
| 146 | - Improved tests for Pointer Authentication support. Checks are performed |
| 147 | to see if pointer authentication keys are accessible as well as validate |
| 148 | if secure keys are being leaked after a PSCI version call or TSP call. |
| 149 | |
| 150 | - Improved AMU test to remove unexecuted code iterating over Group1 counters |
| 151 | and fix the conditional check of AMU Group0 counter value. |
| 152 | |
| 153 | Secure partitions |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 154 | ~~~~~~~~~~~~~~~~~ |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 155 | |
| 156 | A new Secure Partition Quark is introduced in this release. |
| 157 | |
| 158 | Quark |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 159 | ~~~~~ |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 160 | |
| 161 | The Quark test secure partition provided is a simple service which returns a |
| 162 | magic number. Further, a simple test is added to test if Quark is functional. |
| 163 | |
| 164 | Issues resolved since last release |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 165 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 166 | |
| 167 | - Bug fix in libc memchr implementation. |
| 168 | |
| 169 | - Bug fix in calculation of number of CPUs. |
| 170 | |
| 171 | - Streamlined SMC WORKAROUND_2 test and fixed a false fail on Cortex-A76 CPU. |
| 172 | |
| 173 | - Pointer Authentication support is now available for secondary CPUs and the |
| 174 | corresponding tests are stable in this release. |
| 175 | |
| 176 | Known issues and limitations |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 177 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 178 | |
| 179 | The sections below list the known issues and limitations of each test image |
| 180 | provided in this repository. Unless and otherwise stated, issues and limitations |
| 181 | stated in previous release continue to exist in this release. |
| 182 | |
| 183 | TFTF |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 184 | ~~~~ |
Madhukar Pappireddy | 74ccffa | 2019-10-10 02:30:40 -0500 | [diff] [blame] | 185 | - Multicore spurious interrupt test is observed to have unstable behavior. As a |
| 186 | temporary solution, this test is skipped for AArch64 Juno configurations. |
| 187 | |
| 188 | - Generating SVE instructions requires `O3` compilation optimization. Since the |
| 189 | current build structure does not allow compilation flag modification for |
| 190 | specific files, the function which tests support for SVE has been pre-compiled |
| 191 | and added as an assembly file. |
| 192 | |
| 193 | |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 194 | |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 195 | Version 2.1 |
| 196 | ----------- |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 197 | |
| 198 | New features |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 199 | ^^^^^^^^^^^^ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 200 | |
| 201 | - Add initial support for testing Secure Partition Client Interface (SPCI) |
| 202 | and Secure Partition Run-Time (SPRT) standards. |
| 203 | |
| 204 | Exercise the full communication flow throughout the software stack, involving: |
| 205 | |
| 206 | - A Secure-EL0 test partition as the Trusted World agent. |
| 207 | |
| 208 | - TFTF as the Normal World agent. |
| 209 | |
| 210 | - The Secure Partition Manager (SPM) in TF-A. |
| 211 | |
| 212 | - Various stability improvements, code refactoring and clean ups. |
| 213 | |
| 214 | TFTF |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 215 | ~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 216 | |
| 217 | - Reorganize tests build infrastructure to allow the selection of a subset of |
| 218 | tests. |
| 219 | |
| 220 | - Reorganize the platform layer for improved clarity and simplicity. |
| 221 | |
| 222 | - Sanitise inclusion of drivers header files. |
| 223 | |
| 224 | - Enhance the test report format for improved clarity and conciseness. |
| 225 | |
| 226 | - Dump CPU registers when hitting an unexpected exception. Previously, this |
| 227 | would silently loop forever. |
| 228 | |
| 229 | - Import libc from TF-A to better align the two code bases. |
| 230 | |
| 231 | - New tests: |
| 232 | |
| 233 | - SPM tests for exercising communication through either the MM or SPCI/SPRT |
| 234 | interfaces. |
| 235 | |
| 236 | - SMC calling convention tests. |
| 237 | |
| 238 | - Initial tests for Armv8.3 Pointer Authentication support (experimental). |
| 239 | |
| 240 | - New platform ports: |
| 241 | |
| 242 | - `Arm SGI-575`_ FVP. |
| 243 | |
| 244 | - Hikey960 board (experimental). |
| 245 | |
| 246 | - `Arm Neoverse Reference Design N1 Edge (RD-N1-Edge)`_ FVP (experimental). |
| 247 | |
| 248 | Secure partitions |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 249 | ~~~~~~~~~~~~~~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 250 | |
| 251 | We now have 3 Secure Partitions to test the SPM implementation in TF-A. |
| 252 | |
| 253 | Cactus-MM |
| 254 | ''''''''' |
| 255 | |
| 256 | The Cactus test secure partition provided in version 2.0 has been renamed into |
| 257 | "*Cactus-MM*". It is still responsible for testing the SPM implementation based |
| 258 | on the Arm Management Mode Interface. |
| 259 | |
| 260 | Cactus |
| 261 | '''''' |
| 262 | |
| 263 | This is a new test secure partition (as the former "*Cactus*" has been renamed |
| 264 | into "*Cactus-MM*", see above). |
| 265 | |
| 266 | Unlike *Cactus-MM*, this image tests the SPM implementation based on the SPCI |
| 267 | and SPRT draft specifications. |
| 268 | |
| 269 | It runs in Secure-EL0 and performs the following tasks: |
| 270 | |
| 271 | - Test that TF-A has correctly setup the secure partition environment (access |
| 272 | to cache maintenance operations, to floating point registers, etc.) |
| 273 | |
| 274 | - Test that TF-A accepts to change data access permissions and instruction |
| 275 | permissions on behalf of Cactus for memory regions the latter owns. |
| 276 | |
| 277 | - Test communication with SPM through SPCI/SPRT interfaces. |
| 278 | |
| 279 | Ivy |
| 280 | ''' |
| 281 | |
| 282 | This is also a new test secure partition. It is provided in order to test |
| 283 | multiple partitions support in TF-A. It is derived from Cactus and essentially |
| 284 | provides the same services but with different identifiers at the moment. |
| 285 | |
| 286 | EL3 payload |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 287 | ~~~~~~~~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 288 | |
| 289 | - New platform ports: |
| 290 | |
| 291 | - `Arm SGI-575`_ FVP. |
| 292 | |
| 293 | - `Arm Neoverse Reference Design N1 Edge (RD-N1-Edge)`_ FVP (experimental). |
| 294 | |
| 295 | Issues resolved since last release |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 296 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 297 | |
| 298 | - The GICv2 spurious IRQ test is no longer Juno-specific. It is now only |
| 299 | GICv2-specific. |
| 300 | |
| 301 | - The manual tests in AArch32 state now work properly. After investigation, |
| 302 | we identified that this issue was not AArch32 specific but concerned any |
| 303 | test relying on state information persisting across reboots. It was due to |
| 304 | an incorrect build configuration. |
| 305 | |
| 306 | - Cactus-MM now successfully links with GNU toolchain 7.3.1. |
| 307 | |
| 308 | Known issues and limitations |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 309 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 310 | |
| 311 | The sections below lists the known issues and limitations of each test image |
| 312 | provided in this repository. |
| 313 | |
| 314 | TFTF |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 315 | ~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 316 | |
| 317 | The TFTF test image might be conceptually sub-divided further in 2 parts: the |
| 318 | tests themselves, and the test framework they are based upon. |
| 319 | |
| 320 | Test framework |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 321 | ~~~~~~~~~~~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 322 | |
| 323 | - Some stability issues. |
| 324 | |
| 325 | - No mechanism to abort tests when they time out (e.g. this could be |
| 326 | implemented using a watchdog). |
| 327 | |
| 328 | - No convenient way to include or exclude tests on a per-platform basis. |
| 329 | |
| 330 | - Power domains and affinity levels are considered equivalent but they may |
| 331 | not necessarily be. |
| 332 | |
| 333 | - Need to provide better support to alleviate duplication of test code. There |
| 334 | are some recurrent test patterns for which helper functions should be |
| 335 | provided. For example, bringing up all CPUs on the platform and executing the |
| 336 | same function on all of them, or programming an interrupt and waiting for it |
| 337 | to trigger. |
| 338 | |
| 339 | - Every CPU that participates in a test must return from the test function. If |
| 340 | it does not - e.g. because it powered itself off for testing purposes - then |
| 341 | the test framework will wait forever for this CPU. This limitation is too |
| 342 | restrictive for some tests. |
| 343 | |
| 344 | - No protection against interrupted flash operations. If the target is reset |
| 345 | while some data is written to flash, the test framework might behave |
| 346 | incorrectly on reset. |
| 347 | |
| 348 | - When compiling the code, if the generation of the ``tests_list.c`` and/or |
| 349 | ``tests_list.h`` files fails, the build process is not aborted immediately |
| 350 | and will only fail later on. |
| 351 | |
| 352 | - The directory layout requires further improvements. Most of the test |
| 353 | framework code has been moved under the ``tftf/`` directory to better isolate |
| 354 | it but this effort is not complete. As a result, there are still some TFTF |
| 355 | files scattered around. |
| 356 | |
| 357 | - Pointer Authentication testing is experimental and incomplete at this stage. |
| 358 | It is only enabled on the primary CPU on the cold boot. |
| 359 | |
| 360 | Tests |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 361 | ~~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 362 | |
| 363 | - Some tests are implemented for AArch64 only and are skipped on AArch32. |
| 364 | |
| 365 | - Some tests are not robust enough: |
| 366 | |
| 367 | - Some tests might hang in some circumstances. For example, they might wait |
| 368 | forever for a condition to become true. |
| 369 | |
| 370 | - Some tests rely on arbitrary time delays instead of proper synchronization |
| 371 | when executing order-sensitive steps. |
| 372 | |
| 373 | - Some tests have been implemented in a practical manner: they seem to work |
| 374 | on actual hardware but they make assumptions that are not guaranteed by |
| 375 | the Arm architecture. Therefore, they might fail on some other platforms. |
| 376 | |
| 377 | - PSCI stress tests are very unreliable and will often hang. The root cause is |
| 378 | not known for sure but this might be due to bad synchronization between CPUs. |
| 379 | |
| 380 | - The GICv2 spurious IRQ test sometimes fails with the following error message: |
| 381 | |
| 382 | ``SMC @ lead CPU returned 0xFFFFFFFF 0x8 0xC`` |
| 383 | |
| 384 | The root cause is unknown. |
| 385 | |
| 386 | - The FWU tests take a long time to complete. This is because they wait for the |
| 387 | watchdog to reset the system. On FVP, TF-A configures the watchdog period to |
| 388 | about 4 min. This limit is excessive for an automated testing context and |
| 389 | leaves the user without feedback and unable to determine if the tests are |
| 390 | proceeding properly. |
| 391 | |
| 392 | - The test "Target timer to a power down cpu" sometimes fails with the |
| 393 | following error message: |
| 394 | |
| 395 | ``Expected timer switch: 4 Actual: 3`` |
| 396 | |
| 397 | The root cause is unknown. |
| 398 | |
| 399 | FWU images |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 400 | ~~~~~~~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 401 | |
| 402 | - The FWU tests do not work on the revC of the Base AEM FVP. They only work on |
| 403 | the revB. |
| 404 | |
| 405 | - NS-BL1U and NS-BL2U images reuse TFTF-specific code for legacy reasons. This |
| 406 | is not a clean design and may cause confusion. |
| 407 | |
| 408 | Test secure partitions (Cactus, Cactus-MM, Ivy) |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 409 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 410 | |
| 411 | - This is experimental code. It's likely to change a lot as the secure |
| 412 | partition software architecture evolves. |
| 413 | |
| 414 | - Supported on AArch64 FVP platform only. |
| 415 | |
| 416 | All test images |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 417 | ~~~~~~~~~~~~~~~ |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 418 | |
| 419 | - TF-A Tests are derived from a fork of TF-A so: |
| 420 | |
| 421 | - they've got some code in common but lag behind on some features. |
| 422 | |
| 423 | - there might still be some irrelevant references to TF-A. |
| 424 | |
| 425 | - Some design issues. |
| 426 | E.g. TF-A Tests inherited from the I/O layer of TF-A, which still needs a |
| 427 | major rework. |
| 428 | |
| 429 | - Cannot build TF-A Tests with Clang. Only GCC is supported. |
| 430 | |
| 431 | - The build system does not cope well with parallel building. The user should |
| 432 | not attempt to run multiple jobs in parallel with the ``-j`` option of `GNU |
| 433 | make`. |
| 434 | |
| 435 | - The build system does not properly track build options. A clean build must be |
| 436 | performed every time a build option changes. |
| 437 | |
| 438 | - UUIDs are not compliant to RFC 4122. |
| 439 | |
| 440 | - No floating point support. The code is compiled with GCC flag |
| 441 | ``-mgeneral-regs-only``, which prevents the compiler from generating code |
| 442 | that accesses floating point registers. This might limit some test scenarios. |
| 443 | |
| 444 | - The documentation is too lightweight. |
| 445 | |
| 446 | - Missing instruction barriers in some places before reading the system counter |
| 447 | value. As a result, the CPU could speculatively read it and any delay loop |
| 448 | calculations might be off (because based on stale values). We need to examine |
| 449 | all such direct reads of the ``CNTPCT_EL0`` register and replace them with a |
| 450 | call to ``syscounter_read()`` where appropriate. |
| 451 | |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 452 | Version 2.0 |
| 453 | ----------- |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 454 | |
| 455 | New features |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 456 | ^^^^^^^^^^^^ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 457 | |
| 458 | This is the first public release of the Trusted Firmware-A Tests source code. |
| 459 | |
| 460 | TFTF |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 461 | ~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 462 | |
| 463 | - Provides a baremetal test framework to exercise TF-A features through its |
| 464 | ``SMC`` interface. |
| 465 | |
| 466 | - Integrates easily with TF-A: the TFTF binary is packaged in the FIP image |
| 467 | as a ``BL33`` component. |
| 468 | |
| 469 | - Standalone binary that runs on the target without human intervention (except |
| 470 | for some specific tests that require a manual target reset). |
| 471 | |
| 472 | - Designed for multi-core testing. The various sub-frameworks allow maximum |
| 473 | parallelism in order to stress the firmware. |
| 474 | |
| 475 | - Displays test results on the UART output. This may then be parsed by an |
| 476 | external tool and integrated in a continuous integration system. |
| 477 | |
| 478 | - Supports running in AArch64 (NS-EL2 or NS-EL1) and AArch32 states. |
| 479 | |
| 480 | - Supports parsing a tests manifest (XML file) listing the tests to include in |
| 481 | the binary. |
| 482 | |
| 483 | - Detects most platform features at run time (e.g. topology, GIC version, ...). |
| 484 | |
| 485 | - Provides a topology enumeration framework. Allows tests to easily go through |
| 486 | affinity levels and power domain nodes. |
| 487 | |
| 488 | - Provides an event framework to synchronize CPU operations in a multi-core |
| 489 | context. |
| 490 | |
| 491 | - Provides a timer framework. Relies on a single global timer to generate |
| 492 | interrupts for all CPUs in the system. This allows tests to easily program |
| 493 | interrupts on demand to use as a wake-up event source to come out of CPU |
| 494 | suspend state for example. |
| 495 | |
| 496 | - Provides a power-state enumeration framework. Abstracts the valid power |
| 497 | states supported on the platform. |
| 498 | |
| 499 | - Provides helper functions for power management operations (CPU hotplug, |
| 500 | CPU suspend, system suspend, ...) with proper saving of the hardware state. |
| 501 | |
| 502 | - Supports rebooting the platform at the end of each test for greater |
| 503 | independence between tests. |
| 504 | |
| 505 | - Supports interrupting and resuming a test session. This relies on storing |
| 506 | test results in non-volatile memory (e.g. flash). |
| 507 | |
| 508 | FWU images |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 509 | ~~~~~~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 510 | |
| 511 | - Provides example code to exercise the Firmware Update feature of TF-A. |
| 512 | |
| 513 | - Tests the robustness of the FWU state machine implemented in the TF-A by |
| 514 | sending valid and invalid authentication, copy and image execution requests |
| 515 | to the TF-A BL1 image. |
| 516 | |
| 517 | EL3 test payload |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 518 | ~~~~~~~~~~~~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 519 | |
| 520 | - Tests the ability of TF-A to load an EL3 payload. |
| 521 | |
| 522 | Cactus test secure partition |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 523 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 524 | |
| 525 | - Tests that TF-A has correctly setup the secure partition environment: it |
| 526 | should be allowed to perform cache maintenance operations, access floating |
| 527 | point registers, etc. |
| 528 | |
| 529 | - Tests the ability of a secure partition to request changing data access |
| 530 | permissions and instruction permissions of memory regions it owns. |
| 531 | |
| 532 | - Tests the ability of a secure partition to handle StandaloneMM requests. |
| 533 | |
| 534 | Known issues and limitations |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 535 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 536 | |
| 537 | The sections below lists the known issues and limitations of each test image |
| 538 | provided in this repository. |
| 539 | |
| 540 | TFTF |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 541 | ~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 542 | |
| 543 | The TFTF test image might be conceptually sub-divided further in 2 parts: the |
| 544 | tests themselves, and the test framework they are based upon. |
| 545 | |
| 546 | Test framework |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 547 | ~~~~~~~~~~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 548 | |
| 549 | - Some stability issues. |
| 550 | |
| 551 | - No mechanism to abort tests when they time out (e.g. this could be |
| 552 | implemented using a watchdog). |
| 553 | |
| 554 | - No convenient way to include or exclude tests on a per-platform basis. |
| 555 | |
| 556 | - Power domains and affinity levels are considered equivalent but they may |
| 557 | not necessarily be. |
| 558 | |
| 559 | - Need to provide better support to alleviate duplication of test code. There |
| 560 | are some recurrent test patterns for which helper functions should be |
| 561 | provided. For example, bringing up all CPUs on the platform and executing the |
| 562 | same function on all of them, or programming an interrupt and waiting for it |
| 563 | to trigger. |
| 564 | |
| 565 | - Every CPU that participates in a test must return from the test function. If |
| 566 | it does not - e.g. because it powered itself off for testing purposes - then |
| 567 | the test framework will wait forever for this CPU. This limitation is too |
| 568 | restrictive for some tests. |
| 569 | |
| 570 | - No protection against interrupted flash operations. If the target is reset |
| 571 | while some data is written to flash, the test framework might behave |
| 572 | incorrectly on reset. |
| 573 | |
| 574 | - When compiling the code, if the generation of the tests_list.c and/or |
| 575 | tests_list.h files fails, the build process is not aborted immediately and |
| 576 | will only fail later on. |
| 577 | |
| 578 | - The directory layout is confusing. Most of the test framework code has been |
| 579 | moved under the ``tftf/`` directory to better isolate it but this effort is |
| 580 | not complete. As a result, there are still some TFTF files scattered around. |
| 581 | |
| 582 | Tests |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 583 | ~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 584 | |
| 585 | - Some tests are implemented for AArch64 only and are skipped on AArch32. |
| 586 | |
| 587 | - Some tests are not robust enough: |
| 588 | |
| 589 | - Some tests might hang in some circumstances. For example, they might wait |
| 590 | forever for a condition to become true. |
| 591 | |
| 592 | - Some tests rely on arbitrary time delays instead of proper synchronization |
| 593 | when executing order-sensitive steps. |
| 594 | |
| 595 | - Some tests have been implemented in a practical manner: they seem to work |
| 596 | on actual hardware but they make assumptions that are not guaranteed by |
| 597 | the Arm architecture. Therefore, they might fail on some other platforms. |
| 598 | |
| 599 | - PSCI stress tests are very unreliable and will often hang. The root cause is |
| 600 | not known for sure but this might be due to bad synchronization between CPUs. |
| 601 | |
| 602 | - The GICv2 spurious IRQ test is Juno-specific. In reality, it should only be |
| 603 | GICv2-specific. It should be reworked to remove any platform-specific |
| 604 | assumption. |
| 605 | |
| 606 | - The GICv2 spurious IRQ test sometimes fails with the following error message: |
| 607 | |
| 608 | ``SMC @ lead CPU returned 0xFFFFFFFF 0x8 0xC`` |
| 609 | |
| 610 | The root cause is unknown. |
| 611 | |
| 612 | - The manual tests in AArch32 mode do not work properly. They save some state |
| 613 | information into non-volatile memory in order to detect the reset reason but |
| 614 | this state does not appear to be retained. As a result, these tests keep |
| 615 | resetting infinitely. |
| 616 | |
| 617 | - The FWU tests take a long time to complete. This is because they wait for the |
| 618 | watchdog to reset the system. On FVP, TF-A configures the watchdog period to |
| 619 | about 4 min. This is way too long in an automated testing context. Besides, |
| 620 | the user gets not feedback, which may let them think that the tests are not |
| 621 | working properly. |
| 622 | |
| 623 | - The test "Target timer to a power down cpu" sometimes fails with the |
| 624 | following error message: |
| 625 | |
| 626 | ``Expected timer switch: 4 Actual: 3`` |
| 627 | |
| 628 | The root cause is unknown. |
| 629 | |
| 630 | FWU images |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 631 | ~~~~~~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 632 | |
Sandrine Bailleux | 7af6c6d | 2018-10-22 17:09:07 +0200 | [diff] [blame] | 633 | - The FWU tests do not work on the revC of the Base AEM FVP. They only work on |
| 634 | the revB. |
| 635 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 636 | - NS-BL1U and NS-BL2U images reuse TFTF-specific code for legacy reasons. This |
| 637 | is not a clean design and may cause confusion. |
| 638 | |
| 639 | Cactus test secure partition |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 640 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 641 | |
| 642 | - Cactus is experimental code. It's likely to change a lot as the secure |
| 643 | partition software architecture evolves. |
| 644 | |
| 645 | - Fails to link with GNU toolchain 7.3.1. |
| 646 | |
| 647 | - Cactus is supported on AArch64 FVP platform only. |
| 648 | |
| 649 | All test images |
Paul Beesley | 5c92895 | 2019-10-24 11:57:00 +0000 | [diff] [blame] | 650 | ~~~~~~~~~~~~~~~ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 651 | |
| 652 | - TF-A Tests are derived from a fork of TF-A so: |
| 653 | |
| 654 | - they've got some code in common but lag behind on some features. |
| 655 | |
| 656 | - there might still be some irrelevant references to TF-A. |
| 657 | |
| 658 | - Some design issues. |
| 659 | E.g. TF-A Tests inherited from the I/O layer of TF-A, which still needs a |
| 660 | major rework. |
| 661 | |
| 662 | - Cannot build TF-A Tests with Clang. Only GCC is supported. |
| 663 | |
| 664 | - The build system does not cope well with parallel building. The user should |
| 665 | not attempt to run multiple jobs in parallel with the ``-j`` option of `GNU |
| 666 | make`. |
| 667 | |
| 668 | - The build system does not properly track build options. A clean build must be |
| 669 | performed every time a build option changes. |
| 670 | |
| 671 | - SMCCC v2 is not properly supported. |
| 672 | |
| 673 | - UUIDs are not compliant to RFC 4122. |
| 674 | |
| 675 | - No floating point support. The code is compiled with GCC flag |
| 676 | ``-mgeneral-regs-only``, which prevents the compiler from generating code |
| 677 | that accesses floating point registers. This might limit some test scenarios. |
| 678 | |
| 679 | - The documentation is too lightweight. |
| 680 | |
| 681 | -------------- |
| 682 | |
Madhukar Pappireddy | bced2f3 | 2020-04-08 15:44:38 -0500 | [diff] [blame] | 683 | *Copyright (c) 2018-2020, Arm Limited. All rights reserved.* |
Sandrine Bailleux | 88e96a1 | 2019-03-28 09:34:55 +0100 | [diff] [blame] | 684 | |
| 685 | .. _Arm Neoverse Reference Design N1 Edge (RD-N1-Edge): https://developer.arm.com/products/system-design/reference-design/neoverse-reference-design |
| 686 | .. _Arm SGI-575: https://developer.arm.com/products/system-design/fixed-virtual-platforms |