Intel Trace Hub Support Coming To Linux

Intel describes Trace Hub as, "a set of functional blocks whose primary purpose is to enable customers to debug Intel Architecture (IA) based systems using off-the-shelf debug tools. Intel Trace Hub collects and exports trace data concurrently from various hardware and software sources to an consumer (tool) over USB, MIPI PTI or to system memory. Intel Trace Hub is intended to be used for system wide trace and debug scenarios. This includes complex interactions between hardware and software components inside a system. Intel Trace Hub supports industry standard trace and debug methods as MIPI STPv2 and PTI protocols."
Alexander Shishkin sent out the set of eleven patches enabling Intel Trace Hub support for the Linux kernel. He describes the work as:
The first part of this patchset introduces an abstraction for STM devices, or the devices that combine trace data from multiple trace sources into a STP trace stream. It provides a generic interface for software writers to send their trace data and also solves the problem of mapping STP master/channel assignments to trace sources between the system under tracing and the STP decoder on the debug host end. This part might also be interesting to the guys working on Coresight STM support as it uses a similar interface and has the same channel mapping problem.Shishkin's Trace Hub enablement for the kernel amounts to just over six thousand lines of new code. The patch series can be found for now floating on the kernel mailing list but there's time ahead that it could get integrated for possibly the Linux 4.1 kernel.
The remainder of the patchset is Intel TH support. The core part is platform independent and is called into by glue layers such as the pci driver that follows. The core provides a bus, on which Intel TH subdevices are allocated. Each subdevice has its own driver. Subdevices are divided into 3 types: sources, outputs and a switch (there's usually just one). The latter is the central component in this scheme of things and is required for other drivers to load and function. Other drivers, however, are optional. Sources are producers of trace data. Outputs are means of exporting the resulting STP trace to the debug host via trace ports or system memory.
1 Comment