diff --git a/plat/xilinx/common/include/pm_common.h b/plat/xilinx/common/include/pm_common.h index c38cdef35..68d1db29e 100644 --- a/plat/xilinx/common/include/pm_common.h +++ b/plat/xilinx/common/include/pm_common.h @@ -18,7 +18,6 @@ #if IPI_CRC_CHECK #define PAYLOAD_ARG_CNT 8U -#define RET_PAYLOAD_ARG_CNT 7U #define IPI_W0_TO_W6_SIZE 28U #define PAYLOAD_CRC_POS 7U #define CRC_INIT_VALUE 0x4F4EU @@ -26,8 +25,8 @@ #define CRC_POLYNOM 0x8005U #else #define PAYLOAD_ARG_CNT 7U -#define RET_PAYLOAD_ARG_CNT 6U #endif +#define RET_PAYLOAD_ARG_CNT 6U #define PAYLOAD_ARG_SIZE 4U /* size in bytes */ #define TZ_VERSION_MAJOR 1 diff --git a/plat/xilinx/common/pm_service/pm_svc_main.c b/plat/xilinx/common/pm_service/pm_svc_main.c index b431a6c41..193c5dcd2 100644 --- a/plat/xilinx/common/pm_service/pm_svc_main.c +++ b/plat/xilinx/common/pm_service/pm_svc_main.c @@ -503,8 +503,8 @@ static uintptr_t eemi_api_handler(uint32_t api_id, const uint32_t *pm_arg, void *handle, uint32_t security_flag) { enum pm_ret_status ret; - uint32_t buf[PAYLOAD_ARG_CNT] = {0}; - uint32_t payload[PAYLOAD_ARG_CNT] = {0}; + uint32_t buf[RET_PAYLOAD_ARG_CNT] = {0U}; + uint32_t payload[PAYLOAD_ARG_CNT] = {0U}; uint32_t module_id; module_id = (api_id & MODULE_ID_MASK) >> 8U; @@ -514,7 +514,7 @@ static uintptr_t eemi_api_handler(uint32_t api_id, const uint32_t *pm_arg, pm_arg[4], pm_arg[5]); ret = pm_ipi_send_sync(primary_proc, payload, (uint32_t *)buf, - PAYLOAD_ARG_CNT); + RET_PAYLOAD_ARG_CNT); SMC_RET4(handle, (uint64_t)ret | ((uint64_t)buf[0] << 32U), (uint64_t)buf[1] | ((uint64_t)buf[2] << 32U),