| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# pfmlib_coreduo.h

Go to the documentation of this file.

    00001 /*
    00002  * Intel Core Duo/Solo
    00003  *
    00004  * Copyright (c) 2009 Google, Inc
    00005  * Contributed by Stephane Eranian <eranian@hpl.hp.com>
    00006  *
    00007  * Permission is hereby granted, free of charge, to any person obtaining a copy
    00008  * of this software and associated documentation files (the "Software"), to deal
    00009  * in the Software without restriction, including without limitation the rights
    00010  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
    00011  * of the Software, and to permit persons to whom the Software is furnished to do so,
    00012  * subject to the following conditions:
    00013  *
    00014  * The above copyright notice and this permission notice shall be included in all
    00015  * copies or substantial portions of the Software.
    00016  *
    00017  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    00018  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
    00019  * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    00020  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
    00021  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
    00022  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    00023  */
    00024 #ifndef __PFMLIB_COREDUO_H__
    00025 #define __PFMLIB_COREDUO_H__
    00026
    00027 #include <perfmon/pfmlib.h>
    00028 /*
    00029  * privilege level mask usage for architected PMU:
    00030  *
    00031  * PFM_PLM0 = OS (kernel, hypervisor, ..)
    00032  * PFM_PLM1 = unused (ignored)
    00033  * PFM_PLM2 = unused (ignored)
    00034  * PFM_PLM3 = USR (user level)
    00035  */
    00036
    00037 #ifdef __cplusplus
    00038 extern "C" {
    00039 #endif
    00040
    00041 #define PMU_COREDUO_NUM_COUNTERS 2
    00042
    00043 typedef union {
    00044         unsigned long long val;                 /* complete register value */
    00045         struct {
    00046                 unsigned long sel_event_select:8;       /* event mask */
    00047                 unsigned long sel_unit_mask:8;          /* unit mask */
    00048                 unsigned long sel_usr:1;                /* user level */
    00049                 unsigned long sel_os:1;                 /* system level */
    00050                 unsigned long sel_edge:1;               /* edge detec */
    00051                 unsigned long sel_pc:1;                 /* pin control */
    00052                 unsigned long sel_int:1;                /* enable APIC intr */
    00053                 unsigned long sel_res1:1;               /* reserved */
    00054                 unsigned long sel_en:1;                 /* enable */
    00055                 unsigned long sel_inv:1;                /* invert counter mask */
    00056                 unsigned long sel_cnt_mask:8;           /* counter mask */
    00057                 unsigned long sel_res2:32;
    00058         } perfevtsel;
    00059 } pfm_coreduo_sel_reg_t;
    00060
    00061 typedef struct {
    00062         unsigned long           cnt_mask;       /* threshold (cnt_mask)  */
    00063         unsigned int            flags;          /* counter specific flag */
    00064 } pfm_coreduo_counter_t;
    00065
    00066 #define PFM_COREDUO_SEL_INV     0x1     /* inverse */
    00067 #define PFM_COREDUO_SEL_EDGE    0x2     /* edge detect */
    00068 /*
    00069  * model-specific parameters for the library
    00070  */
    00071 typedef struct {
    00072         pfm_coreduo_counter_t   pfp_coreduo_counters[PMU_COREDUO_NUM_COUNTERS];
    00073         uint64_t                reserved[4];    /* for future use */
    00074 } pfmlib_coreduo_input_param_t;
    00075
    00076 #ifdef __cplusplus /* extern C */
    00077 }
    00078 #endif
    00079
    00080 #endif /* __PFMLIB_COREUO_H__ */

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines