Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2089 | Rev 2745 | ||
---|---|---|---|
Line 102... | Line 102... | ||
102 | } |
102 | } |
103 | 103 | ||
104 | void cpu_print_report(cpu_t *m) |
104 | void cpu_print_report(cpu_t *m) |
105 | { |
105 | { |
106 | struct data_t *data; |
106 | struct data_t *data; |
107 | int i; |
107 | unsigned int i; |
108 | 108 | ||
109 | if (m->arch.imp_num & 0x80) { |
109 | if (m->arch.imp_num & 0x80) { |
110 | /* Count records */ |
110 | /* Count records */ |
111 | for (i=0;imp_data80[i].vendor;i++) |
111 | for (i = 0; imp_data80[i].vendor; i++); |
112 | ; |
- | |
113 | if ((m->arch.imp_num & 0x7f) >= i) { |
112 | if ((m->arch.imp_num & 0x7f) >= i) { |
114 | printf("imp=%d\n",m->arch.imp_num); |
113 | printf("imp=%d\n", m->arch.imp_num); |
115 | return; |
114 | return; |
116 | } |
115 | } |
117 | data = &imp_data80[m->arch.imp_num & 0x7f]; |
116 | data = &imp_data80[m->arch.imp_num & 0x7f]; |
118 | } else { |
117 | } else { |
119 | for (i=0;imp_data[i].vendor;i++) |
118 | for (i = 0; imp_data[i].vendor; i++); |
120 | ; |
- | |
121 | if (m->arch.imp_num >= i) { |
119 | if (m->arch.imp_num >= i) { |
122 | printf("imp=%d\n",m->arch.imp_num); |
120 | printf("imp=%d\n", m->arch.imp_num); |
123 | return; |
121 | return; |
124 | } |
122 | } |
125 | data = &imp_data[m->arch.imp_num]; |
123 | data = &imp_data[m->arch.imp_num]; |
126 | } |
124 | } |
127 | 125 | ||
128 | printf("cpu%d: %s %s (rev=%d.%d, imp=%d)\n", |
126 | printf("cpu%d: %s %s (rev=%d.%d, imp=%d)\n", |
129 | m->id, data->vendor, data->model, m->arch.rev_num >> 4, |
127 | m->id, data->vendor, data->model, m->arch.rev_num >> 4, |
130 | m->arch.rev_num & 0xf, m->arch.imp_num); |
128 | m->arch.rev_num & 0xf, m->arch.imp_num); |
131 | } |
129 | } |
132 | 130 | ||
133 | /** @} |
131 | /** @} |
134 | */ |
132 | */ |