guess whether MSR_PLATFORM_INFO exists or not
This commit is contained in:
@ -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:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user