static struct targetdef alltargets[] = {
{ "geodelx", "AMD Geode(tm) LX", geodelx_probe, geodelx_msrs },
{ "cs5536", "AMD Geode(tm) CS5536", cs5536_probe, cs5536_msrs },
+ { "K8", "AMD K8 Family", k8_probe, k8_msrs },
{ TARGET_EOT }
};
static struct sysdef allsystems[] = {
{ "linux", "Linux with /dev/cpu/*/msr", linux_probe, linux_open, linux_close, linux_rdmsr },
+ { "darwin", "OS X with DirectIO", darwin_probe, darwin_open, darwin_close, darwin_rdmsr },
{ SYSTEM_EOT }
};
break;
case 'i':
input = 1;
- addr = strtoul(optarg, NULL, 16);
+ addr = msraddrbyname(optarg);
optarg = strchr(optarg, '=');
if (NULL == optarg) {
fprintf(stderr, "missing value in -i argument!\n");
if (sys && !sys->name) {
fprintf(stderr, "Unable to detect the current operating system!\n");
+ fprintf(stderr, "On Linux, please do 'modprobe msr' and retry.\n");
fprintf(stderr, "Please send a report or patch to coreboot@coreboot.org. Thanks for your help!\n");
fprintf(stderr, "\n");
}
}
for (; optind < argc; optind++) {
- addr = strtoul(argv[optind], NULL, 16);
+ addr = msraddrbyname(argv[optind]);
if (!sys->rdmsr(cpu, addr, &msrval))
break;
decodemsr(cpu, addr, msrval);