fix: fix build with clang-17
Target triple `aarch64-none-eabi` was incorrect, but old versions of
clang accepted it anyway. clang-17 is stricter and does not accept it
(https://releases.llvm.org/17.0.1/tools/clang/docs/ReleaseNotes.html#arm-and-aarch64-support).
The correct replacement is `aarch64-none-elf`.
The local variable `struct ffa_partition_rxtx_header header` was
assigned a different address that was not aligned to 8 bytes by
clang-17, and so `memcpy_trapped` would fail. This is fixed by
annotating it with `alignas(8)`.
Fix new warnings from `clang-tidy`.
Ignore `misc-include-cleaner` warning from `clang-tidy`, because it
produces a lot of incorrect warnings.
Apply `make format`.
Change-Id: I605e23ce258de9bfd49d717ef5864292a30235e1
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/src/api.c b/src/api.c
index 436e6c3..fefee61 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1973,12 +1973,13 @@
struct vm_locked sender_locked;
const void *from_msg;
struct ffa_value ret;
- struct ffa_partition_rxtx_header header;
ffa_id_t sender_id;
ffa_id_t receiver_id;
uint32_t msg_size;
ffa_notifications_bitmap_t rx_buffer_full;
+ alignas(8) struct ffa_partition_rxtx_header header;
+
/* Only Hypervisor can set `sender_vm_id` when forwarding messages. */
if (from->id != HF_HYPERVISOR_VM_ID && sender_vm_id != 0) {
dlog_error("Sender VM ID must be zero.\n");