]>
git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Include/Library/CpuCacheInfoLib.h
a23b8b12b5eedc4e538b1d06a300dec59344dd0f
2 Header file for CPU Cache info Library.
4 Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _CPU_CACHE_INFO_LIB_H_
10 #define _CPU_CACHE_INFO_LIB_H_
18 // Core type of logical processor.
19 // Value = CPUID.1Ah:EAX[31:24]
23 // Level of the cache that this package's this type of logical processor corresponds to.
24 // Value = CPUID.04h:EAX[07:05]
28 // Type of the cache that this package's this type of logical processor corresponds to.
29 // Value = CPUID.04h:EAX[04:00]
33 // Ways of associativity.
34 // Value = CPUID.04h:EBX[31:22]
38 // Size of single cache that this package's this type of logical processor corresponds to.
39 // Value = (CPUID.04h:EBX[31:22] + 1) * (CPUID.04h:EBX[21:12] + 1) *
40 // (CPUID.04h:EBX[11:00] + 1) * (CPUID.04h:ECX[31:00] + 1)
44 // Number of the cache that this package's this type of logical processor corresponds to.
45 // Have subtracted the number of caches that are shared.
51 Get CpuCacheInfo data array.
53 @param[in, out] CpuCacheInfo Pointer to the CpuCacheInfo array.
54 @param[in, out] CpuCacheInfoCount As input, point to the length of response CpuCacheInfo array.
55 As output, point to the actual length of response CpuCacheInfo array.
57 @retval EFI_SUCCESS Function completed successfully.
58 @retval EFI_INVALID_PARAMETER CpuCacheInfoCount is NULL.
59 @retval EFI_INVALID_PARAMETER CpuCacheInfo is NULL while CpuCacheInfoCount contains the value
61 @retval EFI_UNSUPPORTED Processor does not support CPUID_CACHE_PARAMS Leaf.
62 @retval EFI_NOT_FOUND EDKII_PEI_MP_SERVICES2_PPI or EFI_MP_SERVICES_PROTOCOL interface
64 @retval EFI_OUT_OF_RESOURCES Required resources could not be allocated.
65 @retval EFI_BUFFER_TOO_SMALL CpuCacheInfoCount is too small to hold the response CpuCacheInfo
66 array. CpuCacheInfoCount has been updated with the length needed
67 to complete the request.
72 IN OUT CPU_CACHE_INFO
*CpuCacheInfo
,
73 IN OUT UINTN
*CpuCacheInfoCount