- Core framework—The core framework contains a common logic. It loads the firmware and starts or stops the remote processor.
- Remoteproc drivers—The drivers contain platform-specific operations to manage the corresponding cores. A remoteproc driver registers a remoteproc instance and a set of operations with the core framework.
Qualcomm remoteproc support
Qualcomm has enhanced the remoteproc framework for peripheral firmware authentication using the upstream PAS driver. The Remoteproc driver in Qualcomm Linux implements a peripheral authentication service (PAS) driver, which is a TrustZone-based peripheral image loader for remote processors on Qualcomm SoC devices. For more information, see qcom_q6v5_pas.c. The remote processors are used to manage the lifecycle of various co-processors, such as aDSP, cDSP, modem peripheral subsystem (MPSS), and wireless processor subsystem (WPSS). The supported co-processors on QCS6490-based boards and Dragonwing™ RB3 Gen 2 Development Kit are aDSP, cDSP, and WPSS.List of supported remote processor subsystems depends upon the SoC in use.
sysfs interface:
Figure : Remoteproc support
Configure remoteproc recovery and subsystem restart
The remoteproc sub-devices manage communication contexts for remote processor subsystem crash and recovery scenarios. Entities, such as communication contexts, must determine when a remote processor boots or shuts down. Each sub-device has two operations:probe()called after the remoteprocstart()remove()called beforestop()
rproc_report_crash(), which triggers recovery of the faulty remote processor.
The recovery handler does the following:
Figure: Remoteproc crash sequence
debugfs node from the user space, do the following:
Enable or disable core dump
Remote processor core dumps are supported for debugging the subsystem crash issues using the Qualcomm Linux kernel devcoredump feature. When a subsystem crash occurs, devcoredump exposes a snapshot of the memory of the recovering remoteproc in the/sys/class/devcoredump/devcdN/data node, and an associated crash uevent is sent to the user space. When the sysfs node is read, the sysfs provides the segments in an ELF container, and a write operation frees up the resources and destroys the devcoredump instance.
A debugfs node is exposed to enable and disable core dump from the user space.
To collect the full RAM dump for crash analysis, Qualcomm SoCs implement kernel panic on remoteproc crash (fatal error on remote processor). The kernel panic mode is enabled only when the core dump is disabled.
/sys/class/devcoredump/devcdN/data node is created on a subsystem crash only if core dump is enabled for the subsystem. To enable the core dump, run the echo enabled > /sys/kernel/debug/remoteproc/remoteprocN/coredump command. The devcdN/data node is temporary and is removed after a timeout. To debug the issues, use the copy command to copy the devcdN/data node to your local device for secure usage. The delete timeout is defined in base/devcoredump.c.
The following is an example command to copy the core dumps:
For more information about QCAP, see Parse RAM dumps using QCAP.
Configure the remoteproc node and firmware load in DT
The remoteproc devices are configured in the respective device tree files using the DT bindings. The configuration includes compatible device names, memory regions, interrupt settings, and clock references, according to the DT bindings, in theDocumentation/devicetree/bindings/remoteproc/ directory.
The following example shows the QCS6490 aDSP remoteproc device tree configuration in the arch/arm64/boot/dts/qcom/qcs6490.dtsi (renamed to kodiak.dtsi in kernel v6.19 and later):
arch/arm64/boot/dts/qcom/lemans.dtsi path.
To get the device tree configuration file for all the Qualcomm SoCs, see the respective platform DTSI file.
/lib/firmware directory in rootfs and the related configurations are done in the corresponding board device tree arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts file. For other Qualcomm hardware SoCs, see arch/arm64/boot/dts/qcom/<SoC>-<board>.dts files.
The following example shows the remoteproc DT configuration:

