| 165 | } |
| 166 | |
| 167 | uint32_t msraddrbyname(const char *name) { |
| 168 | uint8_t t; |
| 169 | const uint32_t addr = strtoul(name, NULL, 16); |
| 170 | const struct msrdef *m; |
| 171 | if (!targets) |
| 172 | return addr; |
| 173 | for (t = 0; t < targets_found; t++) |
| 174 | for (m = targets[t]->msrs; !MSR_ISEOT(*m); m++) { |
| 175 | if (addr == m->addr) |
| 176 | return m->addr; |
| 177 | if (!strcasecmp(name, m->symbol)) |
| 178 | return m->addr; |
| 179 | } |
| 180 | return addr; |
| 181 | } |
| 182 | |
| 183 | void dumpmsrdefs(const struct targetdef *t) { |
| 184 | const struct msrdef *m; |
no test coverage detected