xref: /rk3399_ARM-atf/docs/components/ven-el3-service.rst (revision f69f551269f1d126877889a1cab27cc1692316ea)
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*f69f5512SNandan J| 0x87000030 - 0x8700003F (SMC32)   | ACS (Architecture     | | 0 in use.                                 |
36*f69f5512SNandan J+-----------------------------------+ Compliance Suite) SMC | | 1 - 15 are reserved for future expansion. |
37*f69f5512SNandan J| 0xC7000030 - 0xC700003F (SMC64)   | handler               |                                             |
38*f69f5512SNandan J+-----------------------------------+-----------------------+---------------------------------------------+
39*f69f5512SNandan J| 0x87000040 - 0x8700FFFF (SMC32)   | Reserved              | | reserved for future expansion             |
40320fb293SGovindraj Raja+-----------------------------------+                       |                                             |
41*f69f5512SNandan J| 0xC7000040 - 0xC700FFFF (SMC64)   |                       |                                             |
42320fb293SGovindraj Raja+-----------------------------------+-----------------------+---------------------------------------------+
43273b8983SGovindraj Raja
44320fb293SGovindraj RajaSource definitions for vendor-specific EL3 Monitor Service Calls used by TF-A are located in
45de6b79d8SGovindraj Rajathe ``ven_el3_svc.h`` header file.
46de6b79d8SGovindraj Raja
47320fb293SGovindraj Raja+----------------------------+----------------------------+--------------------------------+
48320fb293SGovindraj Raja| VEN_EL3_SVC_VERSION_MAJOR  | VEN_EL3_SVC_VERSION_MINOR  | Changes                        |
49320fb293SGovindraj Raja+============================+============================+================================+
50320fb293SGovindraj Raja|                          1 |                          0 | Added Debugfs and PMF services.|
51320fb293SGovindraj Raja+----------------------------+----------------------------+--------------------------------+
52*f69f5512SNandan J|                          1 |                          1 | Added ACS SMC handler services.|
53*f69f5512SNandan J+----------------------------+----------------------------+--------------------------------+
54320fb293SGovindraj Raja
55320fb293SGovindraj Raja*Table 1: Showing different versions of Vendor-specific service and changes done with each version*
56320fb293SGovindraj Raja
57320fb293SGovindraj RajaEach sub service will have its own version, one FID allocated for sub service version.
58320fb293SGovindraj Raja
59320fb293SGovindraj RajaSome ground rules when one should update top level version.
60320fb293SGovindraj Raja - VEN_EL3_SVC_VERSION_MAJOR is incremented when any of the sub service version discovery
61320fb293SGovindraj Raja   FID changes or the FID that was allocated for discovery changes. So any breaking subfeature
62320fb293SGovindraj Raja   discovery changes will lead to major version update.
63320fb293SGovindraj Raja - VEN_EL3_SVC_VERSION_MINOR is incremented when we add a new FID or a new sub service.
64320fb293SGovindraj Raja   For example adding an new monitor service at 0x30, Debugfs starts at 0x10 and PMF
65320fb293SGovindraj Raja   starts at 0x20 next one will start at 0x30, this will need a update to minor version.
66273b8983SGovindraj Raja
67f7679d43SGovindraj RajaPerformance Measurement Framework (PMF)
68f7679d43SGovindraj Raja---------------------------------------
69f7679d43SGovindraj Raja
70f7679d43SGovindraj RajaThe :ref:`Performance Measurement Framework <firmware_design_pmf>`
71f7679d43SGovindraj Rajaallows callers to retrieve timestamps captured at various paths in TF-A
72f7679d43SGovindraj Rajaexecution.
73f7679d43SGovindraj Raja
74273b8983SGovindraj RajaDebugFS interface
75273b8983SGovindraj Raja-----------------
76273b8983SGovindraj Raja
77273b8983SGovindraj RajaThe optional DebugFS interface is accessed through Vendor specific EL3 service. Refer
78273b8983SGovindraj Rajato :ref:`DebugFS interface` documentation for further details and usage.
79273b8983SGovindraj Raja
80*f69f5512SNandan JArchitecture Compliance Suite (ACS) SMC handler
81*f69f5512SNandan J-----------------------------------------------
82*f69f5512SNandan J
83*f69f5512SNandan JThe Architecture Compliance Suite (ACS) SMC handler allows callers to branch
84*f69f5512SNandan Jto their ACS EL3 code based on their respective use-cases.
85*f69f5512SNandan JFor more details on System ACS, `System ACS`_.
86*f69f5512SNandan J
87de6b79d8SGovindraj Raja--------------
88de6b79d8SGovindraj Raja
89*f69f5512SNandan J*Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved.*
90de6b79d8SGovindraj Raja
91*f69f5512SNandan J.. _System ACS: https://developer.arm.com/Architectures/Architectural%20Compliance%20Suite
92de6b79d8SGovindraj Raja.. _SMC Calling Convention: https://developer.arm.com/docs/den0028/latest
93