TianoCore EDK2 master
|
#include <Library/ArmMtlLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include "ScmiPrivate.h"
Go to the source code of this file.
Macros | |
#define | RESPONSE_TIMEOUT 20000 |
Functions | |
EFI_STATUS | ScmiCommandGetPayload (OUT UINT32 **Payload) |
EFI_STATUS | ScmiCommandExecute (IN SCMI_COMMAND *Command, IN OUT UINT32 *PayloadLength, OUT UINT32 **ReturnValues OPTIONAL) |
STATIC EFI_STATUS | ScmiProtocolDiscoveryCommon (IN SCMI_PROTOCOL_ID ProtocolId, IN SCMI_MESSAGE_ID MessageId, OUT UINT32 **ReturnValues) |
EFI_STATUS | ScmiGetProtocolVersion (IN SCMI_PROTOCOL_ID ProtocolId, OUT UINT32 *Version) |
EFI_STATUS | ScmiGetProtocolAttributes (IN SCMI_PROTOCOL_ID ProtocolId, OUT UINT32 **ReturnValues) |
EFI_STATUS | ScmiGetProtocolMessageAttributes (IN SCMI_PROTOCOL_ID ProtocolId, OUT UINT32 **ReturnValues) |
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 Scmi.c.
EFI_STATUS ScmiCommandExecute | ( | IN SCMI_COMMAND * | Command, |
IN OUT UINT32 * | PayloadLength, | ||
OUT UINT32 **ReturnValues | OPTIONAL | ||
) |
Execute a SCMI command and receive a response.
This function uses a MTL channel to transfer message to SCP and waits for a response.
[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. |
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. |
EFI_STATUS ScmiCommandGetPayload | ( | OUT UINT32 ** | Payload | ) |
Return a pointer to the message payload.
[out] | Payload | Holds pointer to the message payload. |
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. |
EFI_STATUS ScmiGetProtocolAttributes | ( | IN SCMI_PROTOCOL_ID | ProtocolId, |
OUT UINT32 ** | ReturnValues | ||
) |
Return protocol attributes from SCP for a given protocol ID.
[in] | Protocol | ID Protocol ID. |
[out] | ReturnValues | Pointer to attributes of the protocol. |
EFI_SUCCESS | ReturnValues points to protocol attributes. |
EFI_DEVICE_ERROR | SCMI error. |
!(EFI_SUCCESS) | Other errors. |
EFI_STATUS ScmiGetProtocolMessageAttributes | ( | IN SCMI_PROTOCOL_ID | ProtocolId, |
OUT UINT32 ** | ReturnValues | ||
) |
Return protocol message attributes from SCP for a given protocol ID.
[in] | Protocol | ID Protocol ID. |
[out] | Attributes | Pointer to attributes of the protocol. |
EFI_SUCCESS | ReturnValues points to protocol message attributes. |
EFI_DEVICE_ERROR | SCMI error. |
!(EFI_SUCCESS) | Other errors. |
EFI_STATUS ScmiGetProtocolVersion | ( | IN SCMI_PROTOCOL_ID | ProtocolId, |
OUT UINT32 * | Version | ||
) |
Return protocol version from SCP for a given protocol ID.
[in] | Protocol | ID Protocol ID. |
[out] | Version | Pointer to version of the protocol. |
EFI_SUCCESS | Version holds a valid version received from the SCP. |
EFI_DEVICE_ERROR | SCMI error. |
!(EFI_SUCCESS) | Other errors. |
STATIC EFI_STATUS ScmiProtocolDiscoveryCommon | ( | IN SCMI_PROTOCOL_ID | ProtocolId, |
IN SCMI_MESSAGE_ID | MessageId, | ||
OUT UINT32 ** | ReturnValues | ||
) |
Internal common function useful for common protocol discovery messages.
[in] | ProtocolId | Protocol Id of the protocol. |
[in] | MessageId | Message Id of the message. |
[out] | ReturnValues | SCMI response return values. |
EFI_SUCCESS | Success with valid return values. |
EFI_DEVICE_ERROR | SCMI error. |
!(EFI_SUCCESS) | Other errors. |