1 | /** @file
|
---|
2 | CPU Common features library header file.
|
---|
3 |
|
---|
4 | Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
|
---|
5 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 |
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #ifndef _CPU_COMMON_FEATURES_H_
|
---|
10 | #define _CPU_COMMON_FEATURES_H_
|
---|
11 |
|
---|
12 | #include <PiDxe.h>
|
---|
13 |
|
---|
14 | #include <Library/BaseLib.h>
|
---|
15 | #include <Library/PcdLib.h>
|
---|
16 | #include <Library/DebugLib.h>
|
---|
17 | #include <Library/RegisterCpuFeaturesLib.h>
|
---|
18 | #include <Library/BaseMemoryLib.h>
|
---|
19 | #include <Library/MemoryAllocationLib.h>
|
---|
20 | #include <Library/LocalApicLib.h>
|
---|
21 |
|
---|
22 | #include <Register/Intel/Cpuid.h>
|
---|
23 | #include <Register/Intel/Msr.h>
|
---|
24 |
|
---|
25 | /**
|
---|
26 | Prepares for the data used by CPU feature detection and initialization.
|
---|
27 |
|
---|
28 | @param[in] NumberOfProcessors The number of CPUs in the platform.
|
---|
29 |
|
---|
30 | @return Pointer to a buffer of CPU related configuration data.
|
---|
31 |
|
---|
32 | @note This service could be called by BSP only.
|
---|
33 | **/
|
---|
34 | VOID *
|
---|
35 | EFIAPI
|
---|
36 | AesniGetConfigData (
|
---|
37 | IN UINTN NumberOfProcessors
|
---|
38 | );
|
---|
39 |
|
---|
40 | /**
|
---|
41 | Detects if AESNI feature supported on current processor.
|
---|
42 |
|
---|
43 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
44 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
45 | structure for the CPU executing this function.
|
---|
46 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
47 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
48 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
49 | RegisterCpuFeature().
|
---|
50 |
|
---|
51 | @retval TRUE AESNI feature is supported.
|
---|
52 | @retval FALSE AESNI feature is not supported.
|
---|
53 |
|
---|
54 | @note This service could be called by BSP/APs.
|
---|
55 | **/
|
---|
56 | BOOLEAN
|
---|
57 | EFIAPI
|
---|
58 | AesniSupport (
|
---|
59 | IN UINTN ProcessorNumber,
|
---|
60 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
61 | IN VOID *ConfigData OPTIONAL
|
---|
62 | );
|
---|
63 |
|
---|
64 | /**
|
---|
65 | Initializes AESNI feature to specific state.
|
---|
66 |
|
---|
67 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
68 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
69 | structure for the CPU executing this function.
|
---|
70 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
71 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
72 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
73 | RegisterCpuFeature().
|
---|
74 | @param[in] State If TRUE, then the AESNI feature must be enabled.
|
---|
75 | If FALSE, then the AESNI feature must be disabled.
|
---|
76 |
|
---|
77 | @retval RETURN_SUCCESS AESNI feature is initialized.
|
---|
78 |
|
---|
79 | @note This service could be called by BSP only.
|
---|
80 | **/
|
---|
81 | RETURN_STATUS
|
---|
82 | EFIAPI
|
---|
83 | AesniInitialize (
|
---|
84 | IN UINTN ProcessorNumber,
|
---|
85 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
86 | IN VOID *ConfigData, OPTIONAL
|
---|
87 | IN BOOLEAN State
|
---|
88 | );
|
---|
89 |
|
---|
90 | /**
|
---|
91 | Prepares for the data used by CPU feature detection and initialization.
|
---|
92 |
|
---|
93 | @param[in] NumberOfProcessors The number of CPUs in the platform.
|
---|
94 |
|
---|
95 | @return Pointer to a buffer of CPU related configuration data.
|
---|
96 |
|
---|
97 | @note This service could be called by BSP only.
|
---|
98 | **/
|
---|
99 | VOID *
|
---|
100 | EFIAPI
|
---|
101 | ClockModulationGetConfigData (
|
---|
102 | IN UINTN NumberOfProcessors
|
---|
103 | );
|
---|
104 |
|
---|
105 | /**
|
---|
106 | Detects if Clock Modulation feature supported on current processor.
|
---|
107 |
|
---|
108 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
109 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
110 | structure for the CPU executing this function.
|
---|
111 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
112 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
113 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
114 | RegisterCpuFeature().
|
---|
115 |
|
---|
116 | @retval TRUE Clock Modulation feature is supported.
|
---|
117 | @retval FALSE Clock Modulation feature is not supported.
|
---|
118 |
|
---|
119 | @note This service could be called by BSP/APs.
|
---|
120 | **/
|
---|
121 | BOOLEAN
|
---|
122 | EFIAPI
|
---|
123 | ClockModulationSupport (
|
---|
124 | IN UINTN ProcessorNumber,
|
---|
125 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
126 | IN VOID *ConfigData OPTIONAL
|
---|
127 | );
|
---|
128 |
|
---|
129 | /**
|
---|
130 | Initializes Clock Modulation feature to specific state.
|
---|
131 |
|
---|
132 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
133 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
134 | structure for the CPU executing this function.
|
---|
135 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
136 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
137 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
138 | RegisterCpuFeature().
|
---|
139 | @param[in] State If TRUE, then the Clock Modulation feature must be enabled.
|
---|
140 | If FALSE, then the Clock Modulation feature must be disabled.
|
---|
141 |
|
---|
142 | @retval RETURN_SUCCESS Clock Modulation feature is initialized.
|
---|
143 |
|
---|
144 | @note This service could be called by BSP only.
|
---|
145 | **/
|
---|
146 | RETURN_STATUS
|
---|
147 | EFIAPI
|
---|
148 | ClockModulationInitialize (
|
---|
149 | IN UINTN ProcessorNumber,
|
---|
150 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
151 | IN VOID *ConfigData, OPTIONAL
|
---|
152 | IN BOOLEAN State
|
---|
153 | );
|
---|
154 |
|
---|
155 | /**
|
---|
156 | Detects if Enhanced Intel SpeedStep feature supported on current processor.
|
---|
157 |
|
---|
158 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
159 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
160 | structure for the CPU executing this function.
|
---|
161 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
162 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
163 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
164 | RegisterCpuFeature().
|
---|
165 |
|
---|
166 | @retval TRUE Enhanced Intel SpeedStep feature is supported.
|
---|
167 | @retval FALSE Enhanced Intel SpeedStep feature is not supported.
|
---|
168 |
|
---|
169 | @note This service could be called by BSP/APs.
|
---|
170 | **/
|
---|
171 | BOOLEAN
|
---|
172 | EFIAPI
|
---|
173 | EistSupport (
|
---|
174 | IN UINTN ProcessorNumber,
|
---|
175 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
176 | IN VOID *ConfigData OPTIONAL
|
---|
177 | );
|
---|
178 |
|
---|
179 | /**
|
---|
180 | Initializes Enhanced Intel SpeedStep feature to specific state.
|
---|
181 |
|
---|
182 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
183 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
184 | structure for the CPU executing this function.
|
---|
185 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
186 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
187 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
188 | RegisterCpuFeature().
|
---|
189 | @param[in] State If TRUE, then the Enhanced Intel SpeedStep feature
|
---|
190 | must be enabled.
|
---|
191 | If FALSE, then the Enhanced Intel SpeedStep feature
|
---|
192 | must be disabled.
|
---|
193 |
|
---|
194 | @retval RETURN_SUCCESS Enhanced Intel SpeedStep feature is initialized.
|
---|
195 |
|
---|
196 | @note This service could be called by BSP only.
|
---|
197 | **/
|
---|
198 | RETURN_STATUS
|
---|
199 | EFIAPI
|
---|
200 | EistInitialize (
|
---|
201 | IN UINTN ProcessorNumber,
|
---|
202 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
203 | IN VOID *ConfigData, OPTIONAL
|
---|
204 | IN BOOLEAN State
|
---|
205 | );
|
---|
206 |
|
---|
207 | /**
|
---|
208 | Detects if Execute Disable feature supported on current processor.
|
---|
209 |
|
---|
210 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
211 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
212 | structure for the CPU executing this function.
|
---|
213 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
214 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
215 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
216 | RegisterCpuFeature().
|
---|
217 |
|
---|
218 | @retval TRUE Execute Disable feature is supported.
|
---|
219 | @retval FALSE Execute Disable feature is not supported.
|
---|
220 |
|
---|
221 | @note This service could be called by BSP/APs.
|
---|
222 | **/
|
---|
223 | BOOLEAN
|
---|
224 | EFIAPI
|
---|
225 | ExecuteDisableSupport (
|
---|
226 | IN UINTN ProcessorNumber,
|
---|
227 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
228 | IN VOID *ConfigData OPTIONAL
|
---|
229 | );
|
---|
230 |
|
---|
231 | /**
|
---|
232 | Initializes Execute Disable feature to specific state.
|
---|
233 |
|
---|
234 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
235 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
236 | structure for the CPU executing this function.
|
---|
237 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
238 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
239 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
240 | RegisterCpuFeature().
|
---|
241 | @param[in] State If TRUE, then the Execute Disable feature must be enabled.
|
---|
242 | If FALSE, then the Execute Disable feature must be disabled.
|
---|
243 |
|
---|
244 | @retval RETURN_SUCCESS Execute Disable feature is initialized.
|
---|
245 |
|
---|
246 | @note This service could be called by BSP only.
|
---|
247 | **/
|
---|
248 | RETURN_STATUS
|
---|
249 | EFIAPI
|
---|
250 | ExecuteDisableInitialize (
|
---|
251 | IN UINTN ProcessorNumber,
|
---|
252 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
253 | IN VOID *ConfigData, OPTIONAL
|
---|
254 | IN BOOLEAN State
|
---|
255 | );
|
---|
256 |
|
---|
257 | /**
|
---|
258 | Initializes Fast-Strings feature to specific state.
|
---|
259 |
|
---|
260 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
261 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
262 | structure for the CPU executing this function.
|
---|
263 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
264 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
265 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
266 | RegisterCpuFeature().
|
---|
267 | @param[in] State If TRUE, then the Fast-Strings feature must be enabled.
|
---|
268 | If FALSE, then the Fast-Strings feature must be disabled.
|
---|
269 |
|
---|
270 | @retval RETURN_SUCCESS Fast-Strings feature is initialized.
|
---|
271 |
|
---|
272 | @note This service could be called by BSP only.
|
---|
273 | **/
|
---|
274 | RETURN_STATUS
|
---|
275 | EFIAPI
|
---|
276 | FastStringsInitialize (
|
---|
277 | IN UINTN ProcessorNumber,
|
---|
278 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
279 | IN VOID *ConfigData, OPTIONAL
|
---|
280 | IN BOOLEAN State
|
---|
281 | );
|
---|
282 |
|
---|
283 | /**
|
---|
284 | Detects if MONITOR/MWAIT feature supported on current processor.
|
---|
285 |
|
---|
286 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
287 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
288 | structure for the CPU executing this function.
|
---|
289 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
290 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
291 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
292 | RegisterCpuFeature().
|
---|
293 |
|
---|
294 | @retval TRUE MONITOR/MWAIT feature is supported.
|
---|
295 | @retval FALSE MONITOR/MWAIT feature is not supported.
|
---|
296 |
|
---|
297 | @note This service could be called by BSP/APs.
|
---|
298 | **/
|
---|
299 | BOOLEAN
|
---|
300 | EFIAPI
|
---|
301 | MonitorMwaitSupport (
|
---|
302 | IN UINTN ProcessorNumber,
|
---|
303 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
304 | IN VOID *ConfigData OPTIONAL
|
---|
305 | );
|
---|
306 |
|
---|
307 | /**
|
---|
308 | Initializes MONITOR/MWAIT feature to specific state.
|
---|
309 |
|
---|
310 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
311 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
312 | structure for the CPU executing this function.
|
---|
313 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
314 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
315 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
316 | RegisterCpuFeature().
|
---|
317 | @param[in] State If TRUE, then the MONITOR/MWAIT feature must be enabled.
|
---|
318 | If FALSE, then the MONITOR/MWAIT feature must be disabled.
|
---|
319 |
|
---|
320 | @retval RETURN_SUCCESS MONITOR/MWAIT feature is initialized.
|
---|
321 |
|
---|
322 | @note This service could be called by BSP only.
|
---|
323 | **/
|
---|
324 | RETURN_STATUS
|
---|
325 | EFIAPI
|
---|
326 | MonitorMwaitInitialize (
|
---|
327 | IN UINTN ProcessorNumber,
|
---|
328 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
329 | IN VOID *ConfigData, OPTIONAL
|
---|
330 | IN BOOLEAN State
|
---|
331 | );
|
---|
332 |
|
---|
333 | /**
|
---|
334 | Detects if VMX feature supported on current processor.
|
---|
335 |
|
---|
336 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
337 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
338 | structure for the CPU executing this function.
|
---|
339 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
340 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
341 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
342 | RegisterCpuFeature().
|
---|
343 |
|
---|
344 | @retval TRUE VMX feature is supported.
|
---|
345 | @retval FALSE VMX feature is not supported.
|
---|
346 |
|
---|
347 | @note This service could be called by BSP/APs.
|
---|
348 | **/
|
---|
349 | BOOLEAN
|
---|
350 | EFIAPI
|
---|
351 | VmxSupport (
|
---|
352 | IN UINTN ProcessorNumber,
|
---|
353 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
354 | IN VOID *ConfigData OPTIONAL
|
---|
355 | );
|
---|
356 |
|
---|
357 | /**
|
---|
358 | Initializes VMX feature to specific state.
|
---|
359 |
|
---|
360 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
361 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
362 | structure for the CPU executing this function.
|
---|
363 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
364 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
365 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
366 | RegisterCpuFeature().
|
---|
367 | @param[in] State If TRUE, then the VMX feature must be enabled.
|
---|
368 | If FALSE, then the VMX feature must be disabled.
|
---|
369 |
|
---|
370 | @retval RETURN_SUCCESS VMX feature is initialized.
|
---|
371 |
|
---|
372 | @note This service could be called by BSP only.
|
---|
373 | **/
|
---|
374 | RETURN_STATUS
|
---|
375 | EFIAPI
|
---|
376 | VmxInitialize (
|
---|
377 | IN UINTN ProcessorNumber,
|
---|
378 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
379 | IN VOID *ConfigData, OPTIONAL
|
---|
380 | IN BOOLEAN State
|
---|
381 | );
|
---|
382 |
|
---|
383 | /**
|
---|
384 | Detects if Lock Feature Control Register feature supported on current processor.
|
---|
385 |
|
---|
386 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
387 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
388 | structure for the CPU executing this function.
|
---|
389 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
390 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
391 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
392 | RegisterCpuFeature().
|
---|
393 |
|
---|
394 | @retval TRUE Lock Feature Control Register feature is supported.
|
---|
395 | @retval FALSE Lock Feature Control Register feature is not supported.
|
---|
396 |
|
---|
397 | @note This service could be called by BSP/APs.
|
---|
398 | **/
|
---|
399 | BOOLEAN
|
---|
400 | EFIAPI
|
---|
401 | LockFeatureControlRegisterSupport (
|
---|
402 | IN UINTN ProcessorNumber,
|
---|
403 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
404 | IN VOID *ConfigData OPTIONAL
|
---|
405 | );
|
---|
406 |
|
---|
407 | /**
|
---|
408 | Initializes Lock Feature Control Register feature to specific state.
|
---|
409 |
|
---|
410 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
411 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
412 | structure for the CPU executing this function.
|
---|
413 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
414 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
415 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
416 | RegisterCpuFeature().
|
---|
417 | @param[in] State If TRUE, then the Lock Feature Control Register feature must be enabled.
|
---|
418 | If FALSE, then the Lock Feature Control Register feature must be disabled.
|
---|
419 |
|
---|
420 | @retval RETURN_SUCCESS Lock Feature Control Register feature is initialized.
|
---|
421 |
|
---|
422 | @note This service could be called by BSP only.
|
---|
423 | **/
|
---|
424 | RETURN_STATUS
|
---|
425 | EFIAPI
|
---|
426 | LockFeatureControlRegisterInitialize (
|
---|
427 | IN UINTN ProcessorNumber,
|
---|
428 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
429 | IN VOID *ConfigData, OPTIONAL
|
---|
430 | IN BOOLEAN State
|
---|
431 | );
|
---|
432 |
|
---|
433 | /**
|
---|
434 | Detects if SMX feature supported on current processor.
|
---|
435 |
|
---|
436 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
437 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
438 | structure for the CPU executing this function.
|
---|
439 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
440 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
441 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
442 | RegisterCpuFeature().
|
---|
443 |
|
---|
444 | @retval TRUE SMX feature is supported.
|
---|
445 | @retval FALSE SMX feature is not supported.
|
---|
446 |
|
---|
447 | @note This service could be called by BSP/APs.
|
---|
448 | **/
|
---|
449 | BOOLEAN
|
---|
450 | EFIAPI
|
---|
451 | SmxSupport (
|
---|
452 | IN UINTN ProcessorNumber,
|
---|
453 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
454 | IN VOID *ConfigData OPTIONAL
|
---|
455 | );
|
---|
456 |
|
---|
457 | /**
|
---|
458 | Initializes SMX feature to specific state.
|
---|
459 |
|
---|
460 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
461 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
462 | structure for the CPU executing this function.
|
---|
463 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
464 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
465 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
466 | RegisterCpuFeature().
|
---|
467 | @param[in] State If TRUE, then SMX feature must be enabled.
|
---|
468 | If FALSE, then SMX feature must be disabled.
|
---|
469 |
|
---|
470 | @retval RETURN_SUCCESS SMX feature is initialized.
|
---|
471 | @retval RETURN_UNSUPPORTED VMX not initialized.
|
---|
472 |
|
---|
473 | @note This service could be called by BSP only.
|
---|
474 | **/
|
---|
475 | RETURN_STATUS
|
---|
476 | EFIAPI
|
---|
477 | SmxInitialize (
|
---|
478 | IN UINTN ProcessorNumber,
|
---|
479 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
480 | IN VOID *ConfigData, OPTIONAL
|
---|
481 | IN BOOLEAN State
|
---|
482 | );
|
---|
483 |
|
---|
484 | /**
|
---|
485 | Detects if LimitCpuidMaxval feature supported on current processor.
|
---|
486 |
|
---|
487 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
488 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
489 | structure for the CPU executing this function.
|
---|
490 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
491 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
492 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
493 | RegisterCpuFeature().
|
---|
494 |
|
---|
495 | @retval TRUE LimitCpuidMaxval feature is supported.
|
---|
496 | @retval FALSE LimitCpuidMaxval feature is not supported.
|
---|
497 |
|
---|
498 | @note This service could be called by BSP/APs.
|
---|
499 | **/
|
---|
500 | BOOLEAN
|
---|
501 | EFIAPI
|
---|
502 | LimitCpuidMaxvalSupport (
|
---|
503 | IN UINTN ProcessorNumber,
|
---|
504 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
505 | IN VOID *ConfigData OPTIONAL
|
---|
506 | );
|
---|
507 |
|
---|
508 | /**
|
---|
509 | Initializes LimitCpuidMaxval feature to specific state.
|
---|
510 |
|
---|
511 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
512 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
513 | structure for the CPU executing this function.
|
---|
514 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
515 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
516 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
517 | RegisterCpuFeature().
|
---|
518 | @param[in] State If TRUE, then the LimitCpuidMaxval feature must be enabled.
|
---|
519 | If FALSE, then the LimitCpuidMaxval feature must be disabled.
|
---|
520 |
|
---|
521 | @retval RETURN_SUCCESS LimitCpuidMaxval feature is initialized.
|
---|
522 |
|
---|
523 | @note This service could be called by BSP only.
|
---|
524 | **/
|
---|
525 | RETURN_STATUS
|
---|
526 | EFIAPI
|
---|
527 | LimitCpuidMaxvalInitialize (
|
---|
528 | IN UINTN ProcessorNumber,
|
---|
529 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
530 | IN VOID *ConfigData, OPTIONAL
|
---|
531 | IN BOOLEAN State
|
---|
532 | );
|
---|
533 |
|
---|
534 | /**
|
---|
535 | Detects if Machine Check Exception feature supported on current processor.
|
---|
536 |
|
---|
537 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
538 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
539 | structure for the CPU executing this function.
|
---|
540 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
541 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
542 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
543 | RegisterCpuFeature().
|
---|
544 |
|
---|
545 | @retval TRUE Machine Check Exception feature is supported.
|
---|
546 | @retval FALSE Machine Check Exception feature is not supported.
|
---|
547 |
|
---|
548 | @note This service could be called by BSP/APs.
|
---|
549 | **/
|
---|
550 | BOOLEAN
|
---|
551 | EFIAPI
|
---|
552 | MceSupport (
|
---|
553 | IN UINTN ProcessorNumber,
|
---|
554 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
555 | IN VOID *ConfigData OPTIONAL
|
---|
556 | );
|
---|
557 |
|
---|
558 | /**
|
---|
559 | Initializes Machine Check Exception feature to specific state.
|
---|
560 |
|
---|
561 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
562 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
563 | structure for the CPU executing this function.
|
---|
564 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
565 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
566 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
567 | RegisterCpuFeature().
|
---|
568 | @param[in] State If TRUE, then the Machine Check Exception feature must be enabled.
|
---|
569 | If FALSE, then the Machine Check Exception feature must be disabled.
|
---|
570 |
|
---|
571 | @retval RETURN_SUCCESS Machine Check Exception feature is initialized.
|
---|
572 |
|
---|
573 | @note This service could be called by BSP only.
|
---|
574 | **/
|
---|
575 | RETURN_STATUS
|
---|
576 | EFIAPI
|
---|
577 | MceInitialize (
|
---|
578 | IN UINTN ProcessorNumber,
|
---|
579 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
580 | IN VOID *ConfigData, OPTIONAL
|
---|
581 | IN BOOLEAN State
|
---|
582 | );
|
---|
583 |
|
---|
584 | /**
|
---|
585 | Detects if Machine Check Architecture feature supported on current processor.
|
---|
586 |
|
---|
587 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
588 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
589 | structure for the CPU executing this function.
|
---|
590 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
591 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
592 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
593 | RegisterCpuFeature().
|
---|
594 |
|
---|
595 | @retval TRUE Machine Check Architecture feature is supported.
|
---|
596 | @retval FALSE Machine Check Architecture feature is not supported.
|
---|
597 |
|
---|
598 | @note This service could be called by BSP/APs.
|
---|
599 | **/
|
---|
600 | BOOLEAN
|
---|
601 | EFIAPI
|
---|
602 | McaSupport (
|
---|
603 | IN UINTN ProcessorNumber,
|
---|
604 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
605 | IN VOID *ConfigData OPTIONAL
|
---|
606 | );
|
---|
607 |
|
---|
608 | /**
|
---|
609 | Initializes Machine Check Architecture feature to specific state.
|
---|
610 |
|
---|
611 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
612 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
613 | structure for the CPU executing this function.
|
---|
614 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
615 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
616 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
617 | RegisterCpuFeature().
|
---|
618 | @param[in] State If TRUE, then the Machine Check Architecture feature must be enabled.
|
---|
619 | If FALSE, then the Machine Check Architecture feature must be disabled.
|
---|
620 |
|
---|
621 | @retval RETURN_SUCCESS Machine Check Architecture feature is initialized.
|
---|
622 |
|
---|
623 | @note This service could be called by BSP only.
|
---|
624 | **/
|
---|
625 | RETURN_STATUS
|
---|
626 | EFIAPI
|
---|
627 | McaInitialize (
|
---|
628 | IN UINTN ProcessorNumber,
|
---|
629 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
630 | IN VOID *ConfigData, OPTIONAL
|
---|
631 | IN BOOLEAN State
|
---|
632 | );
|
---|
633 |
|
---|
634 | /**
|
---|
635 | Detects if IA32_MCG_CTL feature supported on current processor.
|
---|
636 |
|
---|
637 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
638 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
639 | structure for the CPU executing this function.
|
---|
640 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
641 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
642 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
643 | RegisterCpuFeature().
|
---|
644 |
|
---|
645 | @retval TRUE IA32_MCG_CTL feature is supported.
|
---|
646 | @retval FALSE IA32_MCG_CTL feature is not supported.
|
---|
647 |
|
---|
648 | @note This service could be called by BSP/APs.
|
---|
649 | **/
|
---|
650 | BOOLEAN
|
---|
651 | EFIAPI
|
---|
652 | McgCtlSupport (
|
---|
653 | IN UINTN ProcessorNumber,
|
---|
654 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
655 | IN VOID *ConfigData OPTIONAL
|
---|
656 | );
|
---|
657 |
|
---|
658 | /**
|
---|
659 | Initializes IA32_MCG_CTL feature to specific state.
|
---|
660 |
|
---|
661 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
662 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
663 | structure for the CPU executing this function.
|
---|
664 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
665 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
666 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
667 | RegisterCpuFeature().
|
---|
668 | @param[in] State If TRUE, then the IA32_MCG_CTL feature must be enabled.
|
---|
669 | If FALSE, then the IA32_MCG_CTL feature must be disabled.
|
---|
670 |
|
---|
671 | @retval RETURN_SUCCESS IA32_MCG_CTL feature is initialized.
|
---|
672 |
|
---|
673 | @note This service could be called by BSP only.
|
---|
674 | **/
|
---|
675 | RETURN_STATUS
|
---|
676 | EFIAPI
|
---|
677 | McgCtlInitialize (
|
---|
678 | IN UINTN ProcessorNumber,
|
---|
679 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
680 | IN VOID *ConfigData, OPTIONAL
|
---|
681 | IN BOOLEAN State
|
---|
682 | );
|
---|
683 |
|
---|
684 | /**
|
---|
685 | Detects if Pending Break feature supported on current processor.
|
---|
686 |
|
---|
687 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
688 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
689 | structure for the CPU executing this function.
|
---|
690 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
691 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
692 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
693 | RegisterCpuFeature().
|
---|
694 |
|
---|
695 | @retval TRUE Pending Break feature is supported.
|
---|
696 | @retval FALSE Pending Break feature is not supported.
|
---|
697 |
|
---|
698 | @note This service could be called by BSP/APs.
|
---|
699 | **/
|
---|
700 | BOOLEAN
|
---|
701 | EFIAPI
|
---|
702 | PendingBreakSupport (
|
---|
703 | IN UINTN ProcessorNumber,
|
---|
704 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
705 | IN VOID *ConfigData OPTIONAL
|
---|
706 | );
|
---|
707 |
|
---|
708 | /**
|
---|
709 | Initializes Pending Break feature to specific state.
|
---|
710 |
|
---|
711 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
712 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
713 | structure for the CPU executing this function.
|
---|
714 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
715 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
716 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
717 | RegisterCpuFeature().
|
---|
718 | @param[in] State If TRUE, then the Pending Break feature must be enabled.
|
---|
719 | If FALSE, then the Pending Break feature must be disabled.
|
---|
720 |
|
---|
721 | @retval RETURN_SUCCESS Pending Break feature is initialized.
|
---|
722 |
|
---|
723 | @note This service could be called by BSP only.
|
---|
724 | **/
|
---|
725 | RETURN_STATUS
|
---|
726 | EFIAPI
|
---|
727 | PendingBreakInitialize (
|
---|
728 | IN UINTN ProcessorNumber,
|
---|
729 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
730 | IN VOID *ConfigData, OPTIONAL
|
---|
731 | IN BOOLEAN State
|
---|
732 | );
|
---|
733 |
|
---|
734 | /**
|
---|
735 | Detects if C1E feature supported on current processor.
|
---|
736 |
|
---|
737 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
738 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
739 | structure for the CPU executing this function.
|
---|
740 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
741 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
742 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
743 | RegisterCpuFeature().
|
---|
744 |
|
---|
745 | @retval TRUE C1E feature is supported.
|
---|
746 | @retval FALSE C1E feature is not supported.
|
---|
747 |
|
---|
748 | @note This service could be called by BSP/APs.
|
---|
749 | **/
|
---|
750 | BOOLEAN
|
---|
751 | EFIAPI
|
---|
752 | C1eSupport (
|
---|
753 | IN UINTN ProcessorNumber,
|
---|
754 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
755 | IN VOID *ConfigData OPTIONAL
|
---|
756 | );
|
---|
757 |
|
---|
758 | /**
|
---|
759 | Initializes C1E feature to specific state.
|
---|
760 |
|
---|
761 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
762 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
763 | structure for the CPU executing this function.
|
---|
764 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
765 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
766 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
767 | RegisterCpuFeature().
|
---|
768 | @param[in] State If TRUE, then the C1E feature must be enabled.
|
---|
769 | If FALSE, then the C1E feature must be disabled.
|
---|
770 |
|
---|
771 | @retval RETURN_SUCCESS C1E feature is initialized.
|
---|
772 |
|
---|
773 | @note This service could be called by BSP only.
|
---|
774 | **/
|
---|
775 | RETURN_STATUS
|
---|
776 | EFIAPI
|
---|
777 | C1eInitialize (
|
---|
778 | IN UINTN ProcessorNumber,
|
---|
779 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
780 | IN VOID *ConfigData, OPTIONAL
|
---|
781 | IN BOOLEAN State
|
---|
782 | );
|
---|
783 |
|
---|
784 | /**
|
---|
785 | Prepares for the data used by CPU feature detection and initialization.
|
---|
786 |
|
---|
787 | @param[in] NumberOfProcessors The number of CPUs in the platform.
|
---|
788 |
|
---|
789 | @return Pointer to a buffer of CPU related configuration data.
|
---|
790 |
|
---|
791 | @note This service could be called by BSP only.
|
---|
792 | **/
|
---|
793 | VOID *
|
---|
794 | EFIAPI
|
---|
795 | X2ApicGetConfigData (
|
---|
796 | IN UINTN NumberOfProcessors
|
---|
797 | );
|
---|
798 |
|
---|
799 | /**
|
---|
800 | Detects if X2Apci feature supported on current processor.
|
---|
801 |
|
---|
802 | Detect if X2Apci has been already enabled.
|
---|
803 |
|
---|
804 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
805 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
806 | structure for the CPU executing this function.
|
---|
807 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
808 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
809 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
810 | RegisterCpuFeature().
|
---|
811 |
|
---|
812 | @retval TRUE X2Apci feature is supported.
|
---|
813 | @retval FALSE X2Apci feature is not supported.
|
---|
814 |
|
---|
815 | @note This service could be called by BSP/APs.
|
---|
816 | **/
|
---|
817 | BOOLEAN
|
---|
818 | EFIAPI
|
---|
819 | X2ApicSupport (
|
---|
820 | IN UINTN ProcessorNumber,
|
---|
821 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
822 | IN VOID *ConfigData OPTIONAL
|
---|
823 | );
|
---|
824 |
|
---|
825 | /**
|
---|
826 | Initializes X2Apci feature to specific state.
|
---|
827 |
|
---|
828 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
829 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
830 | structure for the CPU executing this function.
|
---|
831 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
832 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
833 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
834 | RegisterCpuFeature().
|
---|
835 | @param[in] State If TRUE, then the X2Apci feature must be enabled.
|
---|
836 | If FALSE, then the X2Apci feature must be disabled.
|
---|
837 |
|
---|
838 | @retval RETURN_SUCCESS X2Apci feature is initialized.
|
---|
839 |
|
---|
840 | @note This service could be called by BSP only.
|
---|
841 | **/
|
---|
842 | RETURN_STATUS
|
---|
843 | EFIAPI
|
---|
844 | X2ApicInitialize (
|
---|
845 | IN UINTN ProcessorNumber,
|
---|
846 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
847 | IN VOID *ConfigData, OPTIONAL
|
---|
848 | IN BOOLEAN State
|
---|
849 | );
|
---|
850 |
|
---|
851 | /**
|
---|
852 | Prepares for the data used by CPU feature detection and initialization.
|
---|
853 |
|
---|
854 | @param[in] NumberOfProcessors The number of CPUs in the platform.
|
---|
855 |
|
---|
856 | @return Pointer to a buffer of CPU related configuration data.
|
---|
857 |
|
---|
858 | @note This service could be called by BSP only.
|
---|
859 | **/
|
---|
860 | VOID *
|
---|
861 | EFIAPI
|
---|
862 | PpinGetConfigData (
|
---|
863 | IN UINTN NumberOfProcessors
|
---|
864 | );
|
---|
865 |
|
---|
866 | /**
|
---|
867 | Detects if Protected Processor Inventory Number feature supported on current
|
---|
868 | processor.
|
---|
869 |
|
---|
870 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
871 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
872 | structure for the CPU executing this function.
|
---|
873 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
874 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
875 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
876 | RegisterCpuFeature().
|
---|
877 |
|
---|
878 | @retval TRUE Protected Processor Inventory Number feature is supported.
|
---|
879 | @retval FALSE Protected Processor Inventory Number feature is not supported.
|
---|
880 |
|
---|
881 | @note This service could be called by BSP/APs.
|
---|
882 | **/
|
---|
883 | BOOLEAN
|
---|
884 | EFIAPI
|
---|
885 | PpinSupport (
|
---|
886 | IN UINTN ProcessorNumber,
|
---|
887 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
888 | IN VOID *ConfigData OPTIONAL
|
---|
889 | );
|
---|
890 |
|
---|
891 | /**
|
---|
892 | Initializes Protected Processor Inventory Number feature to specific state.
|
---|
893 |
|
---|
894 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
895 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
896 | structure for the CPU executing this function.
|
---|
897 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
898 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
899 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
900 | RegisterCpuFeature().
|
---|
901 | @param[in] State If TRUE, then the Protected Processor Inventory
|
---|
902 | Number feature must be enabled.
|
---|
903 | If FALSE, then the Protected Processor Inventory
|
---|
904 | Number feature must be disabled.
|
---|
905 |
|
---|
906 | @retval RETURN_SUCCESS Protected Processor Inventory Number feature is
|
---|
907 | initialized.
|
---|
908 | @retval RETURN_DEVICE_ERROR Device can't change state because it has been
|
---|
909 | locked.
|
---|
910 |
|
---|
911 | **/
|
---|
912 | RETURN_STATUS
|
---|
913 | EFIAPI
|
---|
914 | PpinInitialize (
|
---|
915 | IN UINTN ProcessorNumber,
|
---|
916 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
917 | IN VOID *ConfigData, OPTIONAL
|
---|
918 | IN BOOLEAN State
|
---|
919 | );
|
---|
920 |
|
---|
921 | /**
|
---|
922 | Detects if Local machine check exception feature supported on current
|
---|
923 | processor.
|
---|
924 |
|
---|
925 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
926 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
927 | structure for the CPU executing this function.
|
---|
928 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
929 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
930 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
931 | RegisterCpuFeature().
|
---|
932 |
|
---|
933 | @retval TRUE Local machine check exception feature is supported.
|
---|
934 | @retval FALSE Local machine check exception feature is not supported.
|
---|
935 |
|
---|
936 | @note This service could be called by BSP/APs.
|
---|
937 | **/
|
---|
938 | BOOLEAN
|
---|
939 | EFIAPI
|
---|
940 | LmceSupport (
|
---|
941 | IN UINTN ProcessorNumber,
|
---|
942 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
943 | IN VOID *ConfigData OPTIONAL
|
---|
944 | );
|
---|
945 |
|
---|
946 | /**
|
---|
947 | Initializes Local machine check exception feature to specific state.
|
---|
948 |
|
---|
949 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
950 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
951 | structure for the CPU executing this function.
|
---|
952 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
953 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
954 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
955 | RegisterCpuFeature().
|
---|
956 | @param[in] State If TRUE, then the Local machine check exception
|
---|
957 | feature must be enabled.
|
---|
958 | If FALSE, then the Local machine check exception
|
---|
959 | feature must be disabled.
|
---|
960 |
|
---|
961 | @retval RETURN_SUCCESS Local machine check exception feature is initialized.
|
---|
962 |
|
---|
963 | **/
|
---|
964 | RETURN_STATUS
|
---|
965 | EFIAPI
|
---|
966 | LmceInitialize (
|
---|
967 | IN UINTN ProcessorNumber,
|
---|
968 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
969 | IN VOID *ConfigData, OPTIONAL
|
---|
970 | IN BOOLEAN State
|
---|
971 | );
|
---|
972 |
|
---|
973 | /**
|
---|
974 | Prepares for the data used by CPU feature detection and initialization.
|
---|
975 |
|
---|
976 | @param[in] NumberOfProcessors The number of CPUs in the platform.
|
---|
977 |
|
---|
978 | @return Pointer to a buffer of CPU related configuration data.
|
---|
979 |
|
---|
980 | @note This service could be called by BSP only.
|
---|
981 | **/
|
---|
982 | VOID *
|
---|
983 | EFIAPI
|
---|
984 | ProcTraceGetConfigData (
|
---|
985 | IN UINTN NumberOfProcessors
|
---|
986 | );
|
---|
987 |
|
---|
988 | /**
|
---|
989 | Detects if Intel Processor Trace feature supported on current processor.
|
---|
990 |
|
---|
991 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
992 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
993 | structure for the CPU executing this function.
|
---|
994 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
995 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
996 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
997 | RegisterCpuFeature().
|
---|
998 |
|
---|
999 | @retval TRUE Processor Trace feature is supported.
|
---|
1000 | @retval FALSE Processor Trace feature is not supported.
|
---|
1001 |
|
---|
1002 | @note This service could be called by BSP/APs.
|
---|
1003 | **/
|
---|
1004 | BOOLEAN
|
---|
1005 | EFIAPI
|
---|
1006 | ProcTraceSupport (
|
---|
1007 | IN UINTN ProcessorNumber,
|
---|
1008 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
1009 | IN VOID *ConfigData OPTIONAL
|
---|
1010 | );
|
---|
1011 |
|
---|
1012 | /**
|
---|
1013 | Initializes Intel Processor Trace feature to specific state.
|
---|
1014 |
|
---|
1015 | @param[in] ProcessorNumber The index of the CPU executing this function.
|
---|
1016 | @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFORMATION
|
---|
1017 | structure for the CPU executing this function.
|
---|
1018 | @param[in] ConfigData A pointer to the configuration buffer returned
|
---|
1019 | by CPU_FEATURE_GET_CONFIG_DATA. NULL if
|
---|
1020 | CPU_FEATURE_GET_CONFIG_DATA was not provided in
|
---|
1021 | RegisterCpuFeature().
|
---|
1022 | @param[in] State If TRUE, then the Processor Trace feature must be
|
---|
1023 | enabled.
|
---|
1024 | If FALSE, then the Processor Trace feature must be
|
---|
1025 | disabled.
|
---|
1026 |
|
---|
1027 | @retval RETURN_SUCCESS Intel Processor Trace feature is initialized.
|
---|
1028 |
|
---|
1029 | **/
|
---|
1030 | RETURN_STATUS
|
---|
1031 | EFIAPI
|
---|
1032 | ProcTraceInitialize (
|
---|
1033 | IN UINTN ProcessorNumber,
|
---|
1034 | IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo,
|
---|
1035 | IN VOID *ConfigData, OPTIONAL
|
---|
1036 | IN BOOLEAN State
|
---|
1037 | );
|
---|
1038 |
|
---|
1039 | #endif
|
---|