Debian Codegraph @

level_zero/tools/test/unit_tests/sources/sysman/frequency/windows/mock_frequency.h

raw
1 /*
2 * Copyright (C) 2020-2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #pragma once
9 #include "level_zero/core/test/unit_tests/mock.h"
10 #include "level_zero/tools/source/sysman/frequency/windows/os_frequency_imp.h"
11 #include "level_zero/tools/test/unit_tests/sources/sysman/windows/mock_kmd_sys_manager.h"
12
13 namespace L0 {
14 namespace ult {
15
16 class FrequencyKmdSysManager : public Mock<MockKmdSysManager> {};
17
18 template <>
19 struct Mock<FrequencyKmdSysManager> : public FrequencyKmdSysManager {
20
21 uint32_t mockNumberOfDomains = 3;
22 uint32_t mockSupportedDomains = 7;
23 uint32_t mockDomainType[3] = {ZES_FREQ_DOMAIN_GPU, ZES_FREQ_DOMAIN_MEMORY, ZES_FREQ_DOMAIN_MEDIA};
24 bool mockGPUCanControl[3] = {true, false, false};
25 bool mockGPUCannotControl[3] = {false, false, false};
26 uint32_t mockMinFrequencyRange = 400;
27 uint32_t mockMaxFrequencyRange = 1200;
28 uint32_t mockRpn[3] = {400, 0, 400};
29 uint32_t mockRp0[3] = {1200, 0, 1200};
30 uint32_t mockRequestedFrequency = 600;
31 uint32_t mockTdpFrequency = 0;
32 uint32_t mockResolvedFrequency[3] = {600, 4200, 600};
33 uint32_t mockEfficientFrequency = 400;
34 uint32_t mockCurrentVoltage = 1100;
35 uint32_t mockThrottleReasons = 0;
36 uint32_t mockIccMax = 1025;
37 uint32_t mockTjMax = 105;
38
39 uint32_t mockIsExtendedModeSupported[3] = {0, 0, 0};
40 uint32_t mockIsFixedModeSupported[3] = {0, 0, 0};
41 uint32_t mockIsHighVoltModeCapable[3] = {0, 0, 0};
42 uint32_t mockIsHighVoltModeEnabled[3] = {0, 0, 0};
43 uint32_t mockIsIccMaxSupported = 1;
44 uint32_t mockIsOcSupported[3] = {0, 0, 0};
45 uint32_t mockIsTjMaxSupported = 1;
46 uint32_t mockMaxFactoryDefaultFrequency[3] = {600, 4200, 600};
47 uint32_t mockMaxFactoryDefaultVoltage[3] = {1200, 1300, 1200};
48 uint32_t mockMaxOcFrequency[3] = {1800, 4500, 1800};
49 uint32_t mockMaxOcVoltage[3] = {1300, 1400, 1300};
50 uint32_t mockFixedMode[3] = {0, 0, 0};
51 uint32_t mockVoltageMode[3] = {0, 0, 0};
52 uint32_t mockHighVoltageSupported[3] = {0, 0, 0};
53 uint32_t mockHighVoltageEnabled[3] = {0, 0, 0};
54 uint32_t mockFrequencyTarget[3] = {0, 0, 0};
55 uint32_t mockVoltageTarget[3] = {0, 0, 0};
56 uint32_t mockVoltageOffset[3] = {0, 0, 0};
57
58 void getFrequencyProperty(KmdSysman::GfxSysmanReqHeaderIn *pRequest, KmdSysman::GfxSysmanReqHeaderOut *pResponse) override {
59 uint8_t *pBuffer = reinterpret_cast<uint8_t *>(pResponse);
60 pBuffer += sizeof(KmdSysman::GfxSysmanReqHeaderOut);
61
62 KmdSysman::GeneralDomainsType domain = static_cast<KmdSysman::GeneralDomainsType>(pRequest->inCommandParam);
63
64 if (domain < KmdSysman::GeneralDomainsType::GeneralDomainDGPU || domain >= KmdSysman::GeneralDomainsType::GeneralDomainMaxTypes) {
65 pResponse->outDataSize = 0;
66 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
67 return;
68 }
69
70 switch (pRequest->inRequestId) {
71 case KmdSysman::Requests::Frequency::NumFrequencyDomains: {
72 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
73 *pValue = mockNumberOfDomains;
74 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
75 pResponse->outDataSize = sizeof(uint32_t);
76 } break;
77 case KmdSysman::Requests::Frequency::SupportedFreqDomains: {
78 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
79 *pValue = mockSupportedDomains;
80 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
81 pResponse->outDataSize = sizeof(uint32_t);
82 } break;
83 case KmdSysman::Requests::Frequency::ExtendedOcSupported: {
84 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
85 *pValue = mockIsExtendedModeSupported[domain];
86 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
87 pResponse->outDataSize = sizeof(uint32_t);
88 } break;
89 case KmdSysman::Requests::Frequency::CanControlFrequency: {
90 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
91 *pValue = allowSetCalls ? mockGPUCanControl[domain] : mockGPUCannotControl[domain];
92 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
93 pResponse->outDataSize = sizeof(uint32_t);
94 } break;
95 case KmdSysman::Requests::Frequency::FixedModeSupported: {
96 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
97 *pValue = mockFixedMode[domain];
98 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
99 pResponse->outDataSize = sizeof(uint32_t);
100 } break;
101 case KmdSysman::Requests::Frequency::HighVoltageModeSupported: {
102 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
103 *pValue = mockHighVoltageSupported[domain];
104 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
105 pResponse->outDataSize = sizeof(uint32_t);
106 } break;
107 case KmdSysman::Requests::Frequency::HighVoltageEnabled: {
108 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
109 *pValue = mockHighVoltageEnabled[domain];
110 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
111 pResponse->outDataSize = sizeof(uint32_t);
112 } break;
113 case KmdSysman::Requests::Frequency::FrequencyOcSupported: {
114 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
115 *pValue = mockIsOcSupported[domain];
116 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
117 pResponse->outDataSize = sizeof(uint32_t);
118 } break;
119 case KmdSysman::Requests::Frequency::CurrentIccMax: {
120 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
121 *pValue = mockIccMax;
122 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
123 pResponse->outDataSize = sizeof(uint32_t);
124 } break;
125 case KmdSysman::Requests::Frequency::CurrentTjMax: {
126 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
127 *pValue = mockTjMax;
128 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
129 pResponse->outDataSize = sizeof(uint32_t);
130 } break;
131 case KmdSysman::Requests::Frequency::MaxNonOcFrequencyDefault: {
132 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
133 *pValue = mockMaxFactoryDefaultFrequency[domain];
134 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
135 pResponse->outDataSize = sizeof(uint32_t);
136 } break;
137 case KmdSysman::Requests::Frequency::MaxNonOcVoltageDefault: {
138 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
139 *pValue = mockMaxFactoryDefaultVoltage[domain];
140 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
141 pResponse->outDataSize = sizeof(uint32_t);
142 } break;
143 case KmdSysman::Requests::Frequency::MaxOcFrequencyDefault: {
144 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
145 *pValue = mockMaxOcFrequency[domain];
146 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
147 pResponse->outDataSize = sizeof(uint32_t);
148 } break;
149 case KmdSysman::Requests::Frequency::MaxOcVoltageDefault: {
150 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
151 *pValue = mockMaxOcVoltage[domain];
152 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
153 pResponse->outDataSize = sizeof(uint32_t);
154 } break;
155 case KmdSysman::Requests::Frequency::CurrentFixedMode: {
156 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
157 *pValue = mockFixedMode[domain];
158 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
159 pResponse->outDataSize = sizeof(uint32_t);
160 } break;
161 case KmdSysman::Requests::Frequency::CurrentFrequencyTarget: {
162 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
163 *pValue = mockFrequencyTarget[domain];
164 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
165 pResponse->outDataSize = sizeof(uint32_t);
166 } break;
167 case KmdSysman::Requests::Frequency::CurrentVoltageTarget: {
168 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
169 *pValue = mockVoltageTarget[domain];
170 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
171 pResponse->outDataSize = sizeof(uint32_t);
172 } break;
173 case KmdSysman::Requests::Frequency::CurrentVoltageOffset: {
174 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
175 *pValue = mockVoltageOffset[domain];
176 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
177 pResponse->outDataSize = sizeof(uint32_t);
178 } break;
179 case KmdSysman::Requests::Frequency::CurrentVoltageMode: {
180 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
181 *pValue = mockVoltageMode[domain];
182 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
183 pResponse->outDataSize = sizeof(uint32_t);
184 } break;
185 case KmdSysman::Requests::Frequency::FrequencyThrottledEventSupported: {
186 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
187 *pValue = 0;
188 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
189 pResponse->outDataSize = sizeof(uint32_t);
190 } break;
191 case KmdSysman::Requests::Frequency::CurrentFrequencyRange: {
192 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
193 uint32_t *pMinFreq = reinterpret_cast<uint32_t *>(pBuffer);
194 uint32_t *pMaxFreq = reinterpret_cast<uint32_t *>(pBuffer + sizeof(uint32_t));
195 *pMinFreq = mockMinFrequencyRange;
196 *pMaxFreq = mockMaxFrequencyRange;
197 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
198 pResponse->outDataSize = 2 * sizeof(uint32_t);
199 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
200 pResponse->outDataSize = 0;
201 pResponse->outReturnCode = KmdSysman::ReturnCodes::DomainServiceNotSupported;
202 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
203 uint32_t *pMinFreq = reinterpret_cast<uint32_t *>(pBuffer);
204 uint32_t *pMaxFreq = reinterpret_cast<uint32_t *>(pBuffer + sizeof(uint32_t));
205 *pMinFreq = mockMinFrequencyRange;
206 *pMaxFreq = mockMaxFrequencyRange;
207 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
208 pResponse->outDataSize = 2 * sizeof(uint32_t);
209 }
210 } break;
211 case KmdSysman::Requests::Frequency::CurrentRequestedFrequency: {
212 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
213 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
214 *pValue = mockRequestedFrequency;
215 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
216 pResponse->outDataSize = sizeof(uint32_t);
217 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
218 pResponse->outDataSize = 0;
219 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
220 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
221 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
222 *pValue = mockRequestedFrequency;
223 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
224 pResponse->outDataSize = sizeof(uint32_t);
225 }
226 } break;
227 case KmdSysman::Requests::Frequency::CurrentTdpFrequency: {
228 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
229 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
230 *pValue = mockTdpFrequency;
231 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
232 pResponse->outDataSize = sizeof(uint32_t);
233 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
234 pResponse->outDataSize = 0;
235 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
236 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
237 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
238 *pValue = mockTdpFrequency;
239 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
240 pResponse->outDataSize = sizeof(uint32_t);
241 }
242 } break;
243 case KmdSysman::Requests::Frequency::CurrentResolvedFrequency: {
244 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
245 *pValue = mockResolvedFrequency[domain];
246 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
247 pResponse->outDataSize = sizeof(uint32_t);
248 } break;
249 case KmdSysman::Requests::Frequency::CurrentEfficientFrequency: {
250 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
251 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
252 *pValue = mockEfficientFrequency;
253 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
254 pResponse->outDataSize = sizeof(uint32_t);
255 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
256 pResponse->outDataSize = 0;
257 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
258 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
259 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
260 *pValue = mockEfficientFrequency;
261 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
262 pResponse->outDataSize = sizeof(uint32_t);
263 }
264 } break;
265 case KmdSysman::Requests::Frequency::FrequencyRangeMaxDefault: {
266 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
267 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
268 *pValue = mockRp0[domain];
269 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
270 pResponse->outDataSize = sizeof(uint32_t);
271 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
272 pResponse->outDataSize = 0;
273 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
274 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
275 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
276 *pValue = mockRp0[domain];
277 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
278 pResponse->outDataSize = sizeof(uint32_t);
279 }
280 } break;
281 case KmdSysman::Requests::Frequency::FrequencyRangeMinDefault: {
282 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
283 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
284 *pValue = mockRpn[domain];
285 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
286 pResponse->outDataSize = sizeof(uint32_t);
287 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
288 pResponse->outDataSize = 0;
289 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
290 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
291 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
292 *pValue = mockRpn[domain];
293 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
294 pResponse->outDataSize = sizeof(uint32_t);
295 }
296 } break;
297 case KmdSysman::Requests::Frequency::CurrentVoltage: {
298 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
299 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
300 *pValue = mockCurrentVoltage;
301 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
302 pResponse->outDataSize = sizeof(uint32_t);
303 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
304 pResponse->outDataSize = 0;
305 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
306 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
307 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
308 *pValue = mockCurrentVoltage;
309 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
310 pResponse->outDataSize = sizeof(uint32_t);
311 }
312 } break;
313 case KmdSysman::Requests::Frequency::CurrentThrottleReasons: {
314 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
315 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
316 *pValue = mockThrottleReasons;
317 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
318 pResponse->outDataSize = sizeof(uint32_t);
319 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
320 pResponse->outDataSize = 0;
321 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
322 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
323 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
324 *pValue = mockThrottleReasons;
325 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
326 pResponse->outDataSize = sizeof(uint32_t);
327 }
328 } break;
329 default: {
330 pResponse->outDataSize = 0;
331 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
332 } break;
333 }
334 }
335
336 void setFrequencyProperty(KmdSysman::GfxSysmanReqHeaderIn *pRequest, KmdSysman::GfxSysmanReqHeaderOut *pResponse) override {
337 uint8_t *pBuffer = reinterpret_cast<uint8_t *>(pRequest);
338 pBuffer += sizeof(KmdSysman::GfxSysmanReqHeaderIn);
339
340 KmdSysman::GeneralDomainsType domain = static_cast<KmdSysman::GeneralDomainsType>(pRequest->inCommandParam);
341
342 if (domain < KmdSysman::GeneralDomainsType::GeneralDomainDGPU || domain >= KmdSysman::GeneralDomainsType::GeneralDomainMaxTypes) {
343 pResponse->outDataSize = 0;
344 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
345 return;
346 }
347 switch (pRequest->inRequestId) {
348 case KmdSysman::Requests::Frequency::CurrentFrequencyRange: {
349 if (domain == KmdSysman::GeneralDomainsType::GeneralDomainDGPU) {
350 uint32_t *pMinFreq = reinterpret_cast<uint32_t *>(pBuffer);
351 uint32_t *pMaxFreq = reinterpret_cast<uint32_t *>(pBuffer + sizeof(uint32_t));
352 mockMinFrequencyRange = *pMinFreq;
353 mockMaxFrequencyRange = *pMaxFreq;
354 pResponse->outDataSize = 0;
355 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
356 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainHBM) {
357 pResponse->outDataSize = 0;
358 pResponse->outReturnCode = KmdSysman::ReturnCodes::DomainServiceNotSupported;
359 } else if (domain == KmdSysman::GeneralDomainsType::GeneralDomainMedia) {
360 uint32_t *pMinFreq = reinterpret_cast<uint32_t *>(pBuffer);
361 uint32_t *pMaxFreq = reinterpret_cast<uint32_t *>(pBuffer + sizeof(uint32_t));
362 mockMinFrequencyRange = *pMinFreq;
363 mockMaxFrequencyRange = *pMaxFreq;
364 pResponse->outDataSize = 0;
365 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
366 }
367 } break;
368 case KmdSysman::Requests::Frequency::CurrentFixedMode: {
369 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
370 mockFixedMode[domain] = *pValue;
371 pResponse->outDataSize = 0;
372 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
373 } break;
374 case KmdSysman::Requests::Frequency::CurrentVoltageMode: {
375 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
376 mockVoltageMode[domain] = *pValue;
377 pResponse->outDataSize = 0;
378 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
379 } break;
380 case KmdSysman::Requests::Frequency::CurrentVoltageOffset: {
381 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
382 mockVoltageOffset[domain] = *pValue;
383 pResponse->outDataSize = 0;
384 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
385 } break;
386 case KmdSysman::Requests::Frequency::CurrentVoltageTarget: {
387 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
388 mockVoltageTarget[domain] = *pValue;
389 pResponse->outDataSize = 0;
390 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
391 } break;
392 case KmdSysman::Requests::Frequency::CurrentFrequencyTarget: {
393 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
394 mockFrequencyTarget[domain] = *pValue;
395 pResponse->outDataSize = 0;
396 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
397 } break;
398 case KmdSysman::Requests::Frequency::CurrentIccMax: {
399 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
400 mockIccMax = *pValue;
401 pResponse->outDataSize = 0;
402 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
403 } break;
404 case KmdSysman::Requests::Frequency::CurrentTjMax: {
405 uint32_t *pValue = reinterpret_cast<uint32_t *>(pBuffer);
406 mockTjMax = *pValue;
407 pResponse->outDataSize = 0;
408 pResponse->outReturnCode = KmdSysman::KmdSysmanSuccess;
409 } break;
410 default: {
411 pResponse->outDataSize = 0;
412 pResponse->outReturnCode = KmdSysman::KmdSysmanFail;
413 } break;
414 }
415 }
416
417 Mock() = default;
418 ~Mock() override = default;
419 };
420
421 } // namespace ult
422 } // namespace L0