2 Intel's XScale Microarchitecture 80312 companion processor provides a
3 Performance Monitoring Unit (PMON) that can be utilized to provide
4 information that can be useful for fine tuning of code. This text
5 file describes the API that's been developed for use by Linux kernel
6 programmers. Note that to get the most usage out of the PMON,
7 I highly reccomend getting the XScale reference manual from Intel[1]
8 and looking at chapter 12.
10 To use the PMON, you must #include <asm-arm/arch-iop310/pmon.h> in your
13 Since there's only one PMON, only one user can currently use the PMON
14 at a given time. To claim the PMON for usage, call iop310_pmon_claim() which
15 returns an identifier. When you are done using the PMON, call
16 iop310_pmon_release() with the id you were given earlier.
18 The PMON consists of 14 registers that can be used for performance measurements.
19 By combining different statistics, you can derive complex performance metrics.
21 To start the PMON, just call iop310_pmon_start(mode). Mode tells the PMON what
22 statistics to capture and can each be one of:
25 Performance Monitoring Disabled
28 Primary PCI bus and internal agents (bridge, dma Ch0, dam Ch1, patu)
31 Secondary PCI bus and internal agents (bridge, dma Ch0, dam Ch1, patu)
34 Secondary PCI bus and internal agents (external masters 0..2 and Intel
35 80312 I/O companion chip)
38 Secondary PCI bus and internal agents (external masters 3..5 and Intel
39 80312 I/O companion chip)
42 Intel 80312 I/O companion chip internal bus, DMA Channels and Application
46 Intel 80312 I/O companion chip internal bus, PATU, SATU and Intel 80200
50 Intel 80312 I/O companion chip internal bus, Primary PCI bus, Secondary
51 PCI bus and Secondary PCI agents (external masters 0..5 & Intel 80312 I/O
54 To get the results back, call iop310_pmon_stop(&results) where results is
57 typedef struct _iop310_pmon_result
59 u32 timestamp; /* Global Time Stamp Register */
60 u32 timestamp_overflow; /* Time Stamp overflow count */
61 u32 event_count[14]; /* Programmable Event Counter
63 u32 event_overflow[14]; /* Overflow counter for PECR1-14 */
68 This code is still under development, so please feel free to send patches,
69 questions, comments, etc to me.
71 Deepak Saxena <dsaxena@mvista.com>