Commit f134200f authored by Rajan Vaja's avatar Rajan Vaja Committed by Jolly Shah
Browse files

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: default avatarRajan Vaja <rajanv@xilinx.com>
parent 96d69865
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
#define PAYLOAD_ARG_CNT 6U #define PAYLOAD_ARG_CNT 6U
#define PAYLOAD_ARG_SIZE 4U /* size in bytes */ #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 * pm_ipi - struct for capturing IPI-channel specific info
* @apu_ipi_id APU IPI agent ID * @apu_ipi_id APU IPI agent ID
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "pm_ipi.h" #include "pm_ipi.h"
#define PM_GET_CALLBACK_DATA 0xa01 #define PM_GET_CALLBACK_DATA 0xa01
#define PM_GET_TRUSTZONE_VERSION 0xa03
/* 0 - UP, !0 - DOWN */ /* 0 - UP, !0 - DOWN */
static int32_t pm_down = !0; 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, ...@@ -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); 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: default:
WARN("Unimplemented PM Service Call: 0x%x\n", smc_fid); WARN("Unimplemented PM Service Call: 0x%x\n", smc_fid);
SMC_RET1(handle, SMC_UNK); SMC_RET1(handle, SMC_UNK);
......
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