2 * V3 ECC DRAM Scrubber MCE
3 * (c) Philip Soltero, 2010
10 #define V3_VM_INJECT_SCRUBBER_MCE (10224+20)
12 int main(int argc, char * argv[]) {
20 fprintf(stderr, "Usage: v3_inject_ecc_scrubber_mce <vm_device> <cpu> <hex address>\n");
26 cpu = strtol(argv[2], &end_ptr, 10);
27 if (strcmp(end_ptr, "\0") != 0) {
28 fprintf(stderr, "The specified cpu is not a valid integer '%s', in particular '%s'.\n", argv[2], end_ptr);
32 address = strtoll(argv[3], &end_ptr, 16);
33 if (strcmp(end_ptr, "\0") != 0) {
34 fprintf(stderr, "The specified address is not a valid integer '%s', in particular '%s'.\n", argv[3], end_ptr);
38 v3_fd = open(vm_device, O_RDONLY);
41 fprintf(stderr, "Error opening V3Vee control device.\n");
45 ioctl(v3_fd, V3_VM_INJECT_SCRUBBER_MCE, address);
47 /* Close the file descriptor. */