Changeset f2ef7fd in mainline for kernel/arch/ia32/include/asm.h


Ignore:
Timestamp:
2008-10-05T21:20:13Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6198611
Parents:
1d132ae
Message:

Support for SYSENTER on ia32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/include/asm.h

    r1d132ae rf2ef7fd  
    248248}
    249249
     250/** Write to MSR */
     251static 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
     257static 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
    250266/** Return base address of current stack
    251267 *
Note: See TracChangeset for help on using the changeset viewer.