Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sip_svc_proto.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023, Intel Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_SIP_SVC_PROTO_H_
8#define ZEPHYR_INCLUDE_SIP_SVC_PROTO_H_
9
25#define SIP_SVC_ID_INVALID 0xFFFFFFFF
26
30#define SIP_SVC_PROTO_VER 0x0
31
32#define SIP_SVC_PROTO_HEADER_CODE_OFFSET 0
33#define SIP_SVC_PROTO_HEADER_CODE_MASK 0xFFFF
34
35#define SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET 16
36#define SIP_SVC_PROTO_HEADER_TRANS_ID_MASK 0xFF
37
38#define SIP_SVC_PROTO_HEADER_VER_OFFSET 30
39#define SIP_SVC_PROTO_HEADER_VER_MASK 0x3
40
41#define SIP_SVC_PROTO_HEADER(code, trans_id) \
42 ((((code)&SIP_SVC_PROTO_HEADER_CODE_MASK) << SIP_SVC_PROTO_HEADER_CODE_OFFSET) | \
43 (((trans_id)&SIP_SVC_PROTO_HEADER_TRANS_ID_MASK) \
44 << SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET) | \
45 ((SIP_SVC_PROTO_VER & SIP_SVC_PROTO_HEADER_VER_MASK) << SIP_SVC_PROTO_HEADER_VER_OFFSET))
46
47#define SIP_SVC_PROTO_HEADER_GET_CODE(header) \
48 (((header) >> SIP_SVC_PROTO_HEADER_CODE_OFFSET) & SIP_SVC_PROTO_HEADER_CODE_MASK)
49
50#define SIP_SVC_PROTO_HEADER_GET_TRANS_ID(header) \
51 (((header) >> SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET) & SIP_SVC_PROTO_HEADER_TRANS_ID_MASK)
52
53#define SIP_SVC_PROTO_HEADER_SET_TRANS_ID(header, trans_id) \
54 (header) &= ~(SIP_SVC_PROTO_HEADER_TRANS_ID_MASK << SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET); \
55 (header) |= (((trans_id)&SIP_SVC_PROTO_HEADER_TRANS_ID_MASK) \
56 << SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET);
57
70#define SIP_SVC_PROTO_CMD_SYNC 0x0
71#define SIP_SVC_PROTO_CMD_ASYNC 0x1
72#define SIP_SVC_PROTO_CMD_MAX SIP_SVC_PROTO_CMD_ASYNC
73
98#define SIP_SVC_PROTO_STATUS_OK 0x0
99#define SIP_SVC_PROTO_STATUS_UNKNOWN 0xFFFF
100#define SIP_SVC_PROTO_STATUS_BUSY 0x1
101#define SIP_SVC_PROTO_STATUS_REJECT 0x2
102#define SIP_SVC_PROTO_STATUS_NO_RESPONSE 0x3
103#define SIP_SVC_PROTO_STATUS_ERROR 0x4
104
135 unsigned long a0;
136 unsigned long a1;
137 unsigned long a2;
138 unsigned long a3;
139 unsigned long a4;
140 unsigned long a5;
141 unsigned long a6;
142 unsigned long a7;
146};
147
179 unsigned long a0;
180 unsigned long a1;
181 unsigned long a2;
182 unsigned long a3;
186};
187
188#endif /* ZEPHYR_INCLUDE_SIP_SVC_PROTO_H_ */
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
SiP Service communication protocol request format.
Definition sip_svc_proto.h:133
void * priv_data
Definition sip_svc_proto.h:145
unsigned long a6
Definition sip_svc_proto.h:141
unsigned long a1
Definition sip_svc_proto.h:136
unsigned long a5
Definition sip_svc_proto.h:140
unsigned long a3
Definition sip_svc_proto.h:138
unsigned long a4
Definition sip_svc_proto.h:139
unsigned long a0
Definition sip_svc_proto.h:135
uint64_t resp_data_addr
Definition sip_svc_proto.h:143
unsigned long a2
Definition sip_svc_proto.h:137
uint32_t header
Definition sip_svc_proto.h:134
unsigned long a7
Definition sip_svc_proto.h:142
uint32_t resp_data_size
Definition sip_svc_proto.h:144
SiP Services service communication protocol response format.
Definition sip_svc_proto.h:177
uint32_t resp_data_size
Definition sip_svc_proto.h:184
unsigned long a0
Definition sip_svc_proto.h:179
uint64_t resp_data_addr
Definition sip_svc_proto.h:183
void * priv_data
Definition sip_svc_proto.h:185
unsigned long a3
Definition sip_svc_proto.h:182
uint32_t header
Definition sip_svc_proto.h:178
unsigned long a1
Definition sip_svc_proto.h:180
unsigned long a2
Definition sip_svc_proto.h:181