TianoCore EDK2 master
Loading...
Searching...
No Matches
ScmiBaseProtocol.c File Reference

Go to the source code of this file.

Functions

STATIC EFI_STATUS BaseGetVersion (IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *Version)
 
STATIC EFI_STATUS BaseGetTotalProtocols (IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *TotalProtocols)
 
STATIC EFI_STATUS BaseDiscoverVendorDetails (IN SCMI_MESSAGE_ID_BASE MessageId, OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN])
 
STATIC EFI_STATUS BaseDiscoverVendor (IN SCMI_BASE_PROTOCOL *This, OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN])
 
EFI_STATUS BaseDiscoverSubVendor (IN SCMI_BASE_PROTOCOL *This, OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN])
 
STATIC EFI_STATUS BaseDiscoverImplVersion (IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *ImplementationVersion)
 
STATIC EFI_STATUS BaseDiscoverListProtocols (IN SCMI_BASE_PROTOCOL *This, IN OUT UINT32 *ProtocolListSize, OUT UINT8 *ProtocolList)
 
EFI_STATUS ScmiBaseProtocolInit (IN OUT EFI_HANDLE *Handle)
 

Variables

STATIC CONST SCMI_BASE_PROTOCOL BaseProtocol
 

Detailed Description

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 ScmiBaseProtocol.c.

Function Documentation

◆ BaseDiscoverImplVersion()

STATIC EFI_STATUS BaseDiscoverImplVersion ( IN SCMI_BASE_PROTOCOL This,
OUT UINT32 *  ImplementationVersion 
)

Return implementation version.

Parameters
[in]ThisA Pointer to SCMI_BASE_PROTOCOL Instance.
[out]ImplementationVersionVendor specific implementation version.
Return values
EFI_SUCCESSImplementation version is returned.
EFI_DEVICE_ERRORSCP returns a SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 176 of file ScmiBaseProtocol.c.

◆ BaseDiscoverListProtocols()

STATIC EFI_STATUS BaseDiscoverListProtocols ( IN SCMI_BASE_PROTOCOL This,
IN OUT UINT32 *  ProtocolListSize,
OUT UINT8 *  ProtocolList 
)

Return list of protocols.

Parameters
[in]ThisA Pointer to SCMI_BASE_PROTOCOL Instance.
[out]ProtocolListSizeSize of the ProtocolList.
[out]ProtocolListProtocol list.
Return values
EFI_SUCCESSList of protocols is returned.
EFI_BUFFER_TOO_SMALLProtocolListSize is too small for the result. It has been updated to the size needed.
EFI_DEVICE_ERRORSCP returns a SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 221 of file ScmiBaseProtocol.c.

◆ BaseDiscoverSubVendor()

EFI_STATUS BaseDiscoverSubVendor ( IN SCMI_BASE_PROTOCOL This,
OUT UINT8  VendorIdentifier[SCMI_MAX_STR_LEN] 
)

Return sub vendor name.

Parameters
[in]ThisA Pointer to SCMI_BASE_PROTOCOL Instance.
[out]VendorIdentifierNull terminated ASCII string of up to 16 bytes with a sub vendor name.
Return values
EFI_SUCCESSVendorIdentifier is returned.
EFI_DEVICE_ERRORSCP returns a SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 153 of file ScmiBaseProtocol.c.

◆ BaseDiscoverVendor()

STATIC EFI_STATUS BaseDiscoverVendor ( IN SCMI_BASE_PROTOCOL This,
OUT UINT8  VendorIdentifier[SCMI_MAX_STR_LEN] 
)

Return vendor name.

Parameters
[in]ThisA Pointer to SCMI_BASE_PROTOCOL Instance.
[out]VendorIdentifierNull terminated ASCII string of up to 16 bytes with a vendor name.
Return values
EFI_SUCCESSVendorIdentifier is returned.
EFI_DEVICE_ERRORSCP returns a SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 130 of file ScmiBaseProtocol.c.

◆ BaseDiscoverVendorDetails()

STATIC EFI_STATUS BaseDiscoverVendorDetails ( IN SCMI_MESSAGE_ID_BASE  MessageId,
OUT UINT8  VendorIdentifier[SCMI_MAX_STR_LEN] 
)

Common function which returns vendor details.

Parameters
[in]MessageIdScmiMessageIdBaseDiscoverVendor OR ScmiMessageIdBaseDiscoverSubVendor
[out]VendorIdentifierASCII name of the vendor/subvendor.
Return values
EFI_SUCCESSVendorIdentifier is returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 84 of file ScmiBaseProtocol.c.

◆ BaseGetTotalProtocols()

STATIC EFI_STATUS BaseGetTotalProtocols ( IN SCMI_BASE_PROTOCOL This,
OUT UINT32 *  TotalProtocols 
)

Return total number of SCMI protocols supported by the SCP firmware.

Parameters
[in]ThisA Pointer to SCMI_BASE_PROTOCOL Instance.
[out]TotalProtocolsTotal number of SCMI protocols supported.
Return values
EFI_SUCCESSTotal number of protocols supported are returned.
EFI_DEVICE_ERRORSCP returns a SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 52 of file ScmiBaseProtocol.c.

◆ BaseGetVersion()

STATIC EFI_STATUS BaseGetVersion ( IN SCMI_BASE_PROTOCOL This,
OUT UINT32 *  Version 
)

Return version of the Base protocol supported by SCP firmware.

Parameters
[in]ThisA Pointer to SCMI_BASE_PROTOCOL Instance.
[out]VersionVersion of the supported SCMI Base protocol.
Return values
EFI_SUCCESSThe version of the protocol is returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 32 of file ScmiBaseProtocol.c.

◆ ScmiBaseProtocolInit()

EFI_STATUS ScmiBaseProtocolInit ( IN OUT EFI_HANDLE Handle)

Initialize Base protocol and install protocol on a given handle.

Parameters
[in]HandleHandle to install Base protocol.
Return values
EFI_SUCCESSBase protocol interface installed successfully.

Definition at line 301 of file ScmiBaseProtocol.c.

Variable Documentation

◆ BaseProtocol

Initial value:
= {
}
STATIC EFI_STATUS BaseDiscoverListProtocols(IN SCMI_BASE_PROTOCOL *This, IN OUT UINT32 *ProtocolListSize, OUT UINT8 *ProtocolList)
EFI_STATUS BaseDiscoverSubVendor(IN SCMI_BASE_PROTOCOL *This, OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN])
STATIC EFI_STATUS BaseGetTotalProtocols(IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *TotalProtocols)
STATIC EFI_STATUS BaseDiscoverImplVersion(IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *ImplementationVersion)
STATIC EFI_STATUS BaseGetVersion(IN SCMI_BASE_PROTOCOL *This, OUT UINT32 *Version)
STATIC EFI_STATUS BaseDiscoverVendor(IN SCMI_BASE_PROTOCOL *This, OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN])

Definition at line 284 of file ScmiBaseProtocol.c.