1Logging Service 2=============== 3 4The 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 28 29UART backend 30'''''''''''' 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. 35 36Testing the Logging Service 37--------------------------- 38 39The 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. 46 47Environment Tests 48''''''''''''''''' 49 50The 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 57-------------- 58 59.. _`FF-A v1.2`: https://developer.arm.com/documentation/den0077/g/?lang=en 60 61*Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.* 62 63SPDX-License-Identifier: BSD-3-Clause 64