Rev 2071 | Rev 3022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2110 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | } |
49 | } |
50 | 50 | ||
51 | void cpu_print_report(cpu_t *m) |
51 | void cpu_print_report(cpu_t *m) |
52 | { |
52 | { |
53 | char *family_str; |
53 | char *family_str; |
54 | char vendor[2*sizeof(uint64_t)+1]; |
54 | char vendor[2 * sizeof(uint64_t) + 1]; |
55 | 55 | ||
56 | *((uint64_t *) &vendor[0*sizeof(uint64_t)]) = CPU->arch.cpuid0; |
56 | *((uint64_t *) &vendor[0 * sizeof(uint64_t)]) = CPU->arch.cpuid0; |
57 | *((uint64_t *) &vendor[1*sizeof(uint64_t)]) = CPU->arch.cpuid1; |
57 | *((uint64_t *) &vendor[1 * sizeof(uint64_t)]) = CPU->arch.cpuid1; |
58 | vendor[sizeof(vendor)-1] = '\0'; |
58 | vendor[sizeof(vendor) - 1] = '\0'; |
59 | 59 | ||
60 | switch(m->arch.cpuid3.family) { |
60 | switch(m->arch.cpuid3.family) { |
61 | case FAMILY_ITANIUM: |
61 | case FAMILY_ITANIUM: |
62 | family_str = "Itanium"; |
62 | family_str = "Itanium"; |
63 | break; |
63 | break; |
64 | case FAMILY_ITANIUM2: |
64 | case FAMILY_ITANIUM2: |
65 | family_str = "Itanium 2"; |
65 | family_str = "Itanium 2"; |
66 | break; |
66 | break; |
67 | default: |
67 | default: |
68 | family_str = "Unknown"; |
68 | family_str = "Unknown"; |
69 | break; |
69 | break; |
70 | } |
70 | } |
71 | 71 | ||
- | 72 | printf("cpu%d: %s (%s), archrev=%d, model=%d, revision=%d\n", CPU->id, |
|
72 | printf("cpu%d: %s (%s), archrev=%d, model=%d, revision=%d\n", CPU->id, family_str, vendor, CPU->arch.cpuid3.archrev, CPU->arch.cpuid3.model, CPU->arch.cpuid3.revision); |
73 | family_str, vendor, CPU->arch.cpuid3.archrev, CPU->arch.cpuid3.model, |
- | 74 | CPU->arch.cpuid3.revision); |
|
73 | } |
75 | } |
74 | 76 | ||
75 | /** @} |
77 | /** @} |
76 | */ |
78 | */ |