1Activity Monitors 2================= 3 4FEAT_AMUv1 of the Armv8-A architecture introduces the Activity Monitors 5extension. This extension describes the architecture for the Activity Monitor 6Unit (|AMU|), an optional non-invasive component for monitoring core events 7through a set of 64-bit counters. 8 9When the ``ENABLE_FEAT_AMU`` build option is enabled, Trusted Firmware-A 10sets up the |AMU| prior to its exit from EL3, and will save and restore 11architected |AMU| counters upon suspend and resume. It will also save and 12restore counters 2 and 3 (INST_RETIRED and STALL_BACKEND_MEM) when switching 13worlds to prevent leaking potentially sensitive information. Counters 0 and 1 14(CPU_CYCLES and CNT_CYCLES) always count to enable accurate performance 15modelling of the OS. 16 17.. _Activity Monitor Auxiliary Counters: 18 19Auxiliary counters 20------------------ 21 22FEAT_AMUv1 describes a set of implementation-defined auxiliary counters (also 23known as group 1 counters), controlled by the ``ENABLE_AMU_AUXILIARY_COUNTERS`` 24build option. 25 26As a security precaution, Trusted Firmware-A does not enable these by default. 27Instead, platforms must configure their auxiliary counters through the 28``plat_amu_aux_enables`` platform hook. This is a per-core array indexed with 29``plat_my_core_pos()``. A core's value will be written verbatim into 30``AMCNTENSET1_EL0``. 31 32-------------- 33 34*Copyright (c) 2021-2025, Arm Limited. All rights reserved.* 35