From 4c26957be253a7ab3acb316f42bf3ee10c409ed2 Mon Sep 17 00:00:00 2001 From: Chee Hong Ang Date: Wed, 1 Jul 2020 14:22:25 +0800 Subject: [PATCH] feat(intel): add RSU 'Max Retry' SiP SMC services Add SiP SMC services to store/retrieve 'Max Retry' counter for Remote System Update (RSU). Signed-off-by: Chee Hong Ang Signed-off-by: Jit Loon Lim Change-Id: I17c1f0107ead64e6160954d26407f399003bcbd9 --- plat/intel/soc/common/include/socfpga_sip_svc.h | 2 ++ plat/intel/soc/common/socfpga_sip_svc.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/plat/intel/soc/common/include/socfpga_sip_svc.h b/plat/intel/soc/common/include/socfpga_sip_svc.h index 63b28fb98..664611f96 100644 --- a/plat/intel/soc/common/include/socfpga_sip_svc.h +++ b/plat/intel/soc/common/include/socfpga_sip_svc.h @@ -39,6 +39,8 @@ #define INTEL_SIP_SMC_RSU_RETRY_COUNTER 0xC200000F #define INTEL_SIP_SMC_RSU_DCMF_VERSION 0xC2000010 #define INTEL_SIP_SMC_RSU_COPY_DCMF_VERSION 0xC2000011 +#define INTEL_SIP_SMC_RSU_MAX_RETRY 0xC2000012 +#define INTEL_SIP_SMC_RSU_COPY_MAX_RETRY 0xC2000013 /* ECC */ diff --git a/plat/intel/soc/common/socfpga_sip_svc.c b/plat/intel/soc/common/socfpga_sip_svc.c index 13ef80984..daba7f521 100644 --- a/plat/intel/soc/common/socfpga_sip_svc.c +++ b/plat/intel/soc/common/socfpga_sip_svc.c @@ -28,6 +28,8 @@ static bool is_full_reconfig; /* RSU DCMF version */ static uint32_t rsu_dcmf_ver[4] = {0}; +/* RSU Max Retry */ +static uint32_t rsu_max_retry; /* SiP Service UUID */ DEFINE_SVC_UUID2(intl_svc_uid, @@ -573,6 +575,13 @@ uintptr_t sip_smc_handler(uint32_t smc_fid, status = intel_rsu_copy_dcmf_version(x1, x2); SMC_RET1(handle, status); + case INTEL_SIP_SMC_RSU_MAX_RETRY: + SMC_RET2(handle, INTEL_SIP_SMC_STATUS_OK, rsu_max_retry); + + case INTEL_SIP_SMC_RSU_COPY_MAX_RETRY: + rsu_max_retry = x1; + SMC_RET1(handle, INTEL_SIP_SMC_STATUS_OK); + case INTEL_SIP_SMC_ECC_DBE: status = intel_ecc_dbe_notification(x1); SMC_RET1(handle, status);