blob: 2079efadb4dd3d8163dae1cf393e6b9524bee4da [file] [log] [blame]
Soby Mathewb4c6df42022-11-09 11:13:29 +00001.. SPDX-License-Identifier: BSD-3-Clause
2.. SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
3
4############################
5Change-log and Release notes
6############################
7
8******
Soby Mathew14c66842024-05-15 14:18:25 +01009v0.5.0
10******
11
12The following sections have the details on the release. This release has been
13verified with `TF-A v2.11`_ release.
14
15============================
16New features in this release
17============================
18
19- Enabled FEAT_DIT for RMM execution.
20
21- Added support for FEAT_LPA2 to S2TT component.
22
23 * This enables creating Realms with LPA2 support.
24
25- Introduced the dynamic console framework for RMM.
26
27 * This framework allows EL3 to dynamically describe the console for use by
28 RMM and configure the console during boot.
29
30- Introduced the ``arm`` platform layer.
31
32 * The common ``arm`` platform is added which can be used
33 by any compatible SoC. This allows reuse of code across multiple
34 SoCs and possibly a single binary across them.
35 * Both FVP and QEMU are migrated to this common ``arm`` platform layer and
36 only requires platform specific defconfig file to configure RMM.
37
38======================================
39Bug fixes/improvements in this release
40======================================
41
42- Improvements to Exception handling in RMM.
43
44 * Separated Exception Stack for RMM exceptions.
45 * Added crashlog of register values for R-EL2 exceptions.
46 * Added backtrace to exception handler.
47
48- Improvements to S2TT component in RMM.
49
50 * Several optimizations to S2TT component are done.
51 * MISRA errors are fixed.
52 * The component is moved to its own folder in `lib`.
53 * All S2TT APIs now accept `realm_s2_context` as an argument.
54 * Issue related to the NS attributes not being checked during FOLD is fixed.
55
56- Reduced the memory required for `struct granule`.
57
58 * The data structure is optimized such that it is 4 bytes in size
59 compared to the previous 16 bytes.
60
61- Use DC ZVA for granule zeroing instead of memset().
62
63- Allow RTT FOLD to level 1 as mandated by RMM specification.
64
65- Additional clang-tidy checks are enabled for the project.
66
67 * The clang-tidy configuration can be found in ``.clang-tidy`` file at the
68 the root of the source tree.
69 * The errors flagged by the static analysis are corrected and the project
70 expects 0 errors for clang-tidy checks.
71
72- Enabled alignment fault check in RMM.
73
74 * Enabled Alignment fault check in SCTLR_EL2 register when
75 RMM_FPU_USE_AT_REL2=OFF. Associated fixes for some data structures
76 are also done as part of this work.
77
78- Fixed MISRA C 2012 violations detected by Coverity scan.
79
80- Fix to report accurate breakpoint and watchpoint numbers via RMI_FEATURES.
81
82- Fix to properly initialize MDCR_EL2.HPMN for each REC.
83
84- Fix to inject SEA for Realm access outside IPA space.
85
86- Allocate parameters for RIM extension on stack rather than global data.
87
88- Fixed spinlock_acquire() implementation on the fake_host architecture.
89
90- Fix to add +nosve compiler option to prevent compiler from generating SVE
91 instructions.
92
93- Fix to use -march=armv9.2 option to build RMM depending on compiler support.
94
95- Fixed build issue for Yocto by adding system includes to the CMAKE search
96 path.
97
98- Fix to retry RDNR instruction if it fails during attestation initialization.
99
100- Refactored lib/realm component. This component is split now into 2 new
101 libraries: `lib/granule` and `lib/slot_buf`.
102
103- Fix to make RMI_INJECT_SEA flag mutually exclusive to RMI EMUL_MMIO flag
104 during RMI_REC_ENTER.
105
106==================================
107Build/Testing/Tooling improvements
108==================================
109
110- Extended CBMC analysis to more RMI commands:
111
112 * Added CBMC testbench and analysis for the following RMI APIs:
113 RMI_VERSION, RMI_FEATURES, RMI_REALM_ACTIVATE, RMI_REALM_DESTROY,
114 RMI_REC_AUX_COUNT, RMI_REC_DESTROY.
115 * Increased CBMC coverage for RMI_DELEGATE and RMI_UNDELEGATE APIs.
116 * Integrated cbmc-viewer tool to CBMC analysis.
117 * Added option to build with GCC.
118 * Added tooling to detect CBMC result differences. Added a script that
119 compares the CBMC results to the baseline summary and this helps to
120 detect additional CBMC failures from baseline results.
121 * An application note is added to the documentation to describe
122 the CBMC integration with the project.
123
124- Improvements to unit-tests in RMM.
125
126 * Added unit testing framework and unit tests to SIMD layer in RMM.
127
128- Improvements to Cppcheck static analysis.
129
130 * The Cppcheck was already integrated into the build system and more work
131 was done to bring it inline with other static checks in the project.
132 * Fixed violations detected by Cppcheck MISRA addon.
133 * An application note is added to describe the Cppcheck integration.
134
135- Changes to logging for Release build.
136
137 * The default Release build LOG_LEVEL is reduced to 20 (LOG_LEVEL_NOTICE).
138
139- Fixed the broken CMAKE Ninja Generator Multi-config build.
140
141=========
142Platforms
143=========
144
145- Added base support for RD-Fremont platform.
146
147 * RD-Fremont also use the ``arm`` platform layer and only needs a
148 defconfig file to configure RMM appropriately.
149
150============================
151Known issues and limitations
152============================
153
154- Some capabilities as mentioned in `RMM v1.0 EAC5 specification`_ are
155 restricted or absent in TF-RMM as listed below:
156
157 * The support for Self-hosted debug in Realms is not implemented (`issue#23`_).
158 * Although the RMM allows CCA attestation token sizes of larger than 4KB,
159 there is a limitation on the size of the Platform attestation token part.
160 On the RMM-EL3 interface, there is only a shared buffer of 4KB that is
161 currently shared on the FVP. This needs to be enhanced so that larger
162 platform token sizes can be tested (`issue#24`_).
163
164- The attest_init_realm_attestation_key() does not always reset the RMM to the correct
165 state on encountering an error (`issue#25`_).
166
167=================
168Upcoming features
169=================
170
171- Prototype new features as described in `RMM v1.1 Alpha specification`_.
172
173 * Realm Device Assignment - A feature which allows devices to be assigned to Realms,
174 attested and granted permission to access Realm owned memory.
175 * Planes - A feature which allows a Realm to be divided into multiple
176 mutually isolated execution environments, called Planes.
177
178- Add unit-tests for Stage 2 MMU code (s2tt).
179
180- Continue to Enhance CBMC analysis to more RMI commands.
181
182- Fuzz testing for RMM utilizing the `fake_host` architecture.
183
184- Integrate more static analyzers into RMM build system.
185
186- Implement support for Self-hosted debug in realms.
187
188- Support FEAT_MEC in RMM.
189
190.. _TF-A v2.11: https://git.trustedfirmware.org/TF-A/trusted-firmware-a/+/refs/tags/v2.11.0
191.. _RMM v1.1 Alpha specification: https://developer.arm.com/-/cdn-downloads/PDF/Architectures/DEN0137_1.1-alp5_rmm-arch_external.pdf?__token__=st=1714479850~exp=2029839850~hmac=cca7b8c22f7b94e6c929d53176ac57c51487558b73fb27e5c181f4cc7231a83b
192.. _issue#23: https://github.com/TF-RMM/tf-rmm/issues/23
193.. _issue#24: https://github.com/TF-RMM/tf-rmm/issues/24
194.. _issue#25: https://github.com/TF-RMM/tf-rmm/issues/25
195
196******
Soby Mathew273ecb72023-11-20 12:28:33 +0000197v0.4.0
198******
199
200The following sections have the details on the release. This release has been
201verified with `TF-A v2.10`_ release.
202
203============================
204New features in this release
205============================
206
207- Added initial partial support for analysing RMM source code with
208 CBMC (https://www.cprover.org/cbmc/).
209
210 * A new HOST_VARIANT, `host_cbmc`, has been introduced for this purpose.
211 * The CBMC testbench files and autogenerated files from RMM machine
212 readable specification are imported into the source tree.
213 * An application note for the same is added to the documentation.
214
215- Aligned the implementation to `RMM v1.0 EAC5 specification`_.
216
217 * The relevant tag for the alignment is `rmm-spec-v1.0-eac5`_.
218 * There is also an intermediate RMM v1.0 EAC2 alignment which
219 is tagged `rmm-spec-v1.0-eac2`_.
220
221- Supported save and restore of Non Secure SME context when Realms are
222 scheduled.
223
224 * The SIMD abstraction in RMM was reworked to cater for this requirement.
225 * Added support to emulate SME specific feature ID registers.
226 * Support injecting UNDEF exception into realm when SME is accessed
227 within it.
228 * Also RMM now can handle SVE hint bit as specified by SMCCC v1.3
229 specification.
230
231- Added `TF-RMM Threat Model`_ to the documentation.
232
233- Added capability to privately map the per-CPU stack.
234
235 * This contains any stack overflows to the particular CPU and prevents
236 a CPU from corrupting another CPU stack.
237
238- Added FEAT_PAUTH and FEAT_BTI support to RMM and also capability to
239 use FEAT_PAUTH within realms.
240
241- Migrate to PSA Crypto API for attestation and measurement functionality
242 in RMM.
243
244- Added FEAT_LPA2 support to Stage 1 MMU code (lib/xlat) in RMM.
245
246- Added Stage 1 MMU setup design document.
247
248==================================
249Build/Testing/Tooling improvements
250==================================
251
252- Added static commit message checker which enforces the commit message
253 guidelines mandated for the project.
254
255- Added clang-tidy checker as one of the static analyzers.
256
257 * Several fixes to errors flagged by the static checker have been fixed.
258
259- Fixed issues found in xlat lib unittests.
260
261- Added github workflow for git submodules so that the TF-RMM dependencies
262 display correctly in github.
263
264- Added github workflow to configure an automatic message for PRs on GitHub
265 and also build and run RMM unittests for every update of the `main` branch.
266
267- Added FEAT_LPA2 unit tests for lib/xlat module.
268
269- Added RSI logger unit tests.
270
271=========
272Platforms
273=========
274
275- The support for QEMU virt platform was merged.
276
277======================================
278Bug fixes/improvements in this release
279======================================
280
281- Fixed issue with TLB invalidations for unprotected mappings during
282 RMI_RTT_DESTROY command.
283
284- Fixed an issue wherein attest token write may return without releasing
285 lock on the last level RTT of the mapped buffer.
286
287- Enable TSW bit in hcr_el2 when executing in Realm world so as to trap
288 any data cache maintenance instructions that operate by Set/Way.
289
290- Fixed issues flagged by coverity online scan. The defects detected
291 can be found in the `TF-RMM coverity scan online`_ homepage.
292
293- Fixed issues in s2tt management related to NS memory assignment/unassignment.
294
295- Added missing check to gicv3_hcr field.
296
297- Cache line align xlat lib data structures accessed by secondary CPUs to avoid
298 data corruption due to mismatched memory attribute accesses by RMM during
299 warm boot.
300
301- Corrected linker options when building qcbor library.
302
303- Fixes to comply with MISRA coding guidelines.
304
305- Adjusted mbedTLS heap size depending on MAX_CPUS in RMM.
306
307- Fixed issue with RMI_DATA_CREATE_UNKNOWN setting RIPAS to RAM.
308
309- Added 'ipa_bound' failure condition in RMI_DATA_DESTROY handler. Also added
310 'level_bound' failure condition for RMI_RTT_MAP_UNPROTECTED and
311 RMI_RTT_UNMAP_UNPROTECTED command handlers.
312
313- Fixed issue with rsi_log_on_exit() and modified the logging format.
314
315- Fixed issue with change `ipa_align` failure condition.
316
317- Unified design of RSI/PSCI handlers.
318
319- The issue with RMM config ``RMM_FPU_USE_AT_REL2`` is fixed and the SIMD
320 registers are saved and restored depending on the live register context in
321 use which be one of FPU, SVE or SME.
322
323- The compatibility check for RMM-EL3 interface version is hardened.
324
325- Issue related to attestation token interruption flow is fixed.
326
327- Enhanced the `fake_host` sample application to do Realm token creation.
328
329- Fixed D-cache maintenance in fvp_set_dram_layout().
330
331- Updated t_cose submodule to use upstream version rather than a forked
332 version.
333
334============================
335Known issues and limitations
336============================
337
338- Some capabilities as mentioned in `RMM v1.0 EAC5 specification`_ are
339 restricted or absent in TF-RMM as listed below:
340
341 * The RMI_RTT_FOLD command only allows folding upto Level 2 even though
342 the specification allows upto Level 1.
343 * The support for Self-hosted debug in Realms is not implemented.
344 * Although the RMM allows CCA attestation token sizes of larger than 4KB,
345 there is a limitation on the size of the Platform attestation token part.
346 On the RMM-EL3 interface, there is only a shared buffer of 4KB that is
347 currently shared on the FVP. This needs to be enhanced so that larger
348 platform token sizes can be tested.
349
350- The `rmm-el3-ifc` component does not always reset the RMM to the correct
351 state on encountering an error. This needs to be corrected.
352
353- The invocation of mmio_emulation() and sea_inj() functions need to be
354 mutually exclusive during schedule of a REC. Currently both the cases
355 are allowed to be satisfied at the same time which is incorrect.
356
357=================
358Upcoming features
359=================
360
361- FEAT_LPA2 support for Stage 2 MMU code (s2tt) in RMM.
362
363- Add unit-tests for Stage 2 MMU code (s2tt) and also any associated rework
364 for the s2tt component.
365
366- Enhance CBMC analysis to more RMI commands.
367
368- Fuzz testing for RMM utilizing the `fake_host` architecture.
369
370- Support for new capabilities like Device assignment as mandated by future
371 versions of RMM specification.
372
373- Integrate more static analyzers into RMM build system.
374
375- Implement support for Self-hosted debug in realms.
376
377
378.. _TF-A v2.10: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tag/?h=v2.10.0
379.. _RMM v1.0 EAC5 specification: https://developer.arm.com/documentation/den0137/1-0eac5/?lang=en
380.. _rmm-spec-v1.0-eac5: https://git.trustedfirmware.org/TF-RMM/tf-rmm.git/tag/?h=rmm-spec-v1.0-eac5
381.. _rmm-spec-v1.0-eac2: https://git.trustedfirmware.org/TF-RMM/tf-rmm.git/tag/?h=rmm-spec-v1.0-eac2
382.. _TF-RMM coverity scan online: https://scan.coverity.com/projects/tf-rmm-tf-rmm
383.. _TF-RMM Threat Model: https://tf-rmm.readthedocs.io/en/latest/security/threat_model/index.html
384
385******
Soby Mathewa7e3caf2023-05-09 13:37:44 +0100386v0.3.0
387******
388
389The following sections have the details on the release. This release has been
390verified with `TF-A v2.9`_ release.
391
392============================
393New features in this release
394============================
395
396- Add support to create Realms which can make use of SVE, if present in
397 hardware.
398
399- Refactor the Stage 1 translation table library `lib/xlat` API to better
400 fit RMM usage. Also harden dynamic mapping via slot buffer mechanism by
401 use of ``TRANSIENT`` software defined attribute.
402
403- Add PMU support for Realms as described by RMM v1.0 Beta0 specification.
404
405- Support getting DRAM info from the Boot manifest dynamically at runtime.
406
407 * RMM can now support the 2nd DDR bank on FVP.
408
409==========================
410Build/Testing improvements
411==========================
412
413- Define a unit test framework using CppUTest for RMM.
414
415- Add unittests for `granule`, `slot-buffer` and Stage 1 translation table lib
416 `xlat`.
417
418- Improve the ``fake-host`` mock capability by adding support for per PE sysreg
419 emulation.
420
421- Improve the VA to PA mock layer for ``fake-host``.
422
423- Enable generation of gprof profiling data as part of ``fake-host`` runs.
424
425- Improve the sample application on ``host-build`` platform by adding the cold
426 attestation initialization flow. Also a sample minimal Realm create, run and
427 destroy sequence is added to showcase the RMI calls involved.
428
AlexeiFedorov47165422023-09-13 11:47:57 +0100429- Further improvements to the unit test framework :
Soby Mathewa7e3caf2023-05-09 13:37:44 +0100430
431 * Restore the sysreg state between test runs so each test gets a known
432 sysreg state.
433 * Add capability to test assertions.
434 * Support dynamic behaviour for test harness depending on requirement.
435 * Add support for coverage report generation as part of unit test run.
436
437- Build improvements in RMM:
438
439 * Move mbedTLS build from configure stage to build stage.
440 * Simplify QCBOR build.
441 * Fix build artefact directory path to better cater to multi-config builds.
442
443=========================
444Bug fixes in this release
445=========================
446
447- Remove HVC exit handling from RMI_REC_ENTER handler.
448
449- Fix parameter in measurement_extend_sha512().
450
451- Fix issues in `lib/xlat` for some corner cases.
452
453- Mask MTE capability from `id_aa64pfr1_el1` so that Realms
454 can see that MTE is not supported.
455
456- Add isb() after writes to `cptr_el2` system register.
457
458- Fix the granule alignment check on granule_addr.
459
460- Fix some cppcheck warnings.
461
462- Properly handle errors for granule (un)delegate calls.
463
464- Fix the incorrect bit map manipulation for tracking VMID for realms.
465
466- Fix some incorrect Block mapping cases in Stage 2 translation.
467
468=================
469Upcoming features
470=================
471
472- RMM EAC Specification alignment.
473
474- Support Self-Hosted Debug Realms.
475
476- Support FEAT_PAuth for Realms and utilize the same for RMM.
477
478- Support LPA2 for Stage 2 Realm translation tables.
479
480- Threat model covering RMM data flows.
481
482- Enable Bounded Model Checker (CBMC) for source analysis.
483
484- Save and restore SME/SME2 context belonging to NS Host. This allows NS Host
485 to make use of SME/SME2 when Realms are scheduled.
486
487============================
488Known issues and limitations
489============================
490
491- The size of ``RsiHostCall`` structure is 256 bytes in the implementation
492 and aligns to `RMM Beta1 specification`_ rather than the 4 KB size
493 specified in `RMM Beta0 specification`_.
494
495- The `RMM Beta0 specification`_ does not require to have a CBOR bytestream
496 wrapper around the cca-platform-token and cca-realm-delegated-token, but
497 the RMM implementation does so and this is aligned with later versions
498 of the RMM specification (Beta2 onwards).
499
500- The RMM config ``RMM_FPU_USE_AT_REL2`` does not work as intended and
501 this config is disabled by default. This will be fixed in a future release.
502
Soby Mathewedf5f802023-05-23 09:45:10 +0100503- When the ``RSI_ATTEST_TOKEN_CONTINUE`` call is interrupted and then resumed
504 later by Host via ``RMI_REC_ENTER``, the original SMC is replayed again
505 with the original arguments rather than returning ``RSI_INCOMPLETE`` error
506 code to Realm. The result is that the interrupted RSI call is continued
507 again till completion and then returns back to Realm with the appropriate
508 error code.
509
Soby Mathewa7e3caf2023-05-09 13:37:44 +0100510.. _TF-A v2.9: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tag/?h=v2.9.0
511
512
513******
Soby Mathew8fc82c52022-11-21 12:35:41 +0000514v0.2.0
515******
516
517- This release has been verified with `TF-A v2.8`_ release.
518
519- The release has the following fixes and enhancements:
520
521 * Add support to render documentation on read-the-docs.
522 * Fix the known issue with RSI_IPA_STATE_GET returning
523 ``RSI_ERROR_INPUT`` for a `destroyed` IPA instead of
524 emulating data abort to NS Host.
525 * Fix an issue with RSI_HOST_CALL not returning back to Host
526 to emulate a stage2 data abort.
527 * Harden an assertion check for ``do_host_call()``.
528
529- The other known issues and limitations remain the same as
530 listed for v0.1.0_.
531
532.. _TF-A v2.8: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tag/?h=v2.8.0
533
534******
Soby Mathewb4c6df42022-11-09 11:13:29 +0000535v0.1.0
536******
537
538- First TF-RMM source release aligned to `RMM Beta0 specification`_.
539 The specified interfaces : Realm Management Interface (RMI) and
540 Realm Service Interface (RSI) are implemented which can attest
541 and run Realm VMs as described by the `Arm CCA`_ Architecture.
542
543=================
544Upcoming features
545=================
546
547- Support SVE, Self-Hosted Debug and PMU in Realms
548- Support LPA2 for Stage 2 Realm translation tables.
549- Threat model covering RMM data flows.
550- Enable Bounded Model Checker (CBMC) for source analysis.
551- Unit test framework based on :ref:`RMM Fake host architecture`.
552
553============================
554Known issues and limitations
555============================
556
557The following is a list of issues which are expected to be fixed in the future
558releases of TF-RMM :
559
560- The size of ``RsiHostCall`` structure is 256 bytes in the implementation
561 and aligns to `RMM Beta1 specification`_ rather than the 4 KB size
562 specified in `RMM Beta0 specification`_.
563
564- The RSI_IPA_STATE_GET command returns error ``RSI_ERROR_INPUT`` for a
565 `destroyed` IPA instead of emulating data abort to Host.
566
567- The `RMM Beta0 specification`_ does not require to have a CBOR bytestream
568 wrapper around the cca-platform-token and cca-realm-delegated-token, but
569 the RMM implementation does so.
570
571---------------------------
572
573.. _RMM Beta0 specification: https://developer.arm.com/documentation/den0137/1-0bet0/?lang=en
574.. _RMM Beta1 specification: https://developer.arm.com/documentation/den0137/1-0bet1/?lang=en
575.. _Arm CCA: https://www.arm.com/architecture/security-features/arm-confidential-compute-architecture