Changeset 38de8a5 in mainline for arch/mips/src/cpu/cpu.c
- Timestamp:
- 2005-09-09T13:50:54Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b02e5d1
- Parents:
- b0edf3b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips/src/cpu/cpu.c
rb0edf3b2 r38de8a5 35 35 36 36 #include <typedefs.h> 37 #include <print.h> 37 #include <print.h> 38 38 39 struct {39 struct data_t { 40 40 char *vendor; 41 41 char *model; 42 } imp_data[] = { 42 }; 43 44 static struct data_t imp_data[] = { 43 45 { "Invalid", "Invalid" }, /* 0x00 */ 44 46 { "MIPS", "R2000" }, /* 0x01 */ … … 79 81 }; 80 82 83 static struct data_t imp_data80[] = { 84 { "MIPS", "4Kc" }, /* 0x80 */ 85 {"Invalid","Invalid"}, /* 0x81 */ 86 {"Invalid","Invalid"}, /* 0x82 */ 87 {"MIPS","4Km & 4Kp"} /* 0x83 */ 88 }; 89 81 90 void cpu_arch_init(void) 82 91 { … … 91 100 void cpu_print_report(cpu_t *m) 92 101 { 102 struct data_t *data; 103 104 if (m->arch.imp_num & 0x80) { 105 data = &imp_data80[m->arch.imp_num & 0x7f]; 106 } else 107 data = &imp_data[m->arch.imp_num]; 108 93 109 printf("cpu%d: %s %s (rev=%d.%d, imp=%d)\n", 94 m->id, imp_data[m->arch.imp_num].vendor, imp_data[m->arch.imp_num].model, m->arch.rev_num >> 4, m->arch.rev_num & 0xf, m->arch.imp_num); 110 m->id, data->vendor, data->model, m->arch.rev_num >> 4, 111 m->arch.rev_num & 0xf, m->arch.imp_num); 95 112 }
Note:
See TracChangeset
for help on using the changeset viewer.