Go to the source code of this file.
|
enum | SCMI_PROTOCOL_ID {
ScmiProtocolIdBase = 0x10
, ScmiProtocolIdPowerDomain = 0x11
, ScmiProtocolIdSystemPower = 0x12
, ScmiProtocolIdPerformance = 0x13
,
ScmiProtocolIdClock = 0x14
, ScmiProtocolIdSensor = 0x15
} |
|
enum | SCMI_MESSAGE_TYPE { ScmiMessageTypeCommand = 0
, ScmiMessageTypeDelayedResponse = 2
, ScmiMessageTypeNotification = 3
} |
|
enum | SCMI_STATUS {
ScmiSuccess = 0
, ScmiNotSupported = -1
, ScmiInvalidParameters = -2
, ScmiDenied = -3
,
ScmiNotFound = -4
, ScmiOutOfRange = -5
, ScmiBusy = -6
, ScmiCommsError = -7
,
ScmiGenericError = -8
, ScmiHardwareError = -9
, ScmiProtocolError = -10
} |
|
enum | SCMI_MESSAGE_ID { ScmiMessageIdProtocolVersion = 0x0
, ScmiMessageIdProtocolAttributes = 0x1
, ScmiMessageIdProtocolMessageAttributes = 0x2
} |
|
Copyright (c) 2017-2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
System Control and Management Interface V1.0 http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/ DEN0056A_System_Control_and_Management_Interface.pdf
Definition in file ScmiPrivate.h.
◆ MESSAGE_TYPE_SHIFT
#define MESSAGE_TYPE_SHIFT 8 |
◆ PROTOCOL_ID_SHIFT
#define PROTOCOL_ID_SHIFT 10 |
◆ SCMI_MESSAGE_HEADER
Value: ( \
MsgType << MESSAGE_TYPE_SHIFT | \
ProtocolId << PROTOCOL_ID_SHIFT | \
MsgId \
)
Definition at line 71 of file ScmiPrivate.h.
◆ SCMI_MESSAGE_ID
◆ SCMI_MESSAGE_TYPE
◆ SCMI_PROTOCOL_ID
◆ SCMI_STATUS
◆ ScmiCommandExecute()
Execute a SCMI command and receive a response.
This function uses a MTL channel to transfer message to SCP and waits for a response.
- Parameters
-
[in] | Command | Pointer to the SCMI command (Protocol ID and Message ID) |
[in,out] | PayloadLength | SCMI command message length. |
[out] | OPTIONAL | ReturnValues Pointer to SCMI response. |
- Return values
-
OUT | EFI_SUCCESS Command sent and message received successfully. |
OUT | EFI_UNSUPPORTED Channel not supported. |
OUT | EFI_TIMEOUT Timeout on the channel. |
OUT | EFI_DEVICE_ERROR Channel not ready. |
OUT | EFI_DEVICE_ERROR Message Header corrupted. |
OUT | EFI_DEVICE_ERROR SCMI error. |
Definition at line 76 of file Scmi.c.
◆ ScmiCommandGetPayload()
Return a pointer to the message payload.
- Parameters
-
[out] | Payload | Holds pointer to the message payload. |
- Return values
-
EFI_SUCCESS | Payload holds a valid message payload pointer. |
EFI_TIMEOUT | Time out error if MTL channel is busy. |
EFI_UNSUPPORTED | If MTL channel is unsupported. |
Definition at line 31 of file Scmi.c.
◆ ScmiGetProtocolAttributes()
EFI_STATUS ScmiGetProtocolAttributes |
( |
IN SCMI_PROTOCOL_ID |
ProtocolId, |
|
|
OUT UINT32 ** |
ReturnValues |
|
) |
| |
Return protocol attributes from SCP for a given protocol ID.
- Parameters
-
[in] | Protocol | ID Protocol ID. |
[out] | ReturnValues | Pointer to attributes of the protocol. |
- Return values
-
EFI_SUCCESS | ReturnValues points to protocol attributes. |
EFI_DEVICE_ERROR | SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Definition at line 222 of file Scmi.c.
◆ ScmiGetProtocolMessageAttributes()
EFI_STATUS ScmiGetProtocolMessageAttributes |
( |
IN SCMI_PROTOCOL_ID |
ProtocolId, |
|
|
OUT UINT32 ** |
ReturnValues |
|
) |
| |
Return protocol message attributes from SCP for a given protocol ID.
- Parameters
-
[in] | Protocol | ID Protocol ID. |
[out] | Attributes | Pointer to attributes of the protocol. |
- Return values
-
EFI_SUCCESS | ReturnValues points to protocol message attributes. |
EFI_DEVICE_ERROR | SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Definition at line 244 of file Scmi.c.
◆ ScmiGetProtocolVersion()
EFI_STATUS ScmiGetProtocolVersion |
( |
IN SCMI_PROTOCOL_ID |
ProtocolId, |
|
|
OUT UINT32 * |
Version |
|
) |
| |
Return protocol version from SCP for a given protocol ID.
- Parameters
-
[in] | Protocol | ID Protocol ID. |
[out] | Version | Pointer to version of the protocol. |
- Return values
-
EFI_SUCCESS | Version holds a valid version received from the SCP. |
EFI_DEVICE_ERROR | SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Definition at line 190 of file Scmi.c.