From f99306d49ba074279c5402a0a34e6bc9797d77de Mon Sep 17 00:00:00 2001 From: Jay Buddhabhatti Date: Mon, 4 Apr 2022 23:42:04 -0700 Subject: [PATCH] feat(versal): update macro name to generic and move to common place Update TZ_VERSION macro name to generic macro name and move to common header file so that it can be used for keystoneb. Signed-off-by: Jay Buddhabhatti Acked-by: Tanmay Shah Signed-off-by: Michal Simek Change-Id: Ic3819eea78b6c7b51ffaa13081026dd191b76125 --- plat/xilinx/common/include/pm_common.h | 5 +++++ plat/xilinx/versal/include/plat_pm_common.h | 4 ---- plat/xilinx/versal/pm_service/pm_svc_main.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plat/xilinx/common/include/pm_common.h b/plat/xilinx/common/include/pm_common.h index 06efa4b4e..89626e5f2 100644 --- a/plat/xilinx/common/include/pm_common.h +++ b/plat/xilinx/common/include/pm_common.h @@ -27,6 +27,11 @@ #endif #define PAYLOAD_ARG_SIZE 4U /* size in bytes */ +#define TZ_VERSION_MAJOR 1 +#define TZ_VERSION_MINOR 0 +#define TZ_VERSION ((TZ_VERSION_MAJOR << 16) | \ + TZ_VERSION_MINOR) + /** * pm_ipi - struct for capturing IPI-channel specific info * @local_ipi_id Local IPI agent ID diff --git a/plat/xilinx/versal/include/plat_pm_common.h b/plat/xilinx/versal/include/plat_pm_common.h index fb4812dad..4c057b832 100644 --- a/plat/xilinx/versal/include/plat_pm_common.h +++ b/plat/xilinx/versal/include/plat_pm_common.h @@ -19,8 +19,4 @@ #define NON_SECURE_FLAG 1U #define SECURE_FLAG 0U -#define VERSAL_TZ_VERSION_MAJOR 1U -#define VERSAL_TZ_VERSION_MINOR 0U -#define VERSAL_TZ_VERSION ((VERSAL_TZ_VERSION_MAJOR << 16U) | \ - VERSAL_TZ_VERSION_MINOR) #endif /* PLAT_PM_COMMON_H */ diff --git a/plat/xilinx/versal/pm_service/pm_svc_main.c b/plat/xilinx/versal/pm_service/pm_svc_main.c index 4e26d87b2..950d4950e 100644 --- a/plat/xilinx/versal/pm_service/pm_svc_main.c +++ b/plat/xilinx/versal/pm_service/pm_svc_main.c @@ -284,7 +284,7 @@ static uintptr_t TF_A_specific_handler(uint32_t api_id, uint32_t *pm_arg, case PM_GET_TRUSTZONE_VERSION: SMC_RET1(handle, (uint64_t)PM_RET_SUCCESS | - ((uint64_t)VERSAL_TZ_VERSION << 32U)); + ((uint64_t)TZ_VERSION << 32U)); default: return (uintptr_t)0; -- 2.39.5