Change create network UAPI to take a user buffer

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>
diff --git a/kernel/ethosu_mailbox.h b/kernel/ethosu_mailbox.h
index c4c71a9..ab19613 100644
--- a/kernel/ethosu_mailbox.h
+++ b/kernel/ethosu_mailbox.h
@@ -1,5 +1,6 @@
 /*
- * Copyright 2020-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
  *
  * 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
@@ -14,8 +15,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, you can access it online at
  * http://www.gnu.org/licenses/gpl-2.0.html.
- *
- * SPDX-License-Identifier: GPL-2.0-only
  */
 
 #ifndef ETHOSU_MAILBOX_H
@@ -37,9 +36,10 @@
 
 struct device;
 struct ethosu_buffer;
-struct ethosu_device;
 struct ethosu_core_msg;
 struct ethosu_core_queue;
+struct ethosu_device;
+struct ethosu_network;
 struct resource;
 
 typedef void (*ethosu_mailbox_cb)(void *user_arg);
@@ -168,8 +168,7 @@
 			     struct ethosu_buffer **ifm,
 			     uint32_t ofm_count,
 			     struct ethosu_buffer **ofm,
-			     struct ethosu_buffer *network,
-			     uint32_t network_index,
+			     struct ethosu_network *network,
 			     uint8_t *pmu_event_config,
 			     uint8_t pmu_event_config_count,
 			     uint8_t pmu_cycle_counter_enable);
@@ -181,8 +180,7 @@
  */
 int ethosu_mailbox_network_info_request(struct ethosu_mailbox *mbox,
 					struct ethosu_mailbox_msg *msg,
-					struct ethosu_buffer *network,
-					uint32_t network_index);
+					struct ethosu_network *network);
 
 /**
  * ethosu_mailbox_cancel_inference() - Send inference cancellation