Commit 6e2f0d10 authored by Wendy Liang's avatar Wendy Liang Committed by Jolly Shah
Browse files

xilinx: versal: enable ipi mailbox service



Enable IPI mailbox service on versal platform.
Signed-off-by: default avatarWendy Liang <wendy.liang@xilinx.com>
Signed-off-by: default avatarJolly Shah <jolly.shah@xilinx.com>
Change-Id: Idfba3bcd7e7b868133da0bc1d03c96db2d0bb1b7
parent 26f1534e
...@@ -38,6 +38,7 @@ VERSAL_CONSOLE ?= pl011 ...@@ -38,6 +38,7 @@ VERSAL_CONSOLE ?= pl011
$(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE})) $(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE}))
PLAT_INCLUDES := -Iplat/xilinx/common/include/ \ PLAT_INCLUDES := -Iplat/xilinx/common/include/ \
-Iplat/xilinx/common/ipi_mailbox_service/ \
-Iplat/xilinx/versal/include/ \ -Iplat/xilinx/versal/include/ \
-Iplat/xilinx/versal/pm_service/ -Iplat/xilinx/versal/pm_service/
...@@ -58,6 +59,7 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \ ...@@ -58,6 +59,7 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
lib/cpus/aarch64/cortex_a72.S \ lib/cpus/aarch64/cortex_a72.S \
plat/common/plat_psci_common.c \ plat/common/plat_psci_common.c \
plat/xilinx/common/ipi.c \ plat/xilinx/common/ipi.c \
plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
plat/xilinx/common/pm_service/pm_ipi.c \ plat/xilinx/common/pm_service/pm_ipi.c \
plat/xilinx/versal/bl31_versal_setup.c \ plat/xilinx/versal/bl31_versal_setup.c \
plat/xilinx/versal/plat_psci.c \ plat/xilinx/versal/plat_psci.c \
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include <common/debug.h> #include <common/debug.h>
#include <common/runtime_svc.h> #include <common/runtime_svc.h>
#include <tools_share/uuid.h> #include <tools_share/uuid.h>
#include "ipi_mailbox_svc.h"
#include "pm_svc_main.h" #include "pm_svc_main.h"
/* SMC function IDs for SiP Service queries */ /* SMC function IDs for SiP Service queries */
...@@ -23,7 +25,9 @@ ...@@ -23,7 +25,9 @@
/* These macros are used to identify PM calls from the SMC function ID */ /* These macros are used to identify PM calls from the SMC function ID */
#define PM_FID_MASK 0xf000u #define PM_FID_MASK 0xf000u
#define PM_FID_VALUE 0u #define PM_FID_VALUE 0u
#define IPI_FID_VALUE 0x1000u
#define is_pm_fid(_fid) (((_fid) & PM_FID_MASK) == PM_FID_VALUE) #define is_pm_fid(_fid) (((_fid) & PM_FID_MASK) == PM_FID_VALUE)
#define is_ipi_fid(_fid) (((_fid) & PM_FID_MASK) == IPI_FID_VALUE)
/* SiP Service UUID */ /* SiP Service UUID */
DEFINE_SVC_UUID2(versal_sip_uuid, DEFINE_SVC_UUID2(versal_sip_uuid,
...@@ -64,6 +68,12 @@ uintptr_t sip_svc_smc_handler(uint32_t smc_fid, ...@@ -64,6 +68,12 @@ uintptr_t sip_svc_smc_handler(uint32_t smc_fid,
flags); flags);
} }
/* Let IPI SMC handler deal with IPI-related requests */
if (is_ipi_fid(smc_fid)) {
return ipi_smc_handler(smc_fid, x1, x2, x3, x4, cookie, handle,
flags);
}
/* Let PM SMC handler deal with PM-related requests */ /* Let PM SMC handler deal with PM-related requests */
switch (smc_fid) { switch (smc_fid) {
case VERSAL_SIP_SVC_CALL_COUNT: case VERSAL_SIP_SVC_CALL_COUNT:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment