Changeset f2ef7fd in mainline for kernel/arch/ia32/include
- Timestamp:
- 2008-10-05T21:20:13Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6198611
- Parents:
- 1d132ae
- Location:
- kernel/arch/ia32/include
- Files:
-
- 1 added
- 2 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 * -
kernel/arch/ia32/include/cpu.h
r1d132ae rf2ef7fd 36 36 #define KERN_ia32_CPU_H_ 37 37 38 #define EFLAGS_IF (1 << 9) 39 #define EFLAGS_RF (1 << 16) 40 41 #define CR4_OSFXSR_MASK (1<<9) 42 43 /* Support for SYSENTER and SYSEXIT */ 44 #define IA32_MSR_SYSENTER_CS 0x174 45 #define IA32_MSR_SYSENTER_ESP 0x175 46 #define IA32_MSR_SYSENTER_EIP 0x176 47 48 #ifndef __ASM__ 49 38 50 #include <arch/pm.h> 39 51 #include <arch/asm.h> 40 41 #define EFLAGS_IF (1 << 9)42 #define EFLAGS_RF (1 << 16)43 52 44 53 typedef struct { … … 52 61 } cpu_arch_t; 53 62 54 55 #define CR4_OSFXSR_MASK (1<<9) 63 #endif 56 64 57 65 #endif
Note:
See TracChangeset
for help on using the changeset viewer.