-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMSRObject.h
40 lines (35 loc) · 890 Bytes
/
MSRObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* MSRObject.h
*
* Created on: 28/mar/2011
* Author: paolo
*/
#ifndef MSROBJECT_H_
#define MSROBJECT_H_
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include "Processor.h"
class MSRObject {
private:
DWORD cpuCount;
PROCESSORMASK cpuMask;
DWORD reg;
DWORD *eax_ptr;
DWORD *edx_ptr;
unsigned int *absIndex;
public:
MSRObject();
bool readMSR (DWORD, PROCESSORMASK);
bool writeMSR ();
unsigned int indexToAbsolute (unsigned int);
DWORD getCount ();
uint64_t getBits (unsigned int, unsigned int, unsigned int);
DWORD getBitsLow (unsigned int, unsigned int, unsigned int);
DWORD getBitsHigh (unsigned int, unsigned int, unsigned int);
bool setBits (unsigned int, unsigned int, uint64_t);
bool setBitsLow (unsigned int, unsigned int, DWORD);
bool setBitsHigh (unsigned int, unsigned int, DWORD);
virtual ~MSRObject();
};
#endif /* MSROBJECT_H_ */