Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 1 | Logging Service |
Gyorgy Szing | 4f992d7 | 2024-04-06 08:44:51 +0200 | [diff] [blame] | 2 | =============== |
Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 3 | |
Gyorgy Szing | 4f992d7 | 2024-04-06 08:44:51 +0200 | [diff] [blame] | 4 | The Logging Service manages a log of events, which can be used to monitor and understand the |
| 5 | operation of the system. The service allows other Secure Partitions to efficiently and securely make |
| 6 | log entries, and it has the potential to implement a logging facility fulfilling the requirements of |
| 7 | in filed deployment. The service can implement complex capabilities like protecting the log from |
| 8 | unauthentic access using cryptography or access control. It has the potential to make SWd logs |
| 9 | accessible to NWd clients in a controlled way. |
| 10 | |
| 11 | The service helps implementing a flexible logging strategy extending the capabilities introduced by |
| 12 | the FFA_CONSOLE_LOG calls in `FF-A v1.2`_. |
| 13 | |
| 14 | The current integration in TS uses FFA_CONSOLE_LOG for critical and boot-time entries, and the |
| 15 | logging service for other purposes. Deploying the logging SP is optional, and clients will fully |
| 16 | revert to using FFA_CONSOLE_LOG if discovering the Logging Service fails during SP initialization. |
| 17 | |
| 18 | The current implementation is a simple pipe sending all messages to an UART assigned to the logging |
| 19 | SP. |
| 20 | |
| 21 | |
| 22 | Supported Logging backends |
| 23 | -------------------------- |
| 24 | |
| 25 | Backends represent "output pipes" log messages can be sent to. The output of the pipe can be |
| 26 | connected e.g. to a realtime stream (e.g. a serial line) or to a buffer to be polled by an NWd client. |
| 27 | |
Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 28 | |
| 29 | UART backend |
Gyorgy Szing | 4f992d7 | 2024-04-06 08:44:51 +0200 | [diff] [blame] | 30 | '''''''''''' |
| 31 | |
| 32 | The UART backend outputs messages to an UART device. It relies on an UART platform adapter that |
| 33 | provides a generic interface to interact with an UART device. The exact driver implementation is to |
| 34 | be provided by the platform. |
Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 35 | |
| 36 | Testing the Logging Service |
Gyorgy Szing | 4f992d7 | 2024-04-06 08:44:51 +0200 | [diff] [blame] | 37 | --------------------------- |
Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 38 | |
Gyorgy Szing | 4f992d7 | 2024-04-06 08:44:51 +0200 | [diff] [blame] | 39 | The service follows the standard TS test strategy: |
| 40 | |
| 41 | - hardware independent parts are covered by unit and component tests |
| 42 | - hardware dependent parts are covered by environment tests |
| 43 | - fitness of end-to-end integration is covered by system tests |
| 44 | |
| 45 | Currently the testing is partial and only Environment Test is implemented. |
Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 46 | |
| 47 | Environment Tests |
| 48 | ''''''''''''''''' |
Gyorgy Szing | 4f992d7 | 2024-04-06 08:44:51 +0200 | [diff] [blame] | 49 | |
Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 50 | The logging SP's UART backend relies on the UART peripheral. Test have been added to the |
| 51 | *env_test* SP deployment to check the basic functionality of the UART device, but the |
| 52 | verification of the results is not possible, as the peripheral does not provide a way |
| 53 | (e.g. error bit) to check whether the printing (*putc*) was successful. |
| 54 | Tests included in the *env_test* SP deployment may be invoked from Linux user-space using the |
| 55 | *ts-remote-test/arm-linux* deployment. |
| 56 | |
Gyorgy Szing | 4f992d7 | 2024-04-06 08:44:51 +0200 | [diff] [blame] | 57 | -------------- |
| 58 | |
| 59 | .. _`FF-A v1.2`: https://developer.arm.com/documentation/den0077/g/?lang=en |
Gabor Ambrus | 867fd33 | 2023-08-15 14:43:53 +0200 | [diff] [blame] | 60 | |
| 61 | *Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.* |
| 62 | |
| 63 | SPDX-License-Identifier: BSD-3-Clause |