TianoCore EDK2 master
|
#include "InternalCpuCacheInfoLib.h"
Go to the source code of this file.
Functions | |
VOID | CpuCacheInfoPrintCpuCacheInfoTable (IN CPU_CACHE_INFO *CpuCacheInfo, IN UINTN CpuCacheInfoCount) |
INTN EFIAPI | CpuCacheInfoCompare (IN CONST VOID *Buffer1, IN CONST VOID *Buffer2) |
UINT32 | CpuCacheInfoGetNumberOfPackages (IN CPUID_PROCESSOR_INFO *ProcessorInfo, IN UINTN NumberOfProcessors, IN OUT UINT32 *Package) |
UINTN | CpuCacheInfoGetNumberOfCoreTypePerPackage (IN CPUID_PROCESSOR_INFO *ProcessorInfo, IN UINTN NumberOfProcessors, IN UINTN Package) |
VOID EFIAPI | CpuCacheInfoCollectCoreAndCacheData (IN OUT VOID *Buffer) |
EFI_STATUS | CpuCacheInfoCollectCpuCacheInfoData (IN CPUID_CACHE_DATA *CacheData, IN CPUID_PROCESSOR_INFO *ProcessorInfo, IN UINTN NumberOfProcessors, IN OUT CPU_CACHE_INFO *CacheInfo, IN OUT UINTN *CacheInfoCount) |
EFI_STATUS EFIAPI | GetCpuCacheInfo (IN OUT CPU_CACHE_INFO *CpuCacheInfo, IN OUT UINTN *CpuCacheInfoCount) |
Provides cache info for each package, core type, cache level and cache type.
Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuCacheInfoLib.c.
Collect core and cache information of calling processor via CPUID instructions.
[in,out] | Buffer | The pointer to private data buffer. |
Definition at line 204 of file CpuCacheInfoLib.c.
EFI_STATUS CpuCacheInfoCollectCpuCacheInfoData | ( | IN CPUID_CACHE_DATA * | CacheData, |
IN CPUID_PROCESSOR_INFO * | ProcessorInfo, | ||
IN UINTN | NumberOfProcessors, | ||
IN OUT CPU_CACHE_INFO * | CacheInfo, | ||
IN OUT UINTN * | CacheInfoCount | ||
) |
Collect CacheInfo data from the CacheData.
[in] | CacheData | Pointer to the CacheData array. |
[in] | ProcessorInfo | Pointer to the ProcessorInfo array. |
[in] | NumberOfProcessors | Total number of logical processors in the platform. |
[in,out] | CacheInfo | Pointer to the CacheInfo array. |
[in,out] | CacheInfoCount | As input, point to the length of response CacheInfo array. As output, point to the actual length of response CacheInfo array. |
EFI_SUCCESS | Function completed successfully. |
EFI_OUT_OF_RESOURCES | Required resources could not be allocated. |
EFI_BUFFER_TOO_SMALL | CacheInfoCount is too small to hold the response CacheInfo array. CacheInfoCount has been updated with the length needed to complete the request. |
Definition at line 276 of file CpuCacheInfoLib.c.
Function to compare CPU package ID, core type, cache level and cache type for use in QuickSort.
[in] | Buffer1 | pointer to CPU_CACHE_INFO poiner to compare |
[in] | Buffer2 | pointer to second CPU_CACHE_INFO pointer to compare |
0 | Buffer1 equal to Buffer2 |
1 | Buffer1 is greater than Buffer2 |
-1 | Buffer1 is less than Buffer2 |
Definition at line 62 of file CpuCacheInfoLib.c.
UINTN CpuCacheInfoGetNumberOfCoreTypePerPackage | ( | IN CPUID_PROCESSOR_INFO * | ProcessorInfo, |
IN UINTN | NumberOfProcessors, | ||
IN UINTN | Package | ||
) |
Get the number of CoreType of requested package.
[in] | ProcessorInfo | Pointer to the ProcessorInfo array. |
[in] | NumberOfProcessors | Total number of logical processors in the platform. |
[in] | Package | The requested package number. |
Return | the number of CoreType of requested package. |
Definition at line 148 of file CpuCacheInfoLib.c.
UINT32 CpuCacheInfoGetNumberOfPackages | ( | IN CPUID_PROCESSOR_INFO * | ProcessorInfo, |
IN UINTN | NumberOfProcessors, | ||
IN OUT UINT32 * | Package | ||
) |
Get the total number of package and package ID in the platform.
[in] | ProcessorInfo | Pointer to the ProcessorInfo array. |
[in] | NumberOfProcessors | Total number of logical processors in the platform. |
[in,out] | Package | Pointer to the Package array. |
Return | the total number of package and package ID in the platform. |
Definition at line 101 of file CpuCacheInfoLib.c.
VOID CpuCacheInfoPrintCpuCacheInfoTable | ( | IN CPU_CACHE_INFO * | CpuCacheInfo, |
IN UINTN | CpuCacheInfoCount | ||
) |
Print CpuCacheInfo array.
[in] | CpuCacheInfo | Pointer to the CpuCacheInfo array. |
[in] | CpuCacheInfoCount | The length of CpuCacheInfo array. |
Definition at line 19 of file CpuCacheInfoLib.c.
EFI_STATUS EFIAPI GetCpuCacheInfo | ( | IN OUT CPU_CACHE_INFO * | CpuCacheInfo, |
IN OUT UINTN * | CpuCacheInfoCount | ||
) |
Get CpuCacheInfo data array. The array is sorted by CPU package ID, core type, cache level and cache type.
[in,out] | CpuCacheInfo | Pointer to the CpuCacheInfo array. |
[in,out] | CpuCacheInfoCount | As input, point to the length of response CpuCacheInfo array. As output, point to the actual length of response CpuCacheInfo array. |
EFI_SUCCESS | Function completed successfully. |
EFI_INVALID_PARAMETER | CpuCacheInfoCount is NULL. |
EFI_INVALID_PARAMETER | CpuCacheInfo is NULL while CpuCacheInfoCount contains the value greater than zero. |
EFI_UNSUPPORTED | Processor does not support CPUID_CACHE_PARAMS Leaf. |
EFI_OUT_OF_RESOURCES | Required resources could not be allocated. |
EFI_BUFFER_TOO_SMALL | CpuCacheInfoCount is too small to hold the response CpuCacheInfo array. CpuCacheInfoCount has been updated with the length needed to complete the request. |
Definition at line 420 of file CpuCacheInfoLib.c.