diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 31 |
1 files changed, 22 insertions, 9 deletions
@@ -63,9 +63,19 @@ include the rpmsg virtio message queues, memory resources and trace buffers. The [ethosu_remoteproc.c](remoteproc/ethosu_remoteproc.c) is provided for reference, but could be replaced by any remoteproc driver. -## Ethos-U rpmsg driver +## Ethos-U driver -The [Ethos-U rpmsg driver](kernel/ethosu_driver.c) uses dynamic name resolution, +The purpose of the Ethos-U driver is to enable user space applications to +dispatch inferences to the NPU. The driver presents a +[Userspace API (UAPI)](kernel/include/uapi/ethosu.h), which applications use +IOCTL on to allocate buffers, create networks and dispatch inferences. + +To enable the kernel driver to be extended to support other setups, the source +files for the driver are placed in separate common and rpmsg directories. + +### Rpmsg driver + +The [Ethos-U rpmsg driver](kernel/common/ethosu_driver.c) uses dynamic name resolution, which requires a Linux kernel version of 5.12 or later. This means that when the firmware boots up it calls `rpmsg_create_ept()` to create a dynamic endpoint with a name of maximum 32 characters. The service name must be unique and is @@ -81,16 +91,19 @@ driver will consequently only allocate resources while the firmware is running. The [message handler openamp](https://git.mlplatform.org/ml/ethos-u/ethos-u-core-platform.git/tree/applications/message_handler_openamp) creates a new endpoint named `ethos-u-0.0`, which is serviced by the -[Ethos-U rpmsg driver](kernel/ethosu_driver.c). It is important that firmware +[Ethos-U rpmsg driver](kernel/common/ethosu_driver.c). It is important that firmware and rpmsg driver use the same endpoint name, or else the endpoint will not be successfully created. -The purpose of the Ethos-U rpmsg driver is to enable user space applications to -dispatch inferences to the the Ethos-U subsystem. The driver presents a -[Userspace API (UAPI)](kernel/uapi/ethosu.h), which applications use IOCTL on to -allocate buffers, create networks and dispatch inferences. The types for the -rpmsg communication between Linux and the firmware are defined in -[ethosu_core_rpmsg.h](kernel/ethosu_core_rpmsg.h). +The messages used for the rpmsg communication between Linux and the firmware +are defined in [ethosu_core_rpmsg.h](kernel/include/rpmsg/ethosu_rpmsg.h). + +### Folder structure + +To make a clear separation between the different parts of the driver, the +source files are placed into separate directories according to their purpose +and the different parts are only allowed to use headers from another part +in the include folder. # DTB |