blob: e2d6ee45f60bb557672a1eca19df7996621075cf [file] [log] [blame]
dp-arm1cebefd2016-09-19 11:21:03 +01001/*
Madhukar Pappireddycc307102023-09-09 23:02:34 -05002 * Copyright (c) 2016-2019,2021-2023, Arm Limited and Contributors. All rights reserved.
dp-arm1cebefd2016-09-19 11:21:03 +01003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
dp-arm1cebefd2016-09-19 11:21:03 +01005 */
6
Antonio Nino Diaz05fdb832018-10-25 16:53:04 +01007#ifndef ARM_SIP_SVC_H
8#define ARM_SIP_SVC_H
9
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000010#include <lib/utils_def.h>
dp-arm1cebefd2016-09-19 11:21:03 +010011
12/* SMC function IDs for SiP Service queries */
13
Antonio Nino Diaz05fdb832018-10-25 16:53:04 +010014#define ARM_SIP_SVC_CALL_COUNT U(0x8200ff00)
15#define ARM_SIP_SVC_UID U(0x8200ff01)
16/* U(0x8200ff02) is reserved */
17#define ARM_SIP_SVC_VERSION U(0x8200ff03)
dp-arm1cebefd2016-09-19 11:21:03 +010018
Ambroise Vincent9660dc12019-07-12 13:47:03 +010019/* PMF_SMC_GET_TIMESTAMP_32 0x82000010 */
20/* PMF_SMC_GET_TIMESTAMP_64 0xC2000010 */
21
Jeenu Viswambharanbc1a9292017-02-16 14:55:15 +000022/* Function ID for requesting state switch of lower EL */
Antonio Nino Diaz05fdb832018-10-25 16:53:04 +010023#define ARM_SIP_SVC_EXE_STATE_SWITCH U(0x82000020)
Jeenu Viswambharanbc1a9292017-02-16 14:55:15 +000024
Ambroise Vincent9660dc12019-07-12 13:47:03 +010025/* DEBUGFS_SMC_32 0x82000030U */
26/* DEBUGFS_SMC_64 0xC2000030U */
27
Mikael Olsson7da66192021-02-12 17:30:22 +010028/*
Mikael Olsson3288b462022-08-15 17:12:58 +020029 * Arm(R) Ethos(TM)-N NPU SiP SMC function IDs
Mikael Olsson7da66192021-02-12 17:30:22 +010030 * 0xC2000050-0xC200005F
31 * 0x82000050-0x8200005F
32 */
33
dp-arm1cebefd2016-09-19 11:21:03 +010034/* ARM SiP Service Calls version numbers */
Antonio Nino Diaz05fdb832018-10-25 16:53:04 +010035#define ARM_SIP_SVC_VERSION_MAJOR U(0x0)
36#define ARM_SIP_SVC_VERSION_MINOR U(0x2)
dp-arm1cebefd2016-09-19 11:21:03 +010037
Madhukar Pappireddycc307102023-09-09 23:02:34 -050038/* SiP handler specific to each Arm platform. */
39uintptr_t plat_arm_sip_handler(uint32_t smc_fid,
40 u_register_t x1,
41 u_register_t x2,
42 u_register_t x3,
43 u_register_t x4,
44 void *cookie,
45 void *handle,
46 u_register_t flags);
47
Antonio Nino Diaz05fdb832018-10-25 16:53:04 +010048#endif /* ARM_SIP_SVC_H */