Subversion Repositories Kolibri OS

Rev

Rev 6934 | Rev 7143 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6934 Rev 6936
Line 30... Line 30...
30
struct msr_regs_info {
30
struct msr_regs_info {
31
	u32 *regs;
31
	u32 *regs;
32
	int err;
32
	int err;
33
};
33
};
Line -... Line 34...
-
 
34
 
-
 
35
struct saved_msr {
-
 
36
	bool valid;
-
 
37
	struct msr_info info;
-
 
38
};
-
 
39
 
-
 
40
struct saved_msrs {
-
 
41
	unsigned int num;
-
 
42
	struct saved_msr *array;
-
 
43
};
34
 
44
 
35
static inline unsigned long long native_read_tscp(unsigned int *aux)
45
static inline unsigned long long native_read_tscp(unsigned int *aux)
36
{
46
{
37
	unsigned long low, high;
47
	unsigned long low, high;
38
	asm volatile(".byte 0x0f,0x01,0xf9"
48
	asm volatile(".byte 0x0f,0x01,0xf9"
Line 159... Line 169...
159
#define rdmsrl(msr, val)			\
169
#define rdmsrl(msr, val)			\
160
	((val) = native_read_msr((msr)))
170
	((val) = native_read_msr((msr)))
Line 161... Line 171...
161
 
171
 
162
static inline void wrmsrl(unsigned msr, u64 val)
172
static inline void wrmsrl(unsigned msr, u64 val)
163
{
173
{
164
	native_write_msr(msr, (u32)val, (u32)(val >> 32));
174
	native_write_msr(msr, (u32)(val & 0xffffffffULL), (u32)(val >> 32));
Line 165... Line 175...
165
}
175
}
166
 
176
 
167
/* wrmsr with exception handling */
177
/* wrmsr with exception handling */