Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/bhyvectl/bhyvectl.c
Show First 20 Lines • Show All 651 Lines • ▼ Show 20 Lines | cpu_vendor_intel(void) | ||||
do_cpuid(0, regs); | do_cpuid(0, regs); | ||||
((u_int *)&cpu_vendor)[0] = regs[1]; | ((u_int *)&cpu_vendor)[0] = regs[1]; | ||||
((u_int *)&cpu_vendor)[1] = regs[3]; | ((u_int *)&cpu_vendor)[1] = regs[3]; | ||||
((u_int *)&cpu_vendor)[2] = regs[2]; | ((u_int *)&cpu_vendor)[2] = regs[2]; | ||||
cpu_vendor[12] = '\0'; | cpu_vendor[12] = '\0'; | ||||
if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { | if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { | ||||
return (false); | return (false); | ||||
} else if (strcmp(cpu_vendor, "HygonGenuine") == 0) { | |||||
return (false); | |||||
} else if (strcmp(cpu_vendor, "GenuineIntel") == 0) { | } else if (strcmp(cpu_vendor, "GenuineIntel") == 0) { | ||||
return (true); | return (true); | ||||
} else { | } else { | ||||
fprintf(stderr, "Unknown cpu vendor \"%s\"\n", cpu_vendor); | fprintf(stderr, "Unknown cpu vendor \"%s\"\n", cpu_vendor); | ||||
exit(1); | exit(1); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,681 Lines • Show Last 20 Lines |