blob: e3de4505e743de4867f0e44d219cee695ebe3122 [file] [log] [blame]
Anson Huangb6294132018-06-05 16:05:59 +08001/*
2 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/*!
8 * Header file for the RM RPC implementation.
9 *
10 * @addtogroup RM_SVC
11 * @{
12 */
13
14#ifndef SC_RM_RPC_H
15#define SC_RM_RPC_H
16
17/* Includes */
18
19/* Defines */
20
21/*!
22 * @name Defines for RPC RM function calls
23 */
24/*@{*/
25#define RM_FUNC_UNKNOWN 0 /* Unknown function */
26#define RM_FUNC_PARTITION_ALLOC 1U /* Index for rm_partition_alloc() RPC call */
27#define RM_FUNC_SET_CONFIDENTIAL 31U /* Index for rm_set_confidential() RPC call */
28#define RM_FUNC_PARTITION_FREE 2U /* Index for rm_partition_free() RPC call */
29#define RM_FUNC_GET_DID 26U /* Index for rm_get_did() RPC call */
30#define RM_FUNC_PARTITION_STATIC 3U /* Index for rm_partition_static() RPC call */
31#define RM_FUNC_PARTITION_LOCK 4U /* Index for rm_partition_lock() RPC call */
32#define RM_FUNC_GET_PARTITION 5U /* Index for rm_get_partition() RPC call */
33#define RM_FUNC_SET_PARENT 6U /* Index for rm_set_parent() RPC call */
34#define RM_FUNC_MOVE_ALL 7U /* Index for rm_move_all() RPC call */
35#define RM_FUNC_ASSIGN_RESOURCE 8U /* Index for rm_assign_resource() RPC call */
36#define RM_FUNC_SET_RESOURCE_MOVABLE 9U /* Index for rm_set_resource_movable() RPC call */
37#define RM_FUNC_SET_SUBSYS_RSRC_MOVABLE 28U /* Index for rm_set_subsys_rsrc_movable() RPC call */
38#define RM_FUNC_SET_MASTER_ATTRIBUTES 10U /* Index for rm_set_master_attributes() RPC call */
39#define RM_FUNC_SET_MASTER_SID 11U /* Index for rm_set_master_sid() RPC call */
40#define RM_FUNC_SET_PERIPHERAL_PERMISSIONS 12U /* Index for rm_set_peripheral_permissions() RPC call */
41#define RM_FUNC_IS_RESOURCE_OWNED 13U /* Index for rm_is_resource_owned() RPC call */
42#define RM_FUNC_IS_RESOURCE_MASTER 14U /* Index for rm_is_resource_master() RPC call */
43#define RM_FUNC_IS_RESOURCE_PERIPHERAL 15U /* Index for rm_is_resource_peripheral() RPC call */
44#define RM_FUNC_GET_RESOURCE_INFO 16U /* Index for rm_get_resource_info() RPC call */
45#define RM_FUNC_MEMREG_ALLOC 17U /* Index for rm_memreg_alloc() RPC call */
46#define RM_FUNC_MEMREG_SPLIT 29U /* Index for rm_memreg_split() RPC call */
47#define RM_FUNC_MEMREG_FREE 18U /* Index for rm_memreg_free() RPC call */
48#define RM_FUNC_FIND_MEMREG 30U /* Index for rm_find_memreg() RPC call */
49#define RM_FUNC_ASSIGN_MEMREG 19U /* Index for rm_assign_memreg() RPC call */
50#define RM_FUNC_SET_MEMREG_PERMISSIONS 20U /* Index for rm_set_memreg_permissions() RPC call */
51#define RM_FUNC_IS_MEMREG_OWNED 21U /* Index for rm_is_memreg_owned() RPC call */
52#define RM_FUNC_GET_MEMREG_INFO 22U /* Index for rm_get_memreg_info() RPC call */
53#define RM_FUNC_ASSIGN_PAD 23U /* Index for rm_assign_pad() RPC call */
54#define RM_FUNC_SET_PAD_MOVABLE 24U /* Index for rm_set_pad_movable() RPC call */
55#define RM_FUNC_IS_PAD_OWNED 25U /* Index for rm_is_pad_owned() RPC call */
56#define RM_FUNC_DUMP 27U /* Index for rm_dump() RPC call */
57/*@}*/
58
59/* Types */
60
61/* Functions */
62
63/*!
64 * This function dispatches an incoming RM RPC request.
65 *
66 * @param[in] caller_pt caller partition
67 * @param[in] msg pointer to RPC message
68 */
69void rm_dispatch(sc_rm_pt_t caller_pt, sc_rpc_msg_t *msg);
70
71/*!
72 * This function translates and dispatches an RM RPC request.
73 *
74 * @param[in] ipc IPC handle
75 * @param[in] msg pointer to RPC message
76 */
77void rm_xlate(sc_ipc_t ipc, sc_rpc_msg_t *msg);
78
79#endif /* SC_RM_RPC_H */
80
81/**@}*/