From 3c6a260a705a668b5ff8e8159f04c257273fb458 Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Thu, 10 Mar 2022 11:17:29 +0100 Subject: Network info Add UAPI and core message that allows user space space to fetch information about network models built into the firmware. Change-Id: Ic92529bce3edd0a5499e691a566bd065da2a72ad --- kernel/uapi/ethosu.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'kernel/uapi') diff --git a/kernel/uapi/ethosu.h b/kernel/uapi/ethosu.h index 335c769..fda7fc2 100644 --- a/kernel/uapi/ethosu.h +++ b/kernel/uapi/ethosu.h @@ -53,6 +53,8 @@ namespace EthosU { struct ethosu_uapi_buffer) #define ETHOSU_IOCTL_NETWORK_CREATE ETHOSU_IOR(0x20, \ struct ethosu_uapi_network_create) +#define ETHOSU_IOCTL_NETWORK_INFO ETHOSU_IOR(0x21, \ + struct ethosu_uapi_network_info) #define ETHOSU_IOCTL_INFERENCE_CREATE ETHOSU_IOR(0x30, \ struct ethosu_uapi_inference_create) #define ETHOSU_IOCTL_INFERENCE_STATUS ETHOSU_IOR(0x31, \ @@ -121,6 +123,22 @@ struct ethosu_uapi_network_create { }; }; +/** + * struct ethosu_uapi_network_info - Network info + * @desc: Network description + * @ifm_count: Number of IFM buffers + * @ifm_size: IFM buffer sizes + * @ofm_count: Number of OFM buffers + * @ofm_size: OFM buffer sizes + */ +struct ethosu_uapi_network_info { + char desc[32]; + __u32 ifm_count; + __u32 ifm_size[ETHOSU_FD_MAX]; + __u32 ofm_count; + __u32 ofm_size[ETHOSU_FD_MAX]; +}; + /** * struct ethosu_uapi_pmu_config - Configure performance counters * @events: Array of counters to configure, set to non-zero for -- cgit v1.2.1