aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2024-02-07 11:22:26 +0100
committerMikael Olsson <mikael.olsson@arm.com>2024-02-12 13:04:41 +0100
commitd4ad9e55cb8e17a4a42b3a94c64e6bc48529b26e (patch)
tree9084d770574bc2a278ddfa121985ac030f711daa /README.md
parent09cdc30b3b3a52176cd02518c07d5f44c1ce8dd1 (diff)
downloadethos-u-linux-driver-stack-d4ad9e55cb8e17a4a42b3a94c64e6bc48529b26e.tar.gz
Restructure kernel driver source tree
As a first step to have a clearer separation of the different parts of the kernel driver, the source files have been 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. Files have been renamed accordingly to namespace them by their purpose. Change-Id: I75e09ebf0002c99a22b6d4b09d34504d186c32b3 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md31
1 files changed, 22 insertions, 9 deletions
diff --git a/README.md b/README.md
index 82be485..f28414a 100644
--- a/README.md
+++ b/README.md
@@ -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