MCPcopy Create free account
hub / github.com/coreboot/coreboot / linux_rdmsr

Function linux_rdmsr

util/msrtool/linux.c:61–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61int linux_rdmsr(uint8_t cpu, uint32_t addr, struct msr *val) {
62 struct msr tmp;
63 if (lseek(msr_fd[cpu], addr, SEEK_SET) == -1) {
64 SYSERROR(lseek, addr);
65 return 0;
66 }
67 if (read(msr_fd[cpu], &tmp, 8) != 8) {
68 SYSERROR(read, addr);
69 return 0;
70 }
71 val->hi = tmp.lo;
72 val->lo = tmp.hi;
73 return 1;
74}

Callers

nothing calls this directly

Calls 1

readFunction · 0.85

Tested by

no test coverage detected