diff options
author | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2022-03-08 13:25:45 +0100 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2022-03-10 15:20:57 +0100 |
commit | 35de9e63d9c2fe0a557637ac104d7d73382d2d4a (patch) | |
tree | 41fa348f46f7f76b00625ad3b9768c1ddae5c83b /kernel/ethosu_core_interface.h | |
parent | 118b05990af26026a1ac2b6d5dfae32ea342a7f4 (diff) | |
download | ethos-u-linux-driver-stack-35de9e63d9c2fe0a557637ac104d7d73382d2d4a.tar.gz |
Firmware resident model
Support referencing a network model by index that has been built into
the firmware binary.
Change-Id: Idd5294376ea82503dfeafe1203dcc0694d296dfe
Diffstat (limited to 'kernel/ethosu_core_interface.h')
-rw-r--r-- | kernel/ethosu_core_interface.h | 54 |
1 files changed, 44 insertions, 10 deletions
diff --git a/kernel/ethosu_core_interface.h b/kernel/ethosu_core_interface.h index ef63c3b..cc4fca4 100644 --- a/kernel/ethosu_core_interface.h +++ b/kernel/ethosu_core_interface.h @@ -1,5 +1,5 @@ /* - * (C) COPYRIGHT 2020 ARM Limited. All rights reserved. + * Copyright (c) 2020-2022 Arm Limited. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -88,27 +88,61 @@ struct ethosu_core_queue { uint8_t data[]; }; +/** + * enum ethosu_core_status - Status + */ enum ethosu_core_status { ETHOSU_CORE_STATUS_OK, ETHOSU_CORE_STATUS_ERROR }; +/** + * struct ethosu_core_buffer - Buffer descriptor + * + * Pointer and size to a buffer withing the Ethos-U + * address space. + */ struct ethosu_core_buffer { uint32_t ptr; uint32_t size; }; +/** + * enum ethosu_core_network_type - Network buffer type + */ +enum ethosu_core_network_type { + ETHOSU_CORE_NETWORK_BUFFER = 1, + ETHOSU_CORE_NETWORK_INDEX +}; + +/** + * struct ethosu_core_network_buffer - Network buffer + */ +struct ethosu_core_network_buffer { + uint32_t type; + union { + struct ethosu_core_buffer buffer; + uint32_t index; + }; +}; + +/** + * struct ethosu_core_inference_req - Inference request + */ struct ethosu_core_inference_req { - uint64_t user_arg; - uint32_t ifm_count; - struct ethosu_core_buffer ifm[ETHOSU_CORE_BUFFER_MAX]; - uint32_t ofm_count; - struct ethosu_core_buffer ofm[ETHOSU_CORE_BUFFER_MAX]; - struct ethosu_core_buffer network; - uint8_t pmu_event_config[ETHOSU_CORE_PMU_MAX]; - uint32_t pmu_cycle_counter_enable; + uint64_t user_arg; + uint32_t ifm_count; + struct ethosu_core_buffer ifm[ETHOSU_CORE_BUFFER_MAX]; + uint32_t ofm_count; + struct ethosu_core_buffer ofm[ETHOSU_CORE_BUFFER_MAX]; + struct ethosu_core_network_buffer network; + uint8_t pmu_event_config[ETHOSU_CORE_PMU_MAX]; + uint32_t pmu_cycle_counter_enable; }; +/** + * struct ethosu_core_inference_rsp - Inference response + */ struct ethosu_core_inference_rsp { uint64_t user_arg; uint32_t ofm_count; @@ -121,7 +155,7 @@ struct ethosu_core_inference_rsp { }; /** - * struct ethosu_core_msg_verson - Message protocol version + * struct ethosu_core_msg_version - Message protocol version */ struct ethosu_core_msg_version { uint8_t major; |