blob: 09a15467b978ddd928f1682a89235a768dffc216 [file] [log] [blame]
Mike Dodd8cfa7022010-11-17 11:12:26 -08001/**
2 * @file op_x86_model.h
3 * interface to x86 model-specific MSR operations
4 *
5 * @remark Copyright 2002 OProfile authors
6 * @remark Read the file COPYING
7 *
8 * @author Graydon Hoare
9 */
10
11#ifndef OP_X86_MODEL_H
12#define OP_X86_MODEL_H
13
14#include "oprofile.h"
15
16struct op_saved_msr {
17 uint high;
18 uint low;
19};
20
21struct op_msr_group {
22 uint * addrs;
23 struct op_saved_msr * saved;
24};
25
26struct op_msrs {
27 struct op_msr_group counters;
28 struct op_msr_group controls;
29};
30
31struct pt_regs;
32
33struct op_x86_model_spec {
34 uint const num_counters;
35 uint const num_controls;
36 void (*fill_in_addresses)(struct op_msrs * const msrs);
37 void (*setup_ctrs)(struct op_msrs const * const msrs);
38 void (*check_ctrs)(uint const cpu,
39 struct op_msrs const * const msrs,
40 struct pt_regs * const regs);
41 void (*start)(struct op_msrs const * const msrs);
42 void (*stop)(struct op_msrs const * const msrs);
43};
44
45extern struct op_x86_model_spec const op_ppro_spec;
46extern struct op_x86_model_spec const op_athlon_spec;
47extern struct op_x86_model_spec const op_p4_spec;
48#ifdef HT_SUPPORT
49extern struct op_x86_model_spec const op_p4_ht2_spec;
50#endif
51
52#endif /* OP_X86_MODEL_H */