54 OUT UINT32 *TotalProtocols
61 if (EFI_ERROR (Status)) {
85 IN SCMI_MESSAGE_ID_BASE MessageId,
86 OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
94 Cmd.ProtocolId = ScmiProtocolIdBase;
95 Cmd.MessageId = MessageId;
104 if (EFI_ERROR (Status)) {
109 (CHAR8 *)VendorIdentifier,
111 (
CONST CHAR8 *)ReturnValues
132 OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
136 ScmiMessageIdBaseDiscoverVendor,
155 OUT UINT8 VendorIdentifier[SCMI_MAX_STR_LEN]
159 ScmiMessageIdBaseDiscoverSubVendor,
178 OUT UINT32 *ImplementationVersion
182 UINT32 *ReturnValues;
184 UINT32 PayloadLength;
186 Cmd.ProtocolId = ScmiProtocolIdBase;
187 Cmd.MessageId = ScmiMessageIdBaseDiscoverImplementationVersion;
196 if (EFI_ERROR (Status)) {
200 *ImplementationVersion = ReturnValues[0];
223 IN OUT UINT32 *ProtocolListSize,
224 OUT UINT8 *ProtocolList
228 UINT32 TotalProtocols;
229 UINT32 *MessageParams;
234 UINT32 PayloadLength;
238 if (EFI_ERROR (Status)) {
243 if (EFI_ERROR (Status)) {
247 RequiredSize =
sizeof (UINT8) * TotalProtocols;
248 if (*ProtocolListSize < RequiredSize) {
249 *ProtocolListSize = RequiredSize;
250 return EFI_BUFFER_TOO_SMALL;
253 Cmd.ProtocolId = ScmiProtocolIdBase;
254 Cmd.MessageId = ScmiMessageIdBaseDiscoverListProtocols;
258 while (Skip < TotalProtocols) {
259 *MessageParams = Skip;
262 PayloadLength =
sizeof (Skip);
267 (UINT32 **)&DiscoverList
269 if (EFI_ERROR (Status)) {
273 for (Index = 0; Index < DiscoverList->NumProtocols; Index++) {
274 ProtocolList[Skip++] = DiscoverList->Protocols[Index];
278 *ProtocolListSize = RequiredSize;
305 return gBS->InstallMultipleProtocolInterfaces (
307 &gArmScmiBaseProtocolGuid,
#define SCMI_TOTAL_PROTOCOLS(Attr)
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
EFI_STATUS ScmiGetProtocolVersion(IN SCMI_PROTOCOL_ID ProtocolId, OUT UINT32 *Version)
EFI_STATUS ScmiCommandExecute(IN SCMI_COMMAND *Command, IN OUT UINT32 *PayloadLength, OUT UINT32 **ReturnValues OPTIONAL)
EFI_STATUS ScmiCommandGetPayload(OUT UINT32 **Payload)
EFI_STATUS ScmiGetProtocolAttributes(IN SCMI_PROTOCOL_ID ProtocolId, OUT UINT32 **ReturnValues)
EFI_STATUS ScmiBaseProtocolInit(IN OUT EFI_HANDLE *Handle)
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 BaseDiscoverVendorDetails(IN SCMI_MESSAGE_ID_BASE MessageId, 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])