feat(rmm): update RMI VERSION command as per EAC5

This patch adds necessary support for RMI_VERSION command.
This patch sets RMI version numbers to 1.0 as per
RMM Specification 1.0-eac5.

Change-Id: If7f88d5b5efa58716752488108fa110fc71ae836
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
This commit is contained in:
Shruti Gupta 2023-10-26 12:01:28 +01:00
parent 0e1dc0f2bc
commit ade6000ff0
2 changed files with 14 additions and 3 deletions

View file

@ -91,6 +91,10 @@
#define E_RMM_NOMEM -4
#define E_RMM_INVAL -5
/* Return error codes from RMI SMCs */
#define RMI_SUCCESS 0
#define RMI_ERROR_INPUT 1
/* Acceptable SHA sizes for Challenge object */
#define SHA256_DIGEST_SIZE 32U
#define SHA384_DIGEST_SIZE 48U

View file

@ -106,11 +106,18 @@ void trp_main(void)
/*******************************************************************************
* Returning RMI version back to Normal World
******************************************************************************/
static void trp_ret_rmi_version(struct trp_smc_result *smc_ret)
static void trp_ret_rmi_version(unsigned long long rmi_version,
struct trp_smc_result *smc_ret)
{
if (rmi_version != RMI_ABI_VERSION) {
smc_ret->x[0] = RMI_ERROR_INPUT;
} else {
smc_ret->x[0] = RMI_SUCCESS;
}
VERBOSE("RMM version is %u.%u\n", RMI_ABI_VERSION_MAJOR,
RMI_ABI_VERSION_MINOR);
smc_ret->x[0] = RMI_ABI_VERSION;
smc_ret->x[1] = RMI_ABI_VERSION;
smc_ret->x[2] = RMI_ABI_VERSION;
}
/*******************************************************************************
@ -163,7 +170,7 @@ void trp_rmi_handler(unsigned long fid,
switch (fid) {
case RMI_RMM_REQ_VERSION:
trp_ret_rmi_version(smc_ret);
trp_ret_rmi_version(x1, smc_ret);
break;
case RMI_RMM_GRANULE_DELEGATE:
trp_asc_mark_realm(x1, smc_ret);