| 343 | #define CPU_BRAND_STRING_LEN 48 |
| 344 | |
| 345 | static int print_cpu_features(void) |
| 346 | { |
| 347 | int error = -1; |
| 348 | #ifndef __DARWIN__ |
| 349 | cpuid_result_t cpuid_regs; |
| 350 | |
| 351 | printf("\n============= AMD CPU features =============\n"); |
| 352 | |
| 353 | if (cpuid(0x80000000) >= 0x80000001) { |
| 354 | cpuid_regs = cpuid_ext(0x80000001, 0x0); |
| 355 | printf("SVM supported : %s\n", |
| 356 | cpuid_regs.ecx & (1 << 2) ? "YES" : "NO"); |
| 357 | printf("SKINIT supported : %s\n", |
| 358 | cpuid_regs.ecx & (1 << 12) ? "YES" : "NO"); |
| 359 | } |
| 360 | |
| 361 | error = 0; |
| 362 | |
| 363 | printf("====================================================\n"); |
| 364 | #endif |
| 365 | return error; |
| 366 | } |
| 367 | |
| 368 | int print_cpu_info(void) |
| 369 | { |
no test coverage detected