Fix the first problem: CPUID(EAX = 10H, ECX = ResID=1 or 2).EAX Bits 04 - 00: Length of the capacity bit mask for the corresponding ResID using minus-one notation

Tracked-On:#3675
Signed-off-by: Andy <andyx.liu@intel.com>
This commit is contained in:
Andy 2019-09-18 10:16:56 +08:00 committed by wenlingz
parent 0b65b8f05c
commit 857cdb0c4f

View File

@ -44,7 +44,7 @@ int32_t init_cat_cap_info(void)
* CPUID.(EAX=0x10,ECX=ResID):EDX[15:0] reports the maximun CLOS supported
*/
cpuid_subleaf(CPUID_RSD_ALLOCATION, cat_cap_info.res_id, &eax, &ebx, &ecx, &edx);
cat_cap_info.cbm_len = (uint16_t)((eax & 0xfU) + 1U);
cat_cap_info.cbm_len = (uint16_t)((eax & 0x1fU) + 1U);
cat_cap_info.bitmask = ebx;
cat_cap_info.clos_max = (uint16_t)(edx & 0xffffU);