blob: 76f7c24e5e661b943037a706a24c7dd25248a3b9 [file] [log] [blame]
developer14f3fe32016-04-28 14:07:42 +08001/*
2 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
developer14f3fe32016-04-28 14:07:42 +08005 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef OEM_SVC_H
8#define OEM_SVC_H
developer14f3fe32016-04-28 14:07:42 +08009
10/*******************************************************************************
11 * Defines for runtime services func ids
12 ******************************************************************************/
13/*
14 * Number of OEM calls (above) implemented.
15 */
16#define OEM_SVC_NUM_CALLS 3
17
18/*******************************************************************************
19 * Defines for OEM Service queries
20 ******************************************************************************/
21/* 0x83000000 - 0x8300FEFF is OEM service calls */
22#define OEM_SVC_CALL_COUNT 0x8300ff00
23#define OEM_SVC_UID 0x8300ff01
24/* 0x8300ff02 is reserved */
25#define OEM_SVC_VERSION 0x8300ff03
26/* 0x8300ff04 - 0x8300FFFF is reserved for future expansion */
27
28/* OEM Service Calls version numbers */
29#define OEM_VERSION_MAJOR 0x0
30#define OEM_VERSION_MINOR 0x1
31
32/* The macros below are used to identify OEM calls from the SMC function ID */
33/* SMC32 ID range from 0x83000000 to 0x83000FFF */
34/* SMC64 ID range from 0xC3000000 to 0xC3000FFF */
35#define OEM_FID_MASK 0xf000u
36#define OEM_FID_VALUE 0u
37#define is_oem_fid(_fid) \
38 (((_fid) & OEM_FID_MASK) == OEM_FID_VALUE)
39
40#define OEM_SVC_E_SUCCESS 0
41#define OEM_SVC_E_NOT_SUPPORTED -1
42#define OEM_SVC_E_INVALID_PARAMS -2
43
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000044#endif /* OEM_SVC_H */