Difference between revisions of "OpenAMP"
(Created page with " ==== Kernel Configuration ==== <pre> Device Drivers ---> Generic Driver Options ---> -*- Userspace firmware loading support (CONFIG_FW_LOADER) [*] Inc...") |
|||
Line 10: | Line 10: | ||
(firmware) Firmware blobs root directory (CONFIG_EXTRA_FIRMWARE_DIR) | (firmware) Firmware blobs root directory (CONFIG_EXTRA_FIRMWARE_DIR) | ||
</pre> | </pre> | ||
+ | |||
+ | [[File:Generic Driver Options.png|600px]] | ||
===== Firmware Location ===== | ===== Firmware Location ===== |
Revision as of 04:40, 26 January 2018
Contents
Kernel Configuration
Device Drivers ---> Generic Driver Options ---> -*- Userspace firmware loading support (CONFIG_FW_LOADER) [*] Include in-kernel firmware blobs in kernel binary (CONFIG_FIRMWARE_IN_KERNEL) () External firmware blobs to build into the kernel binary (CONFIG_EXTRA_FIRMWARE) (firmware) Firmware blobs root directory (CONFIG_EXTRA_FIRMWARE_DIR)
Firmware Location
The remote processor application that is specified by the firmware property should be located in /lib/firmware in the root filesystem if not directly built into the kernel binary.
Firmware can be built directly into the kernel by adding it to the firmware directory and specifying it to be built in the kernel configuration. By adding the filename of the remote processor firmware to the space delimited list specified by the CONFIG_EXTRA_FIRMARE symbol.
Kernel Build
The kernel should be rebuilt with a the LOADADDR offset by the size of the memory space reserved for the remote processor. Normally the LOADADDR value is set to 0x8000 (32k). The size cell of the reg
property for the remote processor device tree node should be added to the normal address value.
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi- LOADADDR=0x10008000 uImage
Device Tree Node
zynq_remoteproc@0 { compatible = "xlnx,zynq_remoteproc"; reg = <0x0 0x10000000>; interrupt-parent = <&intc>; interrupts = <0 37 4>, <0 38 4>; firmware = "freertos"; ipino = <15>; vring0 = <15>; vring1 = <14>; };
Interrupts
If the remote processor firmware should be responsible for handling certain interrupts, those interrupts can be specified in the interrupts property of the remote processor node. Otherwise, the interrupt-parent and interrupts properties can be omitted. If the remote processor will be using any of the processing subsystem peripherals, the interrupts for those peripherals should be specified in the interrupts property. Additionally, any interrupts provided by programmable logic that is to be handled by the remote processor should be included in the interrupts array. The ipino
and vring
properties specify the interprocessor interrupts (software generated) from the remote processor to the host (Linux) and to the remote processor from the host, respectively.