aboutsummaryrefslogtreecommitdiff
path: root/kernel/uapi/ethosu.h
AgeCommit message (Collapse)Author
2024-02-12Restructure kernel driver source treeMikael Olsson
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>
2023-12-20Change PMU event counter values to use 64-bitMikael Olsson
The PMU event counter value is an accumulation of 32-bit values during the inference and to ensure the total value fits in the rpmsg message and UAPI, the variable holding the value has been changed to 64-bit. The driver library, Python wrapper and inference runner have been changed accordingly to support the 64-bit values. Change-Id: I09a8e45eb75800c8a787f83abff5a3693148cc15 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
2023-11-06Change create network UAPI to take a user bufferMikael Olsson
To not allow the buffer for a network instance to be changed after creation, the create network UAPI will now take the network model data as a user buffer. The content of the user buffer is copied into an internally allocated DMA buffer that cannot be accessed by the user. This breaks the current API so the Linux kernel NPU driver version and the driver library version have been given major version bumps. All the tests, documentation and other applications affected by the changes have been updated accordingly. Change-Id: I25c785d75a24794c3db632e4abe5cfbb1c7ac190 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
2023-11-06Remove buffer capacity, offset and resize in UAPIMikael Olsson
The UAPI no longer supports the buffer capacity, offset and resize functionality. Instead, the UAPI now only accepts a fixed size given at the creation of the buffer. This change was made because the features were not used and made the buffer handling more complicated. The user knows how big buffers they need for their networks so they don't need resize support or partial buffer usage support by having separate size and capacity with an offset. Without these features, the buffer instance no longer needs any IOCTL call support so it has been removed. However, to still be able to check the size of a buffer from its file descriptor, seek support has been implemented so lseek and similar functions can be used to get the size. The driver library's clear function that previously only reset the size and offset values of the buffer will now clear the buffer content instead. These are breaking changes so the Linux kernel NPU driver version and the driver library version have been given major version bumps. All the tests and other applications affected by these changes have been updated accordingly. Change-Id: Ifc34cf04724a95853ad23fd7398dd286f73bcdab Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
2023-10-10Replace enum with fixed-width int in UAPI structsLedion Daja
In order to avoid struct layout misalignment issues between user and kernel space, raising from size of enum members being implementation- defined, the enum members of structs in the UAPI header file have now been replaced with fixed-width integers. Change-Id: I44a41c6d6669d116ca239da72676dd0539bf88b9 Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2023-10-10Fix typos in UAPI type name commentsLedion Daja
Change-Id: I6405c2d5e614239af58e6f1e741e03ea8a19ba35 Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2023-08-09Add kernel driver version to UAPIMikael Olsson
The kernel driver's version is now exposed in the UAPI so the UAPI user can validate that they are compatible with the kernel driver in use. Change-Id: I52d096dfaedb8c3c1889d27a907626be96779ee7 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
2023-08-09Remove protocol version request IOCTL from UAPIMikael Olsson
The current implementation of the protocol version request IOCTL call doesn't return any version information and the protocol version is not needed by any userspace program as it's for the communication between the Linux kernel NPU driver and firmware. The IOCTL call has therefore been removed from the UAPI and the inference runner has been updated accordingly. Change-Id: I9ed09e55d9522996a182f237c8a6db2f45bc40a9 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
2023-08-07Correct license in UAPI header fileJonny Svärd
Add missing `WITH Linux-syscall-note` to the ethosu.h UAPI header file Change-Id: Ie7abf81108d85faab963a262a27f93c02064e4dd Signed-off-by: Jonny Svärd <jonny.svaerd@arm.com>
2022-05-24Update uapi definition for capability requestPer Åstrand
ETHOSU_IOCTL_CAPABILITIES_REQ is a read ioctl with a parameter. Change-Id: Ife20d4de86351053600e6c6ba174dc40896f0aef
2022-05-05Add support for inference cancellationDavide Grohmann
Send cancel inference messages to the ethosu subsystem to abort inference execution there. Also mark inference as aborted in the linux driver stack itself, so pending inference messages are not resent when resetting the firmware. Change-Id: I244c2b119fd7995d14e3859815abf2a00c7f0583
2022-05-02Add support for rejected inference responsesDavide Grohmann
Change-Id: I62e13df69c712ed4cf70766429b4cb13fc9c9dcb
2022-03-14Network infoKristofer Jonsson
Add UAPI and core message that allows user space space to fetch information about network models built into the firmware. Change-Id: Ic92529bce3edd0a5499e691a566bd065da2a72ad
2022-03-10Firmware resident modelKristofer Jonsson
Support referencing a network model by index that has been built into the firmware binary. Change-Id: Idd5294376ea82503dfeafe1203dcc0694d296dfe
2021-12-17Support up to 8 PMU countersJonny Svärd
Change-Id: Ia470d230b4bce152f88ab735e0a2ad2cdba80226
2021-08-13Do not expose device specific hw config in capabilities21.08-rc1Davide Grohmann
Change-Id: Ia90e2d74c3e071c6e3de381cfada9a5a155d7529
2021-06-10Add support for handling capabilities requestsDavide Grohmann
Change-Id: Id5aa197312c88b0c448dc085d8477ed67da24724
2021-02-15Use namespace for ethosu kernel headersPer Åstrand
Change-Id: I2866d2e7b25af49c3f8e4ed75dc60177e9b38143
2021-01-26Improve mailbox message handlingJonny Svärd
Introduce a 32b magic for each message. Verify the magic for all incoming messages. Add reset function - in case of protocol error, effectively reset/empty the incoming queue. Add an error message type and message Add version request/response Verify payload length of responses (when applicable) Change-Id: I8aadd4012024492533d52e2cdb38630fce5c36e2
2020-11-16Add PMU config to inference creationPer Åstrand
Add PMU configuration information to inference creation. Change-Id: Id8a69517a5d3e4822dbaf46f76cadb2700b3d981
2020-09-17Support inferences with multiple inputs and outputsKristofer Jonsson
Build flatbuffers library. Update network class to extract IFM and OFM dimensions from the tflite file. Update the uapi and core apis to support up to 16 IFM and OFM buffers per inference. Change-Id: I2f2f177aa4c2d5f9f50f23eb33c44e01ec2cbe09
2020-08-27Initial commit20.08-rc220.08Kristofer Jonsson
Change-Id: I14b6becc908a0ac215769c32ee9c43db192ae6c8