diff options
-rw-r--r-- | physmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -133,7 +133,7 @@ static int fd_msr = -1; msr_t rdmsr(int addr) { - uint8_t buf[8]; + uint32_t buf[2]; msr_t msr = { 0xffffffff, 0xffffffff }; if (lseek(fd_msr, (off_t) addr, SEEK_SET) == -1) { @@ -143,8 +143,8 @@ msr_t rdmsr(int addr) } if (read(fd_msr, buf, 8) == 8) { - msr.lo = *(uint32_t *)buf; - msr.hi = *(uint32_t *)(buf + 4); + msr.lo = buf[0]; + msr.hi = buf[1]; return msr; } |