Changeset f2ef7fd in mainline for kernel/arch/ia32/include/asm.h
- Timestamp:
- 2008-10-05T21:20:13Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6198611
- Parents:
- 1d132ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/asm.h
r1d132ae rf2ef7fd 248 248 } 249 249 250 /** Write to MSR */ 251 static inline void write_msr(uint32_t msr, uint64_t value) 252 { 253 asm volatile ("wrmsr" : : "c" (msr), "a" ((uint32_t)(value)), 254 "d" ((uint32_t)(value >> 32))); 255 } 256 257 static inline uint64_t read_msr(uint32_t msr) 258 { 259 uint32_t ax, dx; 260 261 asm volatile ("rdmsr" : "=a"(ax), "=d"(dx) : "c" (msr)); 262 return ((uint64_t)dx << 32) | ax; 263 } 264 265 250 266 /** Return base address of current stack 251 267 *
Note:
See TracChangeset
for help on using the changeset viewer.