aboutsummaryrefslogtreecommitdiffstats
path: root/plat
diff options
context:
space:
mode:
authorRajan Vaja <rajan.vaja@xilinx.com>2018-02-14 23:10:54 -0800
committerJolly Shah <jollys@xilinx.com>2018-03-15 10:24:09 -0700
commitf134200f1aac9a8d3ec211e61ba22246e484b04c (patch)
tree5d3baf3ad54b7137bf7099add19bc64a326de767 /plat
parent96d69865663656250aef9ed6e32136edcc2682e3 (diff)
downloadplatform_external_arm-trusted-firmware-f134200f1aac9a8d3ec211e61ba22246e484b04c.tar.gz
platform_external_arm-trusted-firmware-f134200f1aac9a8d3ec211e61ba22246e484b04c.tar.bz2
platform_external_arm-trusted-firmware-f134200f1aac9a8d3ec211e61ba22246e484b04c.zip
zynqmp: pm: Support ATF PM version check
Add SMC call to query ATF PM version. This version can be used by Linux to match with expected version. Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Diffstat (limited to 'plat')
-rw-r--r--plat/xilinx/zynqmp/pm_service/pm_common.h5
-rw-r--r--plat/xilinx/zynqmp/pm_service/pm_svc_main.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/plat/xilinx/zynqmp/pm_service/pm_common.h b/plat/xilinx/zynqmp/pm_service/pm_common.h
index 5dcbb0d86..4d03bc0f6 100644
--- a/plat/xilinx/zynqmp/pm_service/pm_common.h
+++ b/plat/xilinx/zynqmp/pm_service/pm_common.h
@@ -19,6 +19,11 @@
#define PAYLOAD_ARG_CNT 6U
#define PAYLOAD_ARG_SIZE 4U /* size in bytes */
+#define ZYNQMP_TZ_VERSION_MAJOR 1
+#define ZYNQMP_TZ_VERSION_MINOR 0
+#define ZYNQMP_TZ_VERSION ((ZYNQMP_TZ_VERSION_MAJOR << 16) | \
+ ZYNQMP_TZ_VERSION_MINOR)
+
/**
* pm_ipi - struct for capturing IPI-channel specific info
* @apu_ipi_id APU IPI agent ID
diff --git a/plat/xilinx/zynqmp/pm_service/pm_svc_main.c b/plat/xilinx/zynqmp/pm_service/pm_svc_main.c
index 4fd69b91f..518e18fc9 100644
--- a/plat/xilinx/zynqmp/pm_service/pm_svc_main.c
+++ b/plat/xilinx/zynqmp/pm_service/pm_svc_main.c
@@ -19,6 +19,7 @@
#include "pm_ipi.h"
#define PM_GET_CALLBACK_DATA 0xa01
+#define PM_GET_TRUSTZONE_VERSION 0xa03
/* 0 - UP, !0 - DOWN */
static int32_t pm_down = !0;
@@ -355,6 +356,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)value) << 32);
}
+ case PM_GET_TRUSTZONE_VERSION:
+ SMC_RET1(handle, (uint64_t)PM_RET_SUCCESS |
+ ((uint64_t)ZYNQMP_TZ_VERSION << 32));
+
default:
WARN("Unimplemented PM Service Call: 0x%x\n", smc_fid);
SMC_RET1(handle, SMC_UNK);