blob: 91f3fde495758e845d2ff8386d42e91ee14f2d36 [file] [log] [blame]
Paul Beesley5c928952019-10-24 11:57:00 +00001Change Log & Release Notes
2==========================
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02003
4Please note that the Trusted Firmware-A Tests version follows the Trusted
5Firmware-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
7Tests are not guaranteed to be compatible. This also means that a version
8upgrade on the TF-A-Tests side might not necessarily introduce any new feature.
9
Manish V Badarkhe86600a82020-10-04 18:33:44 +010010Version 2.4
11-----------
12
13New features
14^^^^^^^^^^^^
15- More tests are made available in this release to help validate the
16 functionalities in the following areas:
17 - SMCCC.
18 - New architecture specific features.
19 - FF-A features.
20 - New platform ports.
21
22- Various improvements to test framework and test suite such as documentation,
23 removing un-necessary dependencies, etc.
24
25TFTF
26~~~~
27
28- Remove dependencies from FVP to generic code by converting some FVP platform
29 specific macros to the common macros.
30
31- Remove make as a package dependency to compile TF-A test code.
32
33- Move defaults values and macro defs in a separate folder from Makefile.
34
35- Allow alternate stdout to be used apart from pl011 UART.
36
37- Get FVP platform's topology from build options to make FVP platform
38 configuration more flexible and eliminate test errors when the platform
39 is configured with number of CPUs less than default values in the makefile.
40
41- Update the FIP corrupt address which is used to corrupt BL2 image that helps
42 to trigger firmware update process.
43
44- Add explicit barrier before sev() in tftf_send_event_common API to avoid
45 core hang.
46
47- Align output properly on issuing make help_tests by removing dashes
48 and sort tests.
49
50- Moved a few FVP and Juno specific defined from common header files to platform
51 specific header files.
52
53- Replace SPCI with PSA FF-A in code as SPCI is now called as FF-A.
54
55- Add owner field to sp_layout generation to differentiate owner of SP which
56 could either be Silicon Provider or Platform provider.
57
58- Add v8.5 Branch Target Identifier(BTI) support in TFTF.
59
60- Remove dependency on SYS_CNT_BASE1 to read the memory mapped timers.
61
62- Enables SError aborts for all CPUs, during their power on sequence.
63
64- Documentation:
65
66 - Use conditional assignment on sphinx variables so that they can be
67 overwritten by environment and/or command line.
68
69 - Add support for documentation build as a target in Makefile.
70
71 - Update list of maintainers.
72
73 - Update documentation to explain how to locally build the documentation.
74
75 - Add .editorconfig from TF-A to define the coding style.
76
77 - Fix documentation to include 'path/to' prefix when specifying tftf.bin on
78 make fip cmd.
79
80 - Use docker to build documentation.
81
82 - Replace SPCI with PSA FF-A in documentation as SPCI is now called
83 as FF-A.
84
85- NVIDIA Tegra194:
86
87 - Skip CPU suspend tests requiring SGI as wake source as Tegra194 platforms
88 do not support CPU suspend power down and cannot be woken up with an SGI.
89
90 - Disable some system suspend test cases.
91
92 - Create dummy SMMU context for system resume to allow the System Resume
93 Firmware to complete without any errors or warnings.
94
95 - Increase RTC step value to 5ms as RTC consumes 250us for each register
96 read/write. Increase the step value to 5ms to cover all the register
97 read/write in program_timer().
98
99 - Skip some timer framework validation tests as CPUs on Tegra194 platforms
100 cannot be woken up with the RTC timer interrupt after power off.
101
102 - Introduce per-CPU Hypervisor Timer Interrupt ID.
103
104 - Skip PSCI STAT tests requiring PSTATE_TYPE_POWERDOWN as Tegra194 platforms
105 do not support CPU suspend with state type as PSTATE_TYPE_POWERDOWN.
106
107 - Disable boot requirement tests as Tegra194 platforms do not support memory
108 mapped timers.
109
110 - Skips the test "Create all power states and validate EL3 power state parsing"
111 from the "EL3 power state parser validation" test suite as it is not in
112 sync with this expectation.
113
114 - Moved reset, timers. wake, watchdog drivers from Tegra194 specific folder to
115 common driver folder so that these drivers can be used for other NVIDIA platforms.
116
117- New tests:
118
119 - Add test for SDEI RM_ANY routing mode.
120
121 - Add initial platform support for TC0.
122
123 - Add SMC fuzzing module test.
124
125 - Add test case for SMCCC_ARCH_SOC_ID feature.
126
127 - Add test that supports ARMv8.6-FGT in TF-A.
128
129 - Add test that supports ARMv8.6-ECV in TF-A.
130
131 - Add test for FFA_VERSION interface.
132
133 - Add test for FFA_FEATURES interface.
134
135 - Add console driver for the TI UART 16550.
136
137 - Add tests for FF-A memory sharing interfaces between tftf
138 and cactus secure partitions.
139
140 - NVIDIA Tegra194:
141
142 - Introduce platform port for Tegra194 to to initialize the tftf
143 framework and execute tests on the CPUs.
144
145 - Introduce power management support.
146
147 - Introduce support for RTC as wake source.
148
149 - Introduce system reset functionality test.
150
151 - Introduce watchdog timer test.
152
153 - Introduce support for NVIDIA Denver CPUs.
154
155 - Introduce RAS uncorrectable error injection test.
156
157 - Introduce tests to verify the Video Memory resize interface.
158
159 - Introduce test to inject RAS corrected errors for all supported
160 nodes from all CPUs.
161
162 - Introduce a test to get return value from SMC SiP function
163 TEGRA_SIP_GET_SMMU_PER.
164
165 - NVIDIA Tegra196:
166
167 - Introduce initial support for Tegra186 platforms.
168
169 - NVIDIA Tegra210:
170
171 - Introduce initial support for Tegra210 platforms.
172
173Secure partition - Cactus
174~~~~~~~~~~~~~~~~~~~~~~~~~
175
176- TFTF doesn't need to boot Secondary Cactus as Hafnium now boots all
177 partitions according to "boot-order" field value in the partition
178 manifests.
179
180- Remove test files related to deprecated SPCI Alpha specification and
181 SPRT interface.
182
183- Select different stdout device at runtime as primary VM can access
184 to UART while secondary VM's use hypervisor call to SPM for debug
185 logging.
186
187- An SP maps its RX/TX buffers in its EL1&0 Stage-1 translation regime.
188 The same RX/TX buffers are mapped by the SPMC in the SP's EL1&0
189 Stage-2 translation regime during boot time.
190
191- Update memory/device region nodes in manifest. Memory region has 3
192 entries such as RX buffer, TX buffer and dummy. These memory region
193 entries are mapped with attributes as "RX buffer: read-only",
194 "TX buffer: read-write" and "dummy: read-write-execute".
195 Device region mapped with read-write attribute.
196
197- Create tertiary partition without RX_TX region specified to test the
198 RXTX_MAP API.
199
200- Add third partition to ffa_partition_info_get test to test that a
201 partition can successfully get information about the third cactus
202 partition.
203
204- Map RXTX region to third partition to point the mailbox to this RXTX
205 region.
206
207- Adjust the number of EC context to max number of PEs as per the FF-A
208 specification mandating that a SP must either "Implement as many ECs
209 as the number of PEs (in case of a "multi-processor" SP with pinned
210 contexts)" or "Implement a single EC (in case of a migratable
211 "uni-processor" SP).
212
213- Updated cactus test payload and TFTF ids as it is decided to have
214 secure partition FF-A ids in the range from 0x8001 to 0xfffe, 0x8000
215 and 0xffff FF-A ids are reserved for the SPMC and the SPMD respectively
216 and in the non-secure worlds, FF-A id 0 is reserved for the hypervisor
217 and 1 to 0x7fff FF-A ids are reserved for VMs.
218
219- Break the message loop on bad message request instead of replying
220 with the FF-A error ABI to the SPMC.
221
222- Remove deprecated hypervisor calls spm_vm_get_count and spm_vcpu_get_count.
223 Instead use FFA_PARTITION_INFO_GET discovery ABI.
224
225- Implement hvc call 'SPM_INTERRUPT_GET' to get interrupt id.
226
227- Re-structure platform dependent files by moving platform dependent files
228 and macros to platform specific folder.
229
230- Adjust partition info get properties to support receipt of direct
231 message request.
232
233- New tests:
234
235 - Add FFA Version Test.
236
237 - Add FFA_FEATURES test.
238
239 - Add FFA_MEM_SHARE test
240
241 - Add FFA_MEM_LEND test.
242
243 - Add FFA_MEM_DONATE test.
244
245 - Add FFA_PARTITION_INFO_GET test.
246
247 - Add exception/interrupt framework.
248
249 - Add cactus support for TC0 platform.
250
251Issues resolved since last release
252^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
253
254- Update link to SMCCC specification.
255
256- Trim down the top-level readme file to give brief overview of the project
257 and also fix/update a number of broken/out-dated links in it.
258
259- Bug fix in Multicore IRQ spurious test.
260
261- Fix memory regions mapping with no NS bit set.
262
263- Reenable PSCI NODE_HW_STATE test which was disabled earlier due to
264 outdated SCP firmware.
265
266- Fix Aarch32 zeromem() function by avoiding infinite loop in 'zeromem'
267 function and optimizing 'memcpy4' function.
268
269- Add missing help_tests info on help target in the top-level Makefile.
270
271- Trim down the readme file as it does not need to provide detailed
272 information, instead it can simply be a landing page providing a brief
273 overview of the project and redirecting the reader to RTD for further
274 information.
275
276- Fix maximum number of CPUs in DSU cluster by setting maximum number of CPUs
277 in DSU cluster to 8.
278
Madhukar Pappireddybced2f32020-04-08 15:44:38 -0500279Version 2.3
280-----------
281
282New features
283^^^^^^^^^^^^
284
285- More tests are made available in this release to help validate
286 the functionality of TF-A.
287
288- CI upgraded to use GCC 9.2-2019.12 toolchain for tf-a-tests.
289
290- Various improvements to test framework and test suite.
291
292TFTF
293~~~~
294
295- Support for extended register usage as per SMCCC v1.2 specification.
296
297- Support for FVP platforms with SMT capabilities.
298
299- Improved support for documentation through addition of basic Sphinx
300 configuration and Makefile similar to TF-A repository.
301
302- Enhancement to libc library synchronous to TF-A code base.
303
304- ARMv8.3-PAuth enabled for all FWU tests in TFTF.
305
306- TFTF made RFC 4122 compliant by converting UUIDs to network order format.
307
308- Build improvement by deprecating custom AARCH64/AARCH32 macros in favor of
309 __arch64__ macro provided by compiler.
310
311- Support for HVC as a SMCCC conduit in TFTF.
312
313- New tests:
314
315 - AArch32 tests for checking if PMU counters leak in secure world.
316
317 - Add new debug filesystem (debugfs) test.
318
319 - Add a SPCI direct messaging test targeting bare-metal cactus SP.
320
321
322Secure partitions
323~~~~~~~~~~~~~~~~~
324
325Cactus
326~~~~~~
327
328- Several build improvements and symbol relocation fixup to make it position
329 independent executable.
330
331- Update of sample manifest to SPCI Beta1 format.
332
333- Support for generating JSON file as required by TF-A.
334
335Issues resolved since last release
336^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
337
338- Makefile bug fix for performing parallel builds.
339
340- Add missing D-cache invalidation of RW memory in tftf_entrypoint to safeguard
341 against possible corruption.
342
343- Fixes in GIC drivers to support base addresses beyond 4G range.
344
345- Fix build with XML::LibXML 2.0202 Perl module
346
347Known issues and limitations
348^^^^^^^^^^^^^^^^^^^^^^^^^^^^
349
350The sections below list the known issues and limitations of each test image
351provided in this repository. Unless and otherwise stated, issues and limitations
352stated in previous release continue to exist in this release.
353
354TFTF
355~~~~
356- NODE_HW_STATE test has been temporarily disabled for sgi575 platform due to a
357 dependency on SCP binaries version 2.5
358
Paul Beesley5c928952019-10-24 11:57:00 +0000359Version 2.2
360-----------
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500361
362New features
Paul Beesley5c928952019-10-24 11:57:00 +0000363^^^^^^^^^^^^
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500364
365- A wide range of tests are made available in this release to help validate
366 the functionality of TF-A.
367
368- Various improvements to test framework and test suite.
369
370TFTF
Paul Beesley5c928952019-10-24 11:57:00 +0000371~~~~
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500372
373- Enhancement to xlat table library synchronous to TF-A code base.
374
375- Enabled strict alignment checks (SCTLR.A & SCTLR.SA) in all images.
376
377- Support for a simple console driver. Currently it serves as a placeholder
378 with empty functions.
379
380- A topology helper API is added in the framework to get parent node info.
381
382- Support for FVP with clusters having upto 8 CPUs.
383
384- Enhanced linker script to separate code and RO data sections.
385
386- Relax SMC calls tests. The SMCCC specification recommends Trusted OSes to
387 mitigate the risk of leaking information by either preserving the register
388 state over the call, or returning a constant value, such as zero, in each
389 register. Tests only allowed the former behaviour and have been extended to
390 allow the latter as well.
391
392- Pointer Authentication enabled on warm boot path with individual APIAKey
393 generation for each CPU.
394
395- New tests:
396
397 - Basic unit tests for xlat table library v2.
398
399 - Tests for validating SVE support in TF-A.
400
401 - Stress tests for dynamic xlat table library.
402
403 - PSCI test to measure latencies when turning ON a cluster.
404
405 - Series of AArch64 tests that stress the secure world to leak sensitive
406 counter values.
407
408 - Test to validate PSCI SYSTEM_RESET call.
409
410 - Basic tests to validate Memory Tagging Extensions are being enabled and
411 ensuring no undesired leak of sensitive data occurs.
412
413- Enhanced tests:
414
415 - Improved tests for Pointer Authentication support. Checks are performed
416 to see if pointer authentication keys are accessible as well as validate
417 if secure keys are being leaked after a PSCI version call or TSP call.
418
419 - Improved AMU test to remove unexecuted code iterating over Group1 counters
420 and fix the conditional check of AMU Group0 counter value.
421
422Secure partitions
Paul Beesley5c928952019-10-24 11:57:00 +0000423~~~~~~~~~~~~~~~~~
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500424
425A new Secure Partition Quark is introduced in this release.
426
427Quark
Paul Beesley5c928952019-10-24 11:57:00 +0000428~~~~~
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500429
430The Quark test secure partition provided is a simple service which returns a
431magic number. Further, a simple test is added to test if Quark is functional.
432
433Issues resolved since last release
Paul Beesley5c928952019-10-24 11:57:00 +0000434^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500435
436- Bug fix in libc memchr implementation.
437
438- Bug fix in calculation of number of CPUs.
439
440- Streamlined SMC WORKAROUND_2 test and fixed a false fail on Cortex-A76 CPU.
441
442- Pointer Authentication support is now available for secondary CPUs and the
443 corresponding tests are stable in this release.
444
445Known issues and limitations
Paul Beesley5c928952019-10-24 11:57:00 +0000446^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500447
448The sections below list the known issues and limitations of each test image
449provided in this repository. Unless and otherwise stated, issues and limitations
450stated in previous release continue to exist in this release.
451
452TFTF
Paul Beesley5c928952019-10-24 11:57:00 +0000453~~~~
Madhukar Pappireddy74ccffa2019-10-10 02:30:40 -0500454- Multicore spurious interrupt test is observed to have unstable behavior. As a
455 temporary solution, this test is skipped for AArch64 Juno configurations.
456
457- Generating SVE instructions requires `O3` compilation optimization. Since the
458 current build structure does not allow compilation flag modification for
459 specific files, the function which tests support for SVE has been pre-compiled
460 and added as an assembly file.
461
462
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100463
Paul Beesley5c928952019-10-24 11:57:00 +0000464Version 2.1
465-----------
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100466
467New features
Paul Beesley5c928952019-10-24 11:57:00 +0000468^^^^^^^^^^^^
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100469
470- Add initial support for testing Secure Partition Client Interface (SPCI)
471 and Secure Partition Run-Time (SPRT) standards.
472
473 Exercise the full communication flow throughout the software stack, involving:
474
475 - A Secure-EL0 test partition as the Trusted World agent.
476
477 - TFTF as the Normal World agent.
478
479 - The Secure Partition Manager (SPM) in TF-A.
480
481- Various stability improvements, code refactoring and clean ups.
482
483TFTF
Paul Beesley5c928952019-10-24 11:57:00 +0000484~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100485
486- Reorganize tests build infrastructure to allow the selection of a subset of
487 tests.
488
489- Reorganize the platform layer for improved clarity and simplicity.
490
491- Sanitise inclusion of drivers header files.
492
493- Enhance the test report format for improved clarity and conciseness.
494
495- Dump CPU registers when hitting an unexpected exception. Previously, this
496 would silently loop forever.
497
498- Import libc from TF-A to better align the two code bases.
499
500- New tests:
501
502 - SPM tests for exercising communication through either the MM or SPCI/SPRT
503 interfaces.
504
505 - SMC calling convention tests.
506
507 - Initial tests for Armv8.3 Pointer Authentication support (experimental).
508
509- New platform ports:
510
511 - `Arm SGI-575`_ FVP.
512
513 - Hikey960 board (experimental).
514
515 - `Arm Neoverse Reference Design N1 Edge (RD-N1-Edge)`_ FVP (experimental).
516
517Secure partitions
Paul Beesley5c928952019-10-24 11:57:00 +0000518~~~~~~~~~~~~~~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100519
520We now have 3 Secure Partitions to test the SPM implementation in TF-A.
521
522Cactus-MM
523'''''''''
524
525The Cactus test secure partition provided in version 2.0 has been renamed into
526"*Cactus-MM*". It is still responsible for testing the SPM implementation based
527on the Arm Management Mode Interface.
528
529Cactus
530''''''
531
532This is a new test secure partition (as the former "*Cactus*" has been renamed
533into "*Cactus-MM*", see above).
534
535Unlike *Cactus-MM*, this image tests the SPM implementation based on the SPCI
536and SPRT draft specifications.
537
538It runs in Secure-EL0 and performs the following tasks:
539
540- Test that TF-A has correctly setup the secure partition environment (access
541 to cache maintenance operations, to floating point registers, etc.)
542
543- Test that TF-A accepts to change data access permissions and instruction
544 permissions on behalf of Cactus for memory regions the latter owns.
545
546- Test communication with SPM through SPCI/SPRT interfaces.
547
548Ivy
549'''
550
551This is also a new test secure partition. It is provided in order to test
552multiple partitions support in TF-A. It is derived from Cactus and essentially
553provides the same services but with different identifiers at the moment.
554
555EL3 payload
Paul Beesley5c928952019-10-24 11:57:00 +0000556~~~~~~~~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100557
558- New platform ports:
559
560 - `Arm SGI-575`_ FVP.
561
562 - `Arm Neoverse Reference Design N1 Edge (RD-N1-Edge)`_ FVP (experimental).
563
564Issues resolved since last release
Paul Beesley5c928952019-10-24 11:57:00 +0000565^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100566
567- The GICv2 spurious IRQ test is no longer Juno-specific. It is now only
568 GICv2-specific.
569
570- The manual tests in AArch32 state now work properly. After investigation,
571 we identified that this issue was not AArch32 specific but concerned any
572 test relying on state information persisting across reboots. It was due to
573 an incorrect build configuration.
574
575- Cactus-MM now successfully links with GNU toolchain 7.3.1.
576
577Known issues and limitations
Paul Beesley5c928952019-10-24 11:57:00 +0000578^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100579
580The sections below lists the known issues and limitations of each test image
581provided in this repository.
582
583TFTF
Paul Beesley5c928952019-10-24 11:57:00 +0000584~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100585
586The TFTF test image might be conceptually sub-divided further in 2 parts: the
587tests themselves, and the test framework they are based upon.
588
589Test framework
Paul Beesley5c928952019-10-24 11:57:00 +0000590~~~~~~~~~~~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100591
592- Some stability issues.
593
594- No mechanism to abort tests when they time out (e.g. this could be
595 implemented using a watchdog).
596
597- No convenient way to include or exclude tests on a per-platform basis.
598
599- Power domains and affinity levels are considered equivalent but they may
600 not necessarily be.
601
602- Need to provide better support to alleviate duplication of test code. There
603 are some recurrent test patterns for which helper functions should be
604 provided. For example, bringing up all CPUs on the platform and executing the
605 same function on all of them, or programming an interrupt and waiting for it
606 to trigger.
607
608- Every CPU that participates in a test must return from the test function. If
609 it does not - e.g. because it powered itself off for testing purposes - then
610 the test framework will wait forever for this CPU. This limitation is too
611 restrictive for some tests.
612
613- No protection against interrupted flash operations. If the target is reset
614 while some data is written to flash, the test framework might behave
615 incorrectly on reset.
616
617- When compiling the code, if the generation of the ``tests_list.c`` and/or
618 ``tests_list.h`` files fails, the build process is not aborted immediately
619 and will only fail later on.
620
621- The directory layout requires further improvements. Most of the test
622 framework code has been moved under the ``tftf/`` directory to better isolate
623 it but this effort is not complete. As a result, there are still some TFTF
624 files scattered around.
625
626- Pointer Authentication testing is experimental and incomplete at this stage.
627 It is only enabled on the primary CPU on the cold boot.
628
629Tests
Paul Beesley5c928952019-10-24 11:57:00 +0000630~~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100631
632- Some tests are implemented for AArch64 only and are skipped on AArch32.
633
634- Some tests are not robust enough:
635
636 - Some tests might hang in some circumstances. For example, they might wait
637 forever for a condition to become true.
638
639 - Some tests rely on arbitrary time delays instead of proper synchronization
640 when executing order-sensitive steps.
641
642 - Some tests have been implemented in a practical manner: they seem to work
643 on actual hardware but they make assumptions that are not guaranteed by
644 the Arm architecture. Therefore, they might fail on some other platforms.
645
646- PSCI stress tests are very unreliable and will often hang. The root cause is
647 not known for sure but this might be due to bad synchronization between CPUs.
648
649- The GICv2 spurious IRQ test sometimes fails with the following error message:
650
651 ``SMC @ lead CPU returned 0xFFFFFFFF 0x8 0xC``
652
653 The root cause is unknown.
654
655- The FWU tests take a long time to complete. This is because they wait for the
656 watchdog to reset the system. On FVP, TF-A configures the watchdog period to
657 about 4 min. This limit is excessive for an automated testing context and
658 leaves the user without feedback and unable to determine if the tests are
659 proceeding properly.
660
661- The test "Target timer to a power down cpu" sometimes fails with the
662 following error message:
663
664 ``Expected timer switch: 4 Actual: 3``
665
666 The root cause is unknown.
667
668FWU images
Paul Beesley5c928952019-10-24 11:57:00 +0000669~~~~~~~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100670
671- The FWU tests do not work on the revC of the Base AEM FVP. They only work on
672 the revB.
673
674- NS-BL1U and NS-BL2U images reuse TFTF-specific code for legacy reasons. This
675 is not a clean design and may cause confusion.
676
677Test secure partitions (Cactus, Cactus-MM, Ivy)
Paul Beesley5c928952019-10-24 11:57:00 +0000678~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100679
680- This is experimental code. It's likely to change a lot as the secure
681 partition software architecture evolves.
682
683- Supported on AArch64 FVP platform only.
684
685All test images
Paul Beesley5c928952019-10-24 11:57:00 +0000686~~~~~~~~~~~~~~~
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100687
688- TF-A Tests are derived from a fork of TF-A so:
689
690 - they've got some code in common but lag behind on some features.
691
692 - there might still be some irrelevant references to TF-A.
693
694- Some design issues.
695 E.g. TF-A Tests inherited from the I/O layer of TF-A, which still needs a
696 major rework.
697
698- Cannot build TF-A Tests with Clang. Only GCC is supported.
699
700- The build system does not cope well with parallel building. The user should
701 not attempt to run multiple jobs in parallel with the ``-j`` option of `GNU
702 make`.
703
704- The build system does not properly track build options. A clean build must be
705 performed every time a build option changes.
706
707- UUIDs are not compliant to RFC 4122.
708
709- No floating point support. The code is compiled with GCC flag
710 ``-mgeneral-regs-only``, which prevents the compiler from generating code
711 that accesses floating point registers. This might limit some test scenarios.
712
713- The documentation is too lightweight.
714
715- Missing instruction barriers in some places before reading the system counter
716 value. As a result, the CPU could speculatively read it and any delay loop
717 calculations might be off (because based on stale values). We need to examine
718 all such direct reads of the ``CNTPCT_EL0`` register and replace them with a
719 call to ``syscounter_read()`` where appropriate.
720
Paul Beesley5c928952019-10-24 11:57:00 +0000721Version 2.0
722-----------
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200723
724New features
Paul Beesley5c928952019-10-24 11:57:00 +0000725^^^^^^^^^^^^
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200726
727This is the first public release of the Trusted Firmware-A Tests source code.
728
729TFTF
Paul Beesley5c928952019-10-24 11:57:00 +0000730~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200731
732- Provides a baremetal test framework to exercise TF-A features through its
733 ``SMC`` interface.
734
735- Integrates easily with TF-A: the TFTF binary is packaged in the FIP image
736 as a ``BL33`` component.
737
738- Standalone binary that runs on the target without human intervention (except
739 for some specific tests that require a manual target reset).
740
741- Designed for multi-core testing. The various sub-frameworks allow maximum
742 parallelism in order to stress the firmware.
743
744- Displays test results on the UART output. This may then be parsed by an
745 external tool and integrated in a continuous integration system.
746
747- Supports running in AArch64 (NS-EL2 or NS-EL1) and AArch32 states.
748
749- Supports parsing a tests manifest (XML file) listing the tests to include in
750 the binary.
751
752- Detects most platform features at run time (e.g. topology, GIC version, ...).
753
754- Provides a topology enumeration framework. Allows tests to easily go through
755 affinity levels and power domain nodes.
756
757- Provides an event framework to synchronize CPU operations in a multi-core
758 context.
759
760- Provides a timer framework. Relies on a single global timer to generate
761 interrupts for all CPUs in the system. This allows tests to easily program
762 interrupts on demand to use as a wake-up event source to come out of CPU
763 suspend state for example.
764
765- Provides a power-state enumeration framework. Abstracts the valid power
766 states supported on the platform.
767
768- Provides helper functions for power management operations (CPU hotplug,
769 CPU suspend, system suspend, ...) with proper saving of the hardware state.
770
771- Supports rebooting the platform at the end of each test for greater
772 independence between tests.
773
774- Supports interrupting and resuming a test session. This relies on storing
775 test results in non-volatile memory (e.g. flash).
776
777FWU images
Paul Beesley5c928952019-10-24 11:57:00 +0000778~~~~~~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200779
780- Provides example code to exercise the Firmware Update feature of TF-A.
781
782- Tests the robustness of the FWU state machine implemented in the TF-A by
783 sending valid and invalid authentication, copy and image execution requests
784 to the TF-A BL1 image.
785
786EL3 test payload
Paul Beesley5c928952019-10-24 11:57:00 +0000787~~~~~~~~~~~~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200788
789- Tests the ability of TF-A to load an EL3 payload.
790
791Cactus test secure partition
Paul Beesley5c928952019-10-24 11:57:00 +0000792~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200793
794- Tests that TF-A has correctly setup the secure partition environment: it
795 should be allowed to perform cache maintenance operations, access floating
796 point registers, etc.
797
798- Tests the ability of a secure partition to request changing data access
799 permissions and instruction permissions of memory regions it owns.
800
801- Tests the ability of a secure partition to handle StandaloneMM requests.
802
803Known issues and limitations
Paul Beesley5c928952019-10-24 11:57:00 +0000804^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200805
806The sections below lists the known issues and limitations of each test image
807provided in this repository.
808
809TFTF
Paul Beesley5c928952019-10-24 11:57:00 +0000810~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200811
812The TFTF test image might be conceptually sub-divided further in 2 parts: the
813tests themselves, and the test framework they are based upon.
814
815Test framework
Paul Beesley5c928952019-10-24 11:57:00 +0000816~~~~~~~~~~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200817
818- Some stability issues.
819
820- No mechanism to abort tests when they time out (e.g. this could be
821 implemented using a watchdog).
822
823- No convenient way to include or exclude tests on a per-platform basis.
824
825- Power domains and affinity levels are considered equivalent but they may
826 not necessarily be.
827
828- Need to provide better support to alleviate duplication of test code. There
829 are some recurrent test patterns for which helper functions should be
830 provided. For example, bringing up all CPUs on the platform and executing the
831 same function on all of them, or programming an interrupt and waiting for it
832 to trigger.
833
834- Every CPU that participates in a test must return from the test function. If
835 it does not - e.g. because it powered itself off for testing purposes - then
836 the test framework will wait forever for this CPU. This limitation is too
837 restrictive for some tests.
838
839- No protection against interrupted flash operations. If the target is reset
840 while some data is written to flash, the test framework might behave
841 incorrectly on reset.
842
843- When compiling the code, if the generation of the tests_list.c and/or
844 tests_list.h files fails, the build process is not aborted immediately and
845 will only fail later on.
846
847- The directory layout is confusing. Most of the test framework code has been
848 moved under the ``tftf/`` directory to better isolate it but this effort is
849 not complete. As a result, there are still some TFTF files scattered around.
850
851Tests
Paul Beesley5c928952019-10-24 11:57:00 +0000852~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200853
854- Some tests are implemented for AArch64 only and are skipped on AArch32.
855
856- Some tests are not robust enough:
857
858 - Some tests might hang in some circumstances. For example, they might wait
859 forever for a condition to become true.
860
861 - Some tests rely on arbitrary time delays instead of proper synchronization
862 when executing order-sensitive steps.
863
864 - Some tests have been implemented in a practical manner: they seem to work
865 on actual hardware but they make assumptions that are not guaranteed by
866 the Arm architecture. Therefore, they might fail on some other platforms.
867
868- PSCI stress tests are very unreliable and will often hang. The root cause is
869 not known for sure but this might be due to bad synchronization between CPUs.
870
871- The GICv2 spurious IRQ test is Juno-specific. In reality, it should only be
872 GICv2-specific. It should be reworked to remove any platform-specific
873 assumption.
874
875- The GICv2 spurious IRQ test sometimes fails with the following error message:
876
877 ``SMC @ lead CPU returned 0xFFFFFFFF 0x8 0xC``
878
879 The root cause is unknown.
880
881- The manual tests in AArch32 mode do not work properly. They save some state
882 information into non-volatile memory in order to detect the reset reason but
883 this state does not appear to be retained. As a result, these tests keep
884 resetting infinitely.
885
886- The FWU tests take a long time to complete. This is because they wait for the
887 watchdog to reset the system. On FVP, TF-A configures the watchdog period to
888 about 4 min. This is way too long in an automated testing context. Besides,
889 the user gets not feedback, which may let them think that the tests are not
890 working properly.
891
892- The test "Target timer to a power down cpu" sometimes fails with the
893 following error message:
894
895 ``Expected timer switch: 4 Actual: 3``
896
897 The root cause is unknown.
898
899FWU images
Paul Beesley5c928952019-10-24 11:57:00 +0000900~~~~~~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200901
Sandrine Bailleux7af6c6d2018-10-22 17:09:07 +0200902- The FWU tests do not work on the revC of the Base AEM FVP. They only work on
903 the revB.
904
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200905- NS-BL1U and NS-BL2U images reuse TFTF-specific code for legacy reasons. This
906 is not a clean design and may cause confusion.
907
908Cactus test secure partition
Paul Beesley5c928952019-10-24 11:57:00 +0000909~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200910
911- Cactus is experimental code. It's likely to change a lot as the secure
912 partition software architecture evolves.
913
914- Fails to link with GNU toolchain 7.3.1.
915
916- Cactus is supported on AArch64 FVP platform only.
917
918All test images
Paul Beesley5c928952019-10-24 11:57:00 +0000919~~~~~~~~~~~~~~~
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200920
921- TF-A Tests are derived from a fork of TF-A so:
922
923 - they've got some code in common but lag behind on some features.
924
925 - there might still be some irrelevant references to TF-A.
926
927- Some design issues.
928 E.g. TF-A Tests inherited from the I/O layer of TF-A, which still needs a
929 major rework.
930
931- Cannot build TF-A Tests with Clang. Only GCC is supported.
932
933- The build system does not cope well with parallel building. The user should
934 not attempt to run multiple jobs in parallel with the ``-j`` option of `GNU
935 make`.
936
937- The build system does not properly track build options. A clean build must be
938 performed every time a build option changes.
939
940- SMCCC v2 is not properly supported.
941
942- UUIDs are not compliant to RFC 4122.
943
944- No floating point support. The code is compiled with GCC flag
945 ``-mgeneral-regs-only``, which prevents the compiler from generating code
946 that accesses floating point registers. This might limit some test scenarios.
947
948- The documentation is too lightweight.
949
950--------------
951
Madhukar Pappireddybced2f32020-04-08 15:44:38 -0500952*Copyright (c) 2018-2020, Arm Limited. All rights reserved.*
Sandrine Bailleux88e96a12019-03-28 09:34:55 +0100953
954.. _Arm Neoverse Reference Design N1 Edge (RD-N1-Edge): https://developer.arm.com/products/system-design/reference-design/neoverse-reference-design
955.. _Arm SGI-575: https://developer.arm.com/products/system-design/fixed-virtual-platforms