pfmlib_cell_priv.h: definitions of register IDs and structures for event table 
operation etc.
pfmlib_cell.h     : definitions of structures for libpfm API arguments

Signed-off-by: Yoshio Funayama <[EMAIL PROTECTED]>
Signed-off-by: Takayuki Uchikawa <[EMAIL PROTECTED]>

Index: libpfm-3.2-070725/lib/pfmlib_cell_priv.h
===================================================================
--- libpfm-3.2-070725_org/lib/pfmlib_cell_priv.h
+++ libpfm-3.2-070725/lib/pfmlib_cell_priv.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2007 TOSHIBA CORPORATION based on code from
+ * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
+ * Contributed by Stephane Eranian <[EMAIL PROTECTED]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110,
+ * USA
+ *
+ * This file is part of libpfm, a performance monitoring support 
+ * library for applications on Linux.
+ */
+#ifndef __PFMLIB_CELL_PRIV_H__
+#define __PFMLIB_CELL_PRIV_H__
+
+#define PFM_CELL_PME_FREQ_PPU_MFC      0
+#define PFM_CELL_PME_FREQ_SPU          1
+#define PFM_CELL_PME_FREQ_HALF         2
+
+typedef struct {
+       char                    *pme_name;      /* event name */
+       char                    *pme_desc;      /* event description */
+       unsigned long long      pme_code;       /* event code */
+       unsigned int            pme_type;       /* count type */
+       unsigned int            pme_freq;       /* debug_bus_control's 
frequency value */
+       unsigned int            pme_enable_word;
+} pme_cell_entry_t;
+
+/* PMC register */
+#define REG_PM0_CONTROL                0x0000
+#define REG_PM1_CONTROL                0x0001
+#define REG_PM2_CONTROL                0x0002
+#define REG_PM3_CONTROL                0x0003
+#define REG_PM4_CONTROL                0x0004
+#define REG_PM5_CONTROL                0x0005
+#define REG_PM6_CONTROL                0x0006
+#define REG_PM7_CONTROL                0x0007
+
+#define REG_PM0_EVENT          0x0008
+#define REG_PM1_EVENT          0x0009
+#define REG_PM2_EVENT          0x000A
+#define REG_PM3_EVENT          0x000B
+#define REG_PM4_EVENT          0x000C
+#define REG_PM5_EVENT          0x000D
+#define REG_PM6_EVENT          0x000E
+#define REG_PM7_EVENT          0x000F
+
+#define REG_GROUP_CONTROL      0x0010
+#define REG_DEBUG_BUS_CONTROL  0x0011
+#define REG_TRACE_ADDRESS      0x0012
+#define REG_EXT_TRACE_TIMER    0x0013
+#define REG_PM_STATUS          0x0014
+#define REG_PM_CONTROL         0x0015
+#define REG_PM_INTERVAL                0x0016
+#define REG_PM_START_STOP      0x0017
+
+#define NONE_SIGNAL            0x0000
+
+#define COUNT_TYPE_BOTH_TYPE           1
+#define COUNT_TYPE_CUMULATIVE_LEN      2
+#define COUNT_TYPE_OCCURRENCE          3
+#define COUNT_TYPE_MULTI_CYCLE         4
+#define COUNT_TYPE_SINGLE_CYCLE                5
+
+#define WORD_0_ONLY    1       /* 0001 */
+#define WORD_2_ONLY    4       /* 0100 */
+#define WORD_0_AND_1   3       /* 0011 */
+#define WORD_0_AND_2   5       /* 0101 */
+#define WORD_NONE      0
+
+#endif /* __PFMLIB_CELL_PRIV_H__ */
Index: libpfm-3.2-070725/include/perfmon/pfmlib_cell.h
===================================================================
--- libpfm-3.2-070725_org/include/perfmon/pfmlib_cell.h
+++ libpfm-3.2-070725/include/perfmon/pfmlib_cell.h
@@ -0,0 +1,53 @@
+/*
+ * Cell PMU specific types and definitions
+ *
+ * Copyright (c) 2007 TOSHIBA CORPORATION based on code from
+ * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
+ * Contributed by Stephane Eranian <[EMAIL PROTECTED]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110,
+ * USA
+ */
+#ifndef __PFMLIB_CELL_H__
+#define __PFMLIB_CELL_H__
+
+#include <perfmon/pfmlib.h>
+
+#define PMU_CELL_NUM_COUNTERS          8       /* total number of 
EvtSel/EvtCtr */
+#define PMU_CELL_NUM_PERFSEL           8       /* total number of EvtSel */
+#define PMU_CELL_NUM_PERFCTR           8       /* total number of EvtCtr */
+
+typedef struct {
+       unsigned int pmX_control_num;   /* for pmX_control 
X=1(pm0_control)...X=8(pm7_control) */
+       unsigned int spe_subunit;
+       unsigned int polarity;
+       unsigned int input_control;
+       unsigned int cnt_mask;          /* threshold (reserved) */
+       unsigned int flags;             /* counter specific flag (reserved) */
+} pfmlib_cell_counter_t;
+
+/*
+ * Cell specific parameters for the library
+ */
+typedef struct {
+       unsigned int triggers;
+       pfmlib_cell_counter_t pfp_cell_counters[PMU_CELL_NUM_COUNTERS]; /* 
extended counter features */
+       uint64_t              reserved[4];                              /* for 
future use */
+} pfmlib_cell_input_param_t;
+
+typedef struct {
+       uint64_t        reserved[8];    /* for future use */
+} pfmlib_cell_output_param_t;
+
+#endif /* __PFMLIB_CELL_H__ */
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to