1 /* 2 * Licensed under the terms of the GNU GPL License version 2. 3 * 4 * Intel P6 microcode information. 5 */ 6 7 #include <stdio.h> 8 #include <unistd.h> 9 #include <sys/types.h> 10 #include <x86info.h> 11 #include "intel.h" 12 decode_microcode(struct cpudata * cpu)13void decode_microcode(struct cpudata *cpu) 14 { 15 unsigned long long val = 0; 16 17 if (!user_is_root) 18 return; 19 20 if (cpu->family < 6) 21 return; 22 23 if (read_msr (cpu->number, MSR_IA32_UCODE_REV, &val) == 1) { 24 int ver; 25 26 ver = val >>32; 27 if (ver>0) 28 printf("Microcode version: 0x%016llx\n", val >>32); 29 printf("\n"); 30 } 31 } 32