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 <chee.hong.ang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I17c1f0107ead64e6160954d26407f399003bcbd9
This commit is contained in:
Chee Hong Ang 2020-07-01 14:22:25 +08:00 committed by Sieu Mun Tang
parent b7f3044e87
commit 4c26957be2
2 changed files with 11 additions and 0 deletions

View File

@ -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 */

View File

@ -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);