blob: c899950010bedea8713684890efd6846789e5c6b [file] [log] [blame]
Gabor Ambrus867fd332023-08-15 14:43:53 +02001Logging Service
Gyorgy Szing4f992d72024-04-06 08:44:51 +02002===============
Gabor Ambrus867fd332023-08-15 14:43:53 +02003
Gyorgy Szing4f992d72024-04-06 08:44:51 +02004The Logging Service manages a log of events, which can be used to monitor and understand the
5operation of the system. The service allows other Secure Partitions to efficiently and securely make
6log entries, and it has the potential to implement a logging facility fulfilling the requirements of
7in filed deployment. The service can implement complex capabilities like protecting the log from
8unauthentic access using cryptography or access control. It has the potential to make SWd logs
9accessible to NWd clients in a controlled way.
10
11The service helps implementing a flexible logging strategy extending the capabilities introduced by
12the FFA_CONSOLE_LOG calls in `FF-A v1.2`_.
13
14The current integration in TS uses FFA_CONSOLE_LOG for critical and boot-time entries, and the
15logging service for other purposes. Deploying the logging SP is optional, and clients will fully
16revert to using FFA_CONSOLE_LOG if discovering the Logging Service fails during SP initialization.
17
18The current implementation is a simple pipe sending all messages to an UART assigned to the logging
19SP.
20
21
22Supported Logging backends
23--------------------------
24
25Backends represent "output pipes" log messages can be sent to. The output of the pipe can be
26connected e.g. to a realtime stream (e.g. a serial line) or to a buffer to be polled by an NWd client.
27
Gabor Ambrus867fd332023-08-15 14:43:53 +020028
29UART backend
Gyorgy Szing4f992d72024-04-06 08:44:51 +020030''''''''''''
31
32The UART backend outputs messages to an UART device. It relies on an UART platform adapter that
33provides a generic interface to interact with an UART device. The exact driver implementation is to
34be provided by the platform.
Gabor Ambrus867fd332023-08-15 14:43:53 +020035
36Testing the Logging Service
Gyorgy Szing4f992d72024-04-06 08:44:51 +020037---------------------------
Gabor Ambrus867fd332023-08-15 14:43:53 +020038
Gyorgy Szing4f992d72024-04-06 08:44:51 +020039The 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
45Currently the testing is partial and only Environment Test is implemented.
Gabor Ambrus867fd332023-08-15 14:43:53 +020046
47Environment Tests
48'''''''''''''''''
Gyorgy Szing4f992d72024-04-06 08:44:51 +020049
Gabor Ambrus867fd332023-08-15 14:43:53 +020050The 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
52verification 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.
54Tests 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 Szing4f992d72024-04-06 08:44:51 +020057--------------
58
59.. _`FF-A v1.2`: https://developer.arm.com/documentation/den0077/g/?lang=en
Gabor Ambrus867fd332023-08-15 14:43:53 +020060
61*Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.*
62
63SPDX-License-Identifier: BSD-3-Clause