xref: /rk3399_ARM-atf/docs/components/ven-el3-service.rst (revision 63696d003511005569a1a5ea0d0958d638c7a897)
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+-----------------------------------+-----------------------+---------------------------------------------+
35f69f5512SNandan J| 0x87000030 - 0x8700003F (SMC32)   | ACS (Architecture     | | 0 in use.                                 |
36f69f5512SNandan J+-----------------------------------+ Compliance Suite) SMC | | 1 - 15 are reserved for future expansion. |
37f69f5512SNandan J| 0xC7000030 - 0xC700003F (SMC64)   | handler               |                                             |
38f69f5512SNandan J+-----------------------------------+-----------------------+---------------------------------------------+
39*96546b5cSManish Pandey| 0x87000040 - 0x8700004F (SMC32)   | TPM Start method      | | 0 is in use.                              |
40*96546b5cSManish Pandey+-----------------------------------+                       | | 1 - 15 are reserved for future expansion. |
41*96546b5cSManish Pandey| 0xC7000040 - 0xC700004F (SMC64)   |                       |                                             |
42*96546b5cSManish Pandey+-----------------------------------+-----------------------+---------------------------------------------+
43*96546b5cSManish Pandey| 0x87000050 - 0x8700FFFF (SMC32)   | Reserved              | | reserved for future expansion             |
44320fb293SGovindraj Raja+-----------------------------------+                       |                                             |
45*96546b5cSManish Pandey| 0xC7000050 - 0xC700FFFF (SMC64)   |                       |                                             |
46320fb293SGovindraj Raja+-----------------------------------+-----------------------+---------------------------------------------+
47273b8983SGovindraj Raja
48320fb293SGovindraj RajaSource definitions for vendor-specific EL3 Monitor Service Calls used by TF-A are located in
49de6b79d8SGovindraj Rajathe ``ven_el3_svc.h`` header file.
50de6b79d8SGovindraj Raja
51320fb293SGovindraj Raja+----------------------------+----------------------------+--------------------------------+
52320fb293SGovindraj Raja| VEN_EL3_SVC_VERSION_MAJOR  | VEN_EL3_SVC_VERSION_MINOR  | Changes                        |
53320fb293SGovindraj Raja+============================+============================+================================+
54320fb293SGovindraj Raja|                          1 |                          0 | Added Debugfs and PMF services.|
55320fb293SGovindraj Raja+----------------------------+----------------------------+--------------------------------+
56f69f5512SNandan J|                          1 |                          1 | Added ACS SMC handler services.|
57*96546b5cSManish Pandey+------------------------------------------------------------------------------------------+
58*96546b5cSManish Pandey|                          1 |                          2 | Added TPM Start method.        |
59f69f5512SNandan J+----------------------------+----------------------------+--------------------------------+
60320fb293SGovindraj Raja
61320fb293SGovindraj Raja*Table 1: Showing different versions of Vendor-specific service and changes done with each version*
62320fb293SGovindraj Raja
63320fb293SGovindraj RajaEach sub service will have its own version, one FID allocated for sub service version.
64320fb293SGovindraj Raja
65320fb293SGovindraj RajaSome ground rules when one should update top level version.
66320fb293SGovindraj Raja - VEN_EL3_SVC_VERSION_MAJOR is incremented when any of the sub service version discovery
67320fb293SGovindraj Raja   FID changes or the FID that was allocated for discovery changes. So any breaking subfeature
68320fb293SGovindraj Raja   discovery changes will lead to major version update.
69320fb293SGovindraj Raja - VEN_EL3_SVC_VERSION_MINOR is incremented when we add a new FID or a new sub service.
70320fb293SGovindraj Raja   For example adding an new monitor service at 0x30, Debugfs starts at 0x10 and PMF
71320fb293SGovindraj Raja   starts at 0x20 next one will start at 0x30, this will need a update to minor version.
72273b8983SGovindraj Raja
73f7679d43SGovindraj RajaPerformance Measurement Framework (PMF)
74f7679d43SGovindraj Raja---------------------------------------
75f7679d43SGovindraj Raja
76f7679d43SGovindraj RajaThe :ref:`Performance Measurement Framework <firmware_design_pmf>`
77f7679d43SGovindraj Rajaallows callers to retrieve timestamps captured at various paths in TF-A
78f7679d43SGovindraj Rajaexecution.
79f7679d43SGovindraj Raja
80273b8983SGovindraj RajaDebugFS interface
81273b8983SGovindraj Raja-----------------
82273b8983SGovindraj Raja
83273b8983SGovindraj RajaThe optional DebugFS interface is accessed through Vendor specific EL3 service. Refer
84273b8983SGovindraj Rajato :ref:`DebugFS interface` documentation for further details and usage.
85273b8983SGovindraj Raja
86f69f5512SNandan JArchitecture Compliance Suite (ACS) SMC handler
87f69f5512SNandan J-----------------------------------------------
88f69f5512SNandan J
89f69f5512SNandan JThe Architecture Compliance Suite (ACS) SMC handler allows callers to branch
90f69f5512SNandan Jto their ACS EL3 code based on their respective use-cases.
91f69f5512SNandan JFor more details on System ACS, `System ACS`_.
92f69f5512SNandan J
93*96546b5cSManish PandeyTPM Start method
94*96546b5cSManish Pandey----------------
95*96546b5cSManish Pandey
96*96546b5cSManish PandeyTPM start method as mentioned in `TCG ACPI specification`_ section 3.3.1.
97*96546b5cSManish Pandey
98de6b79d8SGovindraj Raja--------------
99de6b79d8SGovindraj Raja
100f69f5512SNandan J*Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved.*
101de6b79d8SGovindraj Raja
102f69f5512SNandan J.. _System ACS: https://developer.arm.com/Architectures/Architectural%20Compliance%20Suite
103de6b79d8SGovindraj Raja.. _SMC Calling Convention: https://developer.arm.com/docs/den0028/latest
104*96546b5cSManish Pandey.. _TCG ACPI specification: https://trustedcomputinggroup.org/wp-content/uploads/TCG-ACPI-Specification-Version-1.4-Revision-15_pub.pdf
105