Set mailbox interrupt priority in message handler

When the mailbox interrupt is triggered, the mailbox interrupt handler
will invoke the remote processor mailbox callback, which in turn will
use FreeRTOS's xSemaphoreGiveFromISR to wake up a task to handle the new
message.

Until now, the interrupt priority for the mailbox interrupt has been
left at its default value but this stopped working since FreeRTOS kernel
V10.6.0 because since that version, the ISR functions will only work
from an interrupt with the same or lower priority than
configMAX_SYSCALL_INTERRUPT_PRIORITY in the FreeRTOS configuration.

Therefore, a priority is now set for the mailbox interrupt that is
compatible with the FreeRTOS configuration used.

Change-Id: I0186fdc9951dfa73a2692ba95530094abb0e4d4a
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
diff --git a/applications/message_handler_openamp/main.cpp b/applications/message_handler_openamp/main.cpp
index e281f6e..7b755b9 100644
--- a/applications/message_handler_openamp/main.cpp
+++ b/applications/message_handler_openamp/main.cpp
@@ -1,6 +1,5 @@
 /*
  * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
- *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the License); you may
@@ -152,6 +151,7 @@
     LOG_DEBUG("");
     mailbox.handleMessage();
 }
+#define MHU_IRQ_PRIORITY 5
 #endif
 
 } // namespace
@@ -185,8 +185,9 @@
 
 #ifdef MHU_IRQ
     // Register mailbox interrupt handler
-    NVIC_SetVector((IRQn_Type)MHU_IRQ, (uint32_t)&mailboxIrqHandler);
-    NVIC_EnableIRQ((IRQn_Type)MHU_IRQ);
+    NVIC_SetVector(static_cast<IRQn_Type>(MHU_IRQ), (uint32_t)&mailboxIrqHandler);
+    NVIC_SetPriority(static_cast<IRQn_Type>(MHU_IRQ), MHU_IRQ_PRIORITY);
+    NVIC_EnableIRQ(static_cast<IRQn_Type>(MHU_IRQ));
 #endif
 
     // Start Scheduler