2 * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
8 #include <hisi_sip_svc.h>
10 #include <runtime_svc.h>
15 /* Hisi SiP Service UUID */
16 DEFINE_SVC_UUID2(hisi_sip_svc_uid
,
17 0x74df99e5, 0x8276, 0xaa40, 0x9f, 0xf8,
18 0xc0, 0x85, 0x52, 0xbc, 0x39, 0x3f);
20 static int hisi_sip_setup(void)
28 * This function handles Hisi defined SiP Calls
30 static uintptr_t hisi_sip_handler(unsigned int smc_fid
,
42 * Dispatch PMF calls to PMF SMC handler and return its return
45 if (is_pmf_fid(smc_fid
)) {
46 return pmf_smc_handler(smc_fid
, x1
, x2
, x3
, x4
, cookie
,
51 case HISI_SIP_SVC_CALL_COUNT
:
53 call_count
+= PMF_NUM_SMC_CALLS
;
55 /* State switch call */
58 SMC_RET1(handle
, call_count
);
60 case HISI_SIP_SVC_UID
:
61 /* Return UID to the caller */
62 SMC_UUID_RET(handle
, hisi_sip_svc_uid
);
64 case HISI_SIP_SVC_VERSION
:
65 /* Return the version of current implementation */
66 SMC_RET2(handle
, HISI_SIP_SVC_VERSION_MAJOR
, HISI_SIP_SVC_VERSION_MINOR
);
69 WARN("Unimplemented HISI SiP Service Call: 0x%x \n", smc_fid
);
70 SMC_RET1(handle
, SMC_UNK
);
76 /* Define a runtime service descriptor for fast SMC calls */