blob: 519299947da72e9e5f64c36fa52c3a295bea8630 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
Govindraj Rajaf33112d2024-02-26 09:44:36 -06002 * Copyright (c) 2018-2024, Arm Limited. All rights reserved.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __PMF_H__
8#define __PMF_H__
9
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020010/*
11 * Constants used for/by PMF services.
12 */
13#define PMF_ARM_TIF_IMPL_ID 0x41
14#define PMF_TID_SHIFT 0
15#define PMF_TID_MASK (0xFF << PMF_TID_SHIFT)
16#define PMF_SVC_ID_SHIFT 10
17#define PMF_SVC_ID_MASK (0x3F << PMF_SVC_ID_SHIFT)
18#define PMF_IMPL_ID_SHIFT 24
19#define PMF_IMPL_ID_MASK (0xFFU << PMF_IMPL_ID_SHIFT)
20
21/*
22 * Flags passed to PMF_GET_TIMESTAMP_XXX and PMF_CAPTURE_TIMESTAMP
23 */
24#define PMF_CACHE_MAINT (1 << 0)
25#define PMF_NO_CACHE_MAINT 0
26
Govindraj Rajae5334782024-05-08 20:33:20 -050027#define PMF_SMC_VERSION U(0x00000001)
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020028/*
29 * Defines for PMF SMC function ids.
30 */
Deepika Bhavnanic249d5e2020-02-06 16:29:45 -060031#ifndef __aarch64__
Govindraj Rajaf33112d2024-02-26 09:44:36 -060032#define PMF_SMC_GET_TIMESTAMP 0x87000020
Govindraj Rajae5334782024-05-08 20:33:20 -050033#define PMF_SMC_GET_VERSION 0x87000021
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020034#else
Govindraj Rajaf33112d2024-02-26 09:44:36 -060035#define PMF_SMC_GET_TIMESTAMP 0xC7000020
Govindraj Rajae5334782024-05-08 20:33:20 -050036#define PMF_SMC_GET_VERSION 0xC7000021
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020037#endif
38
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020039/* Following are the supported PMF service IDs */
40#define PMF_PSCI_STAT_SVC_ID 0
41#define PMF_RT_INSTR_SVC_ID 1
42
43#endif /* __PMF_H__ */