1de6b79d8SGovindraj RajaVendor Specific EL3 Monitor Service Calls 2de6b79d8SGovindraj Raja========================================= 3de6b79d8SGovindraj Raja 4de6b79d8SGovindraj RajaThis document enumerates and describes the Vendor Specific EL3 Monitor Service 5de6b79d8SGovindraj RajaCalls. 6de6b79d8SGovindraj Raja 7de6b79d8SGovindraj RajaThese are Service Calls defined by the vendor of the EL3 Monitor. 8de6b79d8SGovindraj RajaThey are accessed via ``SMC`` ("SMC calls") instruction executed from Exception 9de6b79d8SGovindraj RajaLevels below EL3. SMC calls for Vendor Specific EL3 Monitor Services: 10de6b79d8SGovindraj Raja 11de6b79d8SGovindraj Raja- Follow `SMC Calling Convention`_; 12de6b79d8SGovindraj Raja- Use SMC function IDs that fall in the vendor-specific EL3 range, which are 13de6b79d8SGovindraj Raja 14de6b79d8SGovindraj Raja+---------------------------+--------------------------------------------------+ 15de6b79d8SGovindraj Raja| SMC Function Identifier | Service Type | 16de6b79d8SGovindraj Raja+===========================+==================================================+ 17de6b79d8SGovindraj Raja| 0x87000000 - 0x8700FFFF | SMC32: Vendor Specific EL3 Monitor Service Calls | 18de6b79d8SGovindraj Raja+---------------------------+--------------------------------------------------+ 19de6b79d8SGovindraj Raja| 0xC7000000 - 0xC700FFFF | SMC64: Vendor Specific EL3 Monitor Service Calls | 20de6b79d8SGovindraj Raja+---------------------------+--------------------------------------------------+ 21de6b79d8SGovindraj Raja 22273b8983SGovindraj RajaVendor-specific EL3 monitor services are as follows: 23273b8983SGovindraj Raja 24273b8983SGovindraj Raja+-----------------------------------+-----------------------+---------------------------------------------+ 25273b8983SGovindraj Raja| SMC Function Identifier | Service Type | FID's Usage | 26273b8983SGovindraj Raja+===================================+=======================+=============================================+ 27f7679d43SGovindraj Raja| 0x87000010 - 0x8700001F (SMC32) | DebugFS Interface | | 0 - 11 are in use. | 28f7679d43SGovindraj Raja+-----------------------------------+ | | 12 - 15 are reserved for future expansion.| 29273b8983SGovindraj Raja| 0xC7000010 - 0xC700001F (SMC64) | | | 30273b8983SGovindraj Raja+-----------------------------------+-----------------------+---------------------------------------------+ 3142cbefc7SGovindraj Raja| 0x87000020 - 0x8700002F (SMC32) | Performance | | 0,1 is in use. | 3242cbefc7SGovindraj Raja+-----------------------------------+ Measurement Framework | | 2 - 15 are reserved for future expansion. | 33f7679d43SGovindraj Raja| 0xC7000020 - 0xC700002F (SMC64) | (PMF) | | 34f7679d43SGovindraj Raja+-----------------------------------+-----------------------+---------------------------------------------+ 35*320fb293SGovindraj Raja| 0x87000030 - 0x8700FFFF (SMC32) | Reserved | | reserved for future expansion | 36*320fb293SGovindraj Raja+-----------------------------------+ | | 37*320fb293SGovindraj Raja| 0xC7000030 - 0xC700FFFF (SMC64) | | | 38*320fb293SGovindraj Raja+-----------------------------------+-----------------------+---------------------------------------------+ 39273b8983SGovindraj Raja 40*320fb293SGovindraj RajaSource definitions for vendor-specific EL3 Monitor Service Calls used by TF-A are located in 41de6b79d8SGovindraj Rajathe ``ven_el3_svc.h`` header file. 42de6b79d8SGovindraj Raja 43*320fb293SGovindraj Raja+----------------------------+----------------------------+--------------------------------+ 44*320fb293SGovindraj Raja| VEN_EL3_SVC_VERSION_MAJOR | VEN_EL3_SVC_VERSION_MINOR | Changes | 45*320fb293SGovindraj Raja+============================+============================+================================+ 46*320fb293SGovindraj Raja| 1 | 0 | Added Debugfs and PMF services.| 47*320fb293SGovindraj Raja+----------------------------+----------------------------+--------------------------------+ 48*320fb293SGovindraj Raja 49*320fb293SGovindraj Raja*Table 1: Showing different versions of Vendor-specific service and changes done with each version* 50*320fb293SGovindraj Raja 51*320fb293SGovindraj RajaEach sub service will have its own version, one FID allocated for sub service version. 52*320fb293SGovindraj Raja 53*320fb293SGovindraj RajaSome ground rules when one should update top level version. 54*320fb293SGovindraj Raja - VEN_EL3_SVC_VERSION_MAJOR is incremented when any of the sub service version discovery 55*320fb293SGovindraj Raja FID changes or the FID that was allocated for discovery changes. So any breaking subfeature 56*320fb293SGovindraj Raja discovery changes will lead to major version update. 57*320fb293SGovindraj Raja - VEN_EL3_SVC_VERSION_MINOR is incremented when we add a new FID or a new sub service. 58*320fb293SGovindraj Raja For example adding an new monitor service at 0x30, Debugfs starts at 0x10 and PMF 59*320fb293SGovindraj Raja starts at 0x20 next one will start at 0x30, this will need a update to minor version. 60273b8983SGovindraj Raja 61f7679d43SGovindraj RajaPerformance Measurement Framework (PMF) 62f7679d43SGovindraj Raja--------------------------------------- 63f7679d43SGovindraj Raja 64f7679d43SGovindraj RajaThe :ref:`Performance Measurement Framework <firmware_design_pmf>` 65f7679d43SGovindraj Rajaallows callers to retrieve timestamps captured at various paths in TF-A 66f7679d43SGovindraj Rajaexecution. 67f7679d43SGovindraj Raja 68273b8983SGovindraj RajaDebugFS interface 69273b8983SGovindraj Raja----------------- 70273b8983SGovindraj Raja 71273b8983SGovindraj RajaThe optional DebugFS interface is accessed through Vendor specific EL3 service. Refer 72273b8983SGovindraj Rajato :ref:`DebugFS interface` documentation for further details and usage. 73273b8983SGovindraj Raja 74de6b79d8SGovindraj Raja-------------- 75de6b79d8SGovindraj Raja 76de6b79d8SGovindraj Raja*Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.* 77de6b79d8SGovindraj Raja 78de6b79d8SGovindraj Raja.. _SMC Calling Convention: https://developer.arm.com/docs/den0028/latest 79