guess whether MSR_PLATFORM_INFO exists or not

This commit is contained in:
NAKAMURA Gou
2015-09-29 18:50:36 +09:00
parent d862f345be
commit f08e0c0054

View File

@ -303,6 +303,10 @@ void init_pstate_and_turbo(void)
uint64_t eax, ecx;
asm volatile("cpuid" : "=a" (eax), "=c" (ecx) : "a" (0x6) : "%rbx", "%rdx");
if (!(ecx & 0x01)) {
/* P-states and/or Turbo Boost are not supported. */
return;
}
/* Query and set max pstate value:
*