62 ScmiProtocolIdPerformance,
65 if (EFI_ERROR (Status)) {
98 UINT32 *MessageParams;
100 UINT32 PayloadLength;
104 if (EFI_ERROR (Status)) {
108 *MessageParams = DomainId;
110 Cmd.ProtocolId = ScmiProtocolIdPerformance;
111 Cmd.MessageId = ScmiMessageIdPerformanceDomainAttributes;
113 PayloadLength =
sizeof (DomainId);
120 if (EFI_ERROR (Status)) {
155 OUT UINT32 *NumLevels,
156 IN OUT UINT32 *LevelArraySize,
161 UINT32 PayloadLength;
163 UINT32 *MessageParams;
167 UINT32 ReturnNumLevels;
168 UINT32 ReturnRemainNumLevels;
173 if (EFI_ERROR (Status)) {
180 *MessageParams++ = DomainId;
182 Cmd.ProtocolId = ScmiProtocolIdPerformance;
183 Cmd.MessageId = ScmiMessageIdPerformanceDescribeLevels;
186 *MessageParams = LevelIndex;
189 PayloadLength =
sizeof (DomainId) +
sizeof (LevelIndex);
196 if (EFI_ERROR (Status)) {
200 ReturnNumLevels = NUM_PERF_LEVELS (Levels->NumLevels);
201 ReturnRemainNumLevels = NUM_REMAIN_PERF_LEVELS (Levels->NumLevels);
203 if (RequiredSize == 0) {
204 *NumLevels = ReturnNumLevels + ReturnRemainNumLevels;
207 if (RequiredSize > (*LevelArraySize)) {
209 *LevelArraySize = RequiredSize;
210 return EFI_BUFFER_TOO_SMALL;
214 for (LevelNo = 0; LevelNo < ReturnNumLevels; LevelNo++) {
216 &LevelArray[LevelIndex++],
217 &Levels->PerfLevel[LevelNo],
221 }
while (ReturnRemainNumLevels != 0);
223 *LevelArraySize = RequiredSize;
246 UINT32 PayloadLength;
248 UINT32 *MessageParams;
251 if (EFI_ERROR (Status)) {
255 *MessageParams++ = DomainId;
256 *MessageParams++ = Limits->RangeMax;
257 *MessageParams = Limits->RangeMin;
259 Cmd.ProtocolId = ScmiProtocolIdPerformance;
260 Cmd.MessageId = ScmiMessageIdPerformanceLimitsSet;
292 UINT32 PayloadLength;
294 UINT32 *MessageParams;
299 if (EFI_ERROR (Status)) {
303 *MessageParams = DomainId;
305 Cmd.ProtocolId = ScmiProtocolIdPerformance;
306 Cmd.MessageId = ScmiMessageIdPerformanceLimitsGet;
308 PayloadLength =
sizeof (DomainId);
313 (UINT32 **)&ReturnValues
315 if (EFI_ERROR (Status)) {
319 Limits->RangeMax = ReturnValues->RangeMax;
320 Limits->RangeMin = ReturnValues->RangeMin;
343 UINT32 PayloadLength;
345 UINT32 *MessageParams;
348 if (EFI_ERROR (Status)) {
352 *MessageParams++ = DomainId;
353 *MessageParams = Level;
355 Cmd.ProtocolId = ScmiProtocolIdPerformance;
356 Cmd.MessageId = ScmiMessageIdPerformanceLevelSet;
358 PayloadLength =
sizeof (DomainId) +
sizeof (Level);
388 UINT32 PayloadLength;
390 UINT32 *ReturnValues;
391 UINT32 *MessageParams;
394 if (EFI_ERROR (Status)) {
398 *MessageParams = DomainId;
400 Cmd.ProtocolId = ScmiProtocolIdPerformance;
401 Cmd.MessageId = ScmiMessageIdPerformanceLevelGet;
403 PayloadLength =
sizeof (DomainId);
410 if (EFI_ERROR (Status)) {
414 *Level = *ReturnValues;
448 UINT32 PayloadLength;
449 UINT32 *ReturnValues;
450 UINT32 *MessageParams;
452 if ((This ==
NULL) ||
453 (FastChannel ==
NULL))
455 return EFI_INVALID_PARAMETER;
459 if (EFI_ERROR (Status)) {
463 *MessageParams++ = DomainId;
464 *MessageParams = MessageId;
466 Cmd.ProtocolId = ScmiProtocolIdPerformance;
467 Cmd.MessageId = ScmiMessageIdPerformanceDescribeFastchannel;
468 PayloadLength =
sizeof (DomainId) +
sizeof (MessageId);
475 if (EFI_ERROR (Status)) {
513 return gBS->InstallMultipleProtocolInterfaces (
515 &gArmScmiPerformanceProtocolGuid,
516 &PerformanceProtocol,
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
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)
Performance protocol describe fastchannel.