diff options
author | Tejas Patel <tejas.patel@xilinx.com> | 2019-01-21 17:56:48 +0530 |
---|---|---|
committer | Jolly Shah <jolly.shah@xilinx.com> | 2020-01-15 11:02:43 -0800 |
commit | 4b0f32a411377bdbbc3d7913bde818afddde02ee (patch) | |
tree | a81fc476431c5673c54ea218d610a4f57ec6cd16 /plat/xilinx | |
parent | 6e2f0d105d137257dbdae4d0ed73d813c6b03119 (diff) |
xilinx: versal: Add support of PM_GET_TRUSTZONE_VERSION API
PM_GET_TRUSTZONE_VERSION API is required to use zynqmp-firmware
driver for versal. Add support of PM_GET_TRUSTZONE_VERSION API
for versal.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
Change-Id: Ie1c859890096024cc8be67386e3fd0f5f8a4385f
Diffstat (limited to 'plat/xilinx')
-rw-r--r-- | plat/xilinx/versal/include/plat_pm_common.h | 4 | ||||
-rw-r--r-- | plat/xilinx/versal/pm_service/pm_svc_main.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/plat/xilinx/versal/include/plat_pm_common.h b/plat/xilinx/versal/include/plat_pm_common.h index 6b202c746..2d0080168 100644 --- a/plat/xilinx/versal/include/plat_pm_common.h +++ b/plat/xilinx/versal/include/plat_pm_common.h @@ -19,4 +19,8 @@ #define PAYLOAD_ARG_CNT 6U #define PAYLOAD_ARG_SIZE 4U /* size in bytes */ +#define VERSAL_TZ_VERSION_MAJOR 1 +#define VERSAL_TZ_VERSION_MINOR 0 +#define VERSAL_TZ_VERSION ((VERSAL_TZ_VERSION_MAJOR << 16) | \ + 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 3aac79a86..cb2ac5534 100644 --- a/plat/xilinx/versal/pm_service/pm_svc_main.c +++ b/plat/xilinx/versal/pm_service/pm_svc_main.c @@ -17,6 +17,8 @@ #include "pm_client.h" #include "pm_ipi.h" +#define PM_GET_TRUSTZONE_VERSION 0xa03 + /* pm_up = true - UP, pm_up = false - DOWN */ static bool pm_up; @@ -255,6 +257,10 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3, SMC_RET1(handle, (uint64_t)ret | ((uint64_t)mode << 32)); } + case PM_GET_TRUSTZONE_VERSION: + SMC_RET1(handle, (uint64_t)PM_RET_SUCCESS | + ((uint64_t)VERSAL_TZ_VERSION << 32)); + default: WARN("Unimplemented PM Service Call: 0x%x\n", smc_fid); SMC_RET1(handle, SMC_UNK); |