Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sip_svc_proto.h File Reference

Arm SiP services communication protocol between service provider and client. More...

Go to the source code of this file.

Data Structures

struct  sip_svc_request
 SiP Service communication protocol request format. More...
 
struct  sip_svc_response
 SiP Services service communication protocol response format. More...
 

Macros

#define SIP_SVC_ID_INVALID   0xFFFFFFFF
 Invalid id value.
 
#define SIP_SVC_PROTO_VER   0x0
 Header format.
 
#define SIP_SVC_PROTO_HEADER_CODE_OFFSET   0
 
#define SIP_SVC_PROTO_HEADER_CODE_MASK   0xFFFF
 
#define SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET   16
 
#define SIP_SVC_PROTO_HEADER_TRANS_ID_MASK   0xFF
 
#define SIP_SVC_PROTO_HEADER_VER_OFFSET   30
 
#define SIP_SVC_PROTO_HEADER_VER_MASK   0x3
 
#define SIP_SVC_PROTO_HEADER(code, trans_id)
 
#define SIP_SVC_PROTO_HEADER_GET_CODE(header)
 
#define SIP_SVC_PROTO_HEADER_GET_TRANS_ID(header)
 
#define SIP_SVC_PROTO_HEADER_SET_TRANS_ID(header, trans_id)
 
#define SIP_SVC_PROTO_CMD_SYNC   0x0
 Arm SiP services command code in request header.
 
#define SIP_SVC_PROTO_CMD_ASYNC   0x1
 
#define SIP_SVC_PROTO_CMD_MAX   SIP_SVC_PROTO_CMD_ASYNC
 
#define SIP_SVC_PROTO_STATUS_OK   0x0
 Error code in response header.
 
#define SIP_SVC_PROTO_STATUS_UNKNOWN   0xFFFF
 
#define SIP_SVC_PROTO_STATUS_BUSY   0x1
 
#define SIP_SVC_PROTO_STATUS_REJECT   0x2
 
#define SIP_SVC_PROTO_STATUS_NO_RESPONSE   0x3
 
#define SIP_SVC_PROTO_STATUS_ERROR   0x4
 

Detailed Description

Arm SiP services communication protocol between service provider and client.

Client to fill in the input data in struct sip_svc_request format when requesting SMC/HVC service via 'send' function.

Service to fill in the SMC/HVC return value in struct sip_svc_response format and pass to client via Callback.

Macro Definition Documentation

◆ SIP_SVC_ID_INVALID

#define SIP_SVC_ID_INVALID   0xFFFFFFFF

Invalid id value.

◆ SIP_SVC_PROTO_CMD_ASYNC

#define SIP_SVC_PROTO_CMD_ASYNC   0x1

◆ SIP_SVC_PROTO_CMD_MAX

#define SIP_SVC_PROTO_CMD_MAX   SIP_SVC_PROTO_CMD_ASYNC

◆ SIP_SVC_PROTO_CMD_SYNC

#define SIP_SVC_PROTO_CMD_SYNC   0x0

Arm SiP services command code in request header.

SIP_SVC_PROTO_CMD_SYNC

  • Typical flow, synchronous request. Service expects EL3/EL2 firmware to return the result immediately during SMC/HVC call.

SIP_SVC_PROTO_CMD_ASYNC

  • Asynchronous request. Service is required to poll the response via a separate SMC/HVC call. Use this method if the request requires longer processing in EL3/EL2.

◆ SIP_SVC_PROTO_HEADER

#define SIP_SVC_PROTO_HEADER ( code,
trans_id )
Value:
#define SIP_SVC_PROTO_HEADER_VER_OFFSET
Definition sip_svc_proto.h:38
#define SIP_SVC_PROTO_HEADER_CODE_OFFSET
Definition sip_svc_proto.h:32
#define SIP_SVC_PROTO_HEADER_TRANS_ID_MASK
Definition sip_svc_proto.h:36
#define SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET
Definition sip_svc_proto.h:35
#define SIP_SVC_PROTO_VER
Header format.
Definition sip_svc_proto.h:30
#define SIP_SVC_PROTO_HEADER_VER_MASK
Definition sip_svc_proto.h:39
#define SIP_SVC_PROTO_HEADER_CODE_MASK
Definition sip_svc_proto.h:33

◆ SIP_SVC_PROTO_HEADER_CODE_MASK

#define SIP_SVC_PROTO_HEADER_CODE_MASK   0xFFFF

◆ SIP_SVC_PROTO_HEADER_CODE_OFFSET

#define SIP_SVC_PROTO_HEADER_CODE_OFFSET   0

◆ SIP_SVC_PROTO_HEADER_GET_CODE

#define SIP_SVC_PROTO_HEADER_GET_CODE ( header)

◆ SIP_SVC_PROTO_HEADER_GET_TRANS_ID

#define SIP_SVC_PROTO_HEADER_GET_TRANS_ID ( header)

◆ SIP_SVC_PROTO_HEADER_SET_TRANS_ID

#define SIP_SVC_PROTO_HEADER_SET_TRANS_ID ( header,
trans_id )

◆ SIP_SVC_PROTO_HEADER_TRANS_ID_MASK

#define SIP_SVC_PROTO_HEADER_TRANS_ID_MASK   0xFF

◆ SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET

#define SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET   16

◆ SIP_SVC_PROTO_HEADER_VER_MASK

#define SIP_SVC_PROTO_HEADER_VER_MASK   0x3

◆ SIP_SVC_PROTO_HEADER_VER_OFFSET

#define SIP_SVC_PROTO_HEADER_VER_OFFSET   30

◆ SIP_SVC_PROTO_STATUS_BUSY

#define SIP_SVC_PROTO_STATUS_BUSY   0x1

◆ SIP_SVC_PROTO_STATUS_ERROR

#define SIP_SVC_PROTO_STATUS_ERROR   0x4

◆ SIP_SVC_PROTO_STATUS_NO_RESPONSE

#define SIP_SVC_PROTO_STATUS_NO_RESPONSE   0x3

◆ SIP_SVC_PROTO_STATUS_OK

#define SIP_SVC_PROTO_STATUS_OK   0x0

Error code in response header.

SIP_SVC_PROTO_STATUS_OK

  • Successfully execute the request.

SIP_SVC_PROTO_STATUS_UNKNOWN

  • Unrecognized SMC/HVC Function ID.

SIP_SVC_PROTO_STATUS_BUSY

  • The request is still in progress. Please try again.

SIP_SVC_PROTO_STATUS_REJECT

  • The request have been rejected due to improper input data.

SIP_SVC_PROTO_STATUS_NO_RESPONSE

  • No response from target hardware yet.

SIP_SVC_PROTO_STATUS_ERROR

  • Error occurred when executing the request.

SIP_SVC_PROTO_STATUS_NOT_SUPPORT

  • Unsupported Arm SiP services command code

◆ SIP_SVC_PROTO_STATUS_REJECT

#define SIP_SVC_PROTO_STATUS_REJECT   0x2

◆ SIP_SVC_PROTO_STATUS_UNKNOWN

#define SIP_SVC_PROTO_STATUS_UNKNOWN   0xFFFF

◆ SIP_SVC_PROTO_VER

#define SIP_SVC_PROTO_VER   0x0

Header format.