ArmPkg[all]  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ArmMtlLib.h File Reference

Data Structures

struct  MTL_MAILBOX
 
struct  MTL_DOORBELL
 
struct  MTL_CHANNEL
 

Enumerations

enum  MTL_CHANNEL_TYPE { MTL_CHANNEL_TYPE_LOW = 0, MTL_CHANNEL_TYPE_HIGH = 1 }
 

Functions

EFI_STATUS MtlWaitUntilChannelFree (IN MTL_CHANNEL *Channel, IN UINTN TimeOutInMicroSeconds)
 
UINT32 * MtlGetChannelPayload (IN MTL_CHANNEL *Channel)
 
EFI_STATUS MtlGetChannel (IN MTL_CHANNEL_TYPE ChannelType, OUT MTL_CHANNEL **Channel)
 
EFI_STATUS MtlSendMessage (IN MTL_CHANNEL *Channel, IN UINT32 MessageHeader, OUT UINT32 PayloadLength)
 
EFI_STATUS MtlReceiveMessage (IN MTL_CHANNEL *Channel, OUT UINT32 *MessageHeader, OUT UINT32 *PayloadLength)
 

Detailed Description

Copyright (c) 2017-2018, 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

Enumeration Type Documentation

Enumerator
MTL_CHANNEL_TYPE_LOW 
MTL_CHANNEL_TYPE_HIGH 

Function Documentation

EFI_STATUS MtlGetChannel ( IN MTL_CHANNEL_TYPE  ChannelType,
OUT MTL_CHANNEL **  Channel 
)

Return pointer to a channel for the requested channel type.

Parameters
[in]ChannelTypeChannelType, Low or High priority channel. MTL_CHANNEL_TYPE_LOW or MTL_CHANNEL_TYPE_HIGH
[out]ChannelHolds pointer to the channel.
Return values
EFI_SUCCESSPointer to channel is returned.
EFI_UNSUPPORTEDRequested channel type not supported.
UINT32* MtlGetChannelPayload ( IN MTL_CHANNEL Channel)

Return the address of the message payload.

Parameters
[in]ChannelPointer to a channel.
Return values
UINT32*Pointer to the payload.
EFI_STATUS MtlReceiveMessage ( IN MTL_CHANNEL Channel,
OUT UINT32 *  MessageHeader,
OUT UINT32 *  PayloadLength 
)

Wait for a response on a channel.

If channel is free after sending message, it implies SCP responded with a response on the channel.

Parameters
[in]ChannelPointer to a channel.
Return values
EFI_SUCCESSMessage received successfully.
EFI_TIMEOUTTime out error.
EFI_STATUS MtlSendMessage ( IN MTL_CHANNEL Channel,
IN UINT32  MessageHeader,
OUT UINT32  PayloadLength 
)

Mark the channel busy and ring the doorbell.

Parameters
[in]ChannelPointer to a channel.
[in]MessageHeaderMessage header.
[out]PayloadLengthMessage length.
Return values
EFI_SUCCESSMessage sent successfully.
EFI_DEVICE_ERRORChannel is busy.
EFI_STATUS MtlWaitUntilChannelFree ( IN MTL_CHANNEL Channel,
IN UINTN  TimeOutInMicroSeconds 
)

Wait until channel is free.

Parameters
[in]ChannelPointer to a channel.
[in]TimeOutInMicroSecondsTime out in micro seconds.
Return values
EFI_SUCCESSChannel is free.
EFI_TIMEOUTTime out error.