66 lines · plain
1=============================2Arm Coherent Mesh Network PMU3=============================4 5CMN-600 is a configurable mesh interconnect consisting of a rectangular6grid of crosspoints (XPs), with each crosspoint supporting up to two7device ports to which various AMBA CHI agents are attached.8 9CMN implements a distributed PMU design as part of its debug and trace10functionality. This consists of a local monitor (DTM) at every XP, which11counts up to 4 event signals from the connected device nodes and/or the12XP itself. Overflow from these local counters is accumulated in up to 813global counters implemented by the main controller (DTC), which provides14overall PMU control and interrupts for global counter overflow.15 16PMU events17----------18 19The PMU driver registers a single PMU device for the whole interconnect,20see /sys/bus/event_source/devices/arm_cmn_0. Multi-chip systems may link21more than one CMN together via external CCIX links - in this situation,22each mesh counts its own events entirely independently, and additional23PMU devices will be named arm_cmn_{1..n}.24 25Most events are specified in a format based directly on the TRM26definitions - "type" selects the respective node type, and "eventid" the27event number. Some events require an additional occupancy ID, which is28specified by "occupid".29 30* Since RN-D nodes do not have any distinct events from RN-I nodes, they31 are treated as the same type (0xa), and the common event templates are32 named "rnid_*".33 34* The cycle counter is treated as a synthetic event belonging to the DTC35 node ("type" == 0x3, "eventid" is ignored).36 37* XP events also encode the port and channel in the "eventid" field, to38 match the underlying pmu_event0_id encoding for the pmu_event_sel39 register. The event templates are named with prefixes to cover all40 permutations.41 42By default each event provides an aggregate count over all nodes of the43given type. To target a specific node, "bynodeid" must be set to 1 and44"nodeid" to the appropriate value derived from the CMN configuration45(as defined in the "Node ID Mapping" section of the TRM).46 47Watchpoints48-----------49 50The PMU can also count watchpoint events to monitor specific flit51traffic. Watchpoints are treated as a synthetic event type, and like PMU52events can be global or targeted with a particular XP's "nodeid" value.53Since the watchpoint direction is otherwise implicit in the underlying54register selection, separate events are provided for flit uploads and55downloads.56 57The flit match value and mask are passed in config1 and config2 ("val"58and "mask" respectively). "wp_dev_sel", "wp_chn_sel", "wp_grp" and59"wp_exclusive" are specified per the TRM definitions for dtm_wp_config0.60Where a watchpoint needs to match fields from both match groups on the61REQ or SNP channel, it can be specified as two events - one for each62group - with the same nonzero "combine" value. The count for such a63pair of combined events will be attributed to the primary match.64Watchpoint events with a "combine" value of 0 are considered independent65and will count individually.66